Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Felipe Monteiro de Carvalho
On Sun, Jul 8, 2012 at 5:15 PM, Thomas Schatzl tom_at_w...@gmx.at wrote:
  can you check whether the correct assembler is used, e.g. change into the
 rtl directory, and run the ppcrossarm as above with -al -s appended? And
 then verify the ppas.sh that the correct assembler is used?

Could you be more specific about which command to type? I tryed to
deduce by myself and I came up with:

user-31-175-219-83:rtl felipe$ ../compiler/ppcrossarm
-FD/Users/felipe/Programas/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin
-FE. -FU/Users/felipe/Programas/targetandroid/rtl/units/arm-android
-dFPC_ARMEL -darm -dRELEASE -CpARMv6 -CfSoft -Us -Sg -al -s -Fiarm
-Fiunix -Filinux/arm -Fiinc -Filinux linux/system.pp

which results in a compilation error:

system.pp(102,19) Error: Identifier not found argc
system.pp(132,21) Error: Identifier not found argc
system.pp(133,27) Error: Identifier not found argv
system.pp(164,10) Error: Identifier not found argc
system.pp(170,16) Error: Identifier not found argc
system.pp(172,22) Error: Identifier not found argv
system.pp(177,14) Error: Identifier not found argv
system.pp(192,19) Error: Identifier not found argv
system.pp(200,16) Error: Identifier not found argc
system.pp(380) Fatal: There were 9 errors compiling module, stopping
Fatal: Compilation aborted

-- 
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Thomas Schatzl
On Mon, 2012-07-09 at 08:53 +0200, Felipe Monteiro de Carvalho wrote:
 On Sun, Jul 8, 2012 at 5:15 PM, Thomas Schatzl tom_at_w...@gmx.at wrote:
   can you check whether the correct assembler is used, e.g. change into the
  rtl directory, and run the ppcrossarm as above with -al -s appended? And
  then verify the ppas.sh that the correct assembler is used?
 
 Could you be more specific about which command to type? I tryed to
 deduce by myself and I came up with:
 
 user-31-175-219-83:rtl felipe$ ../compiler/ppcrossarm
 -FD/Users/felipe/Programas/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin
 -FE. -FU/Users/felipe/Programas/targetandroid/rtl/units/arm-android
 -dFPC_ARMEL -darm -dRELEASE -CpARMv6 -CfSoft -Us -Sg -al -s -Fiarm
 -Fiunix -Filinux/arm -Fiinc -Filinux linux/system.pp
 
 which results in a compilation error:

Run

/Users/felipe/Programas/targetandroid/compiler/ppcrossarm -Ur
-Tandroid -Parm -XParm-linux-androideabi- -Xr -Ur -Xs -O2 -n -Fi../inc
-Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm
-FD/Users/felipe/Programas/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin
-FE. -FU/Users/felipe/Programas/targetandroid/rtl/units/arm-android
-dFPC_ARMEL -darm -dRELEASE -CpARMv6 -CfSoft -Us -Sg -al -s

(I.e. the command line that failed, including -al -s)

in the /Users/felipe/Programas/targetandroid/rtl/android directory
(this is where make was when the error occurred), and have a look at the
generated ppas.sh file which contains the calls to the assembler and
linker. They should refer to correct cross-assembler and linker.

Btw, I had some time to have a look at what method exit code fpc
generates when using -Cparmv5. It generates bx instructions then.
I.e. the default code generator uses something less than armv5.

Thomas


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Felipe Monteiro de Carvalho
On Mon, Jul 9, 2012 at 9:42 AM, Thomas Schatzl tom_at_w...@gmx.at wrote:
 Run
...
 (I.e. the command line that failed, including -al -s)

That results in:

Fatal: No source file name in command line
Fatal: Compilation aborted

-- 
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Thomas Schatzl
On Mon, 2012-07-09 at 10:01 +0200, Felipe Monteiro de Carvalho wrote:
 On Mon, Jul 9, 2012 at 9:42 AM, Thomas Schatzl tom_at_w...@gmx.at wrote:
  Run
 ...
  (I.e. the command line that failed, including -al -s)
 
 That results in:
 
 Fatal: No source file name in command line
 Fatal: Compilation aborted
 


The whole shebang again, with ../linux/system.pp at the end. Forgot to
copy that line in the given output.

Thomas


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Jeppe Græsdal Johansen

Den 08-07-2012 14:42, Thomas Schatzl skrev:
Actually, I saw that armv5 already supports blx, do not know right 
now why

it isn't generated in the first place. Did you ever try compiling the
compiler or your program with -Cparmv5? Maybe it's just that the 
compiler

default is  armv5?


I never really tested -Cparmv5, only -Cparmv6 and with no options (so
default value), I just conected the points based on your assertion
that default=v5, but indeed maybe it is v4.


... or even to some lower common denominator.

Thomas

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
You should be using -Cparmv5t if you want armv5 and blx. The t indicates 
that the device has thumb support, which most have, but armv5 is usually 
safer, hence it's the default.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Felipe Monteiro de Carvalho
In Windows I also have strange issues:

D:\targetandroidPATH=C:\Programas\lazarus31\fpc\2.6.1\bin\i386-win32

D:\targetandroidmake crossinstall CPU_TARGET=arm OS_TARGET=android OPT=-dFPC_A
RMEL CROSSOPT=-CpARMv6 -CfSoft CROSSBINDIR=C:\Programas\android-ndk-r8\toolch
ains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin OPT=-dFPC_ARMEL BINUTILSPR
EFIX=arm-linux-androideabi- INSTALL_PREFIX=output
makefile:29: *** You need the GNU utils package to use this Makefile.  Stop.

Any ideas?

This same kind of method worked fine for building Lazarus...

thanks,
-- 
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Jeppe Græsdal Johansen

Den 09-07-2012 11:20, Felipe Monteiro de Carvalho skrev:

makefile:29: *** You need the GNU utils package to use this Makefile.  Stop.
Looks like it can't find a proper strip binary. Is your binutils prefix 
correct? Maybe you have problems with the backslashes? A silly 
suggestion: try changing them from \ to \\ :)


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Thomas Schatzl
Hi,

On Mon, 2012-07-09 at 11:12 +0200, Jeppe Græsdal Johansen wrote:
 Den 08-07-2012 14:42, Thomas Schatzl skrev:
  Actually, I saw that armv5 already supports blx, do not know right 
  now why
  it isn't generated in the first place. Did you ever try compiling the
  compiler or your program with -Cparmv5? Maybe it's just that the 
  compiler
  default is  armv5?
 
  I never really tested -Cparmv5, only -Cparmv6 and with no options (so
  default value), I just conected the points based on your assertion
  that default=v5, but indeed maybe it is v4.
 
  ... or even to some lower common denominator.
 
  Thomas
 

 You should be using -Cparmv5t if you want armv5 and blx. The t indicates 
 that the device has thumb support, which most have, but armv5 is usually 
 safer, hence it's the default.

You are right although fpc seems to generate bx with -Cparmv5 too.

The point is how google defines its ABIs. As for Android, google
mentions about armeabi:

This is the name of an ABI for ARM-based CPUs that support *at* *least*
the ARMv5TE instruction set. [...]

So, at least for compiling for Android, either is fine, although
-Cparmv5t is certainly better.

Thomas


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Felipe Monteiro de Carvalho
On Mon, Jul 9, 2012 at 11:24 AM, Jeppe Græsdal Johansen
jjoha...@student.aau.dk wrote:
 Looks like it can't find a proper strip binary. Is your binutils prefix
 correct?

Yes, the prefix is correct

Is it complaining about general binutils, like strip.exe, or about the
cross-binutils?

Anyway, these 2 files do exist:

C:\Programas\android-ndk-r8\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-strip.exe

C:\Programas\lazarus31\fpc\2.6.1\bin\i386-win32\strip.exe

 Maybe you have problems with the backslashes? A silly suggestion:
 try changing them from \ to \\ :)

Didn't change anything.

-- 
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Thomas Schatzl
Hi again,

On Mon, 2012-07-09 at 11:33 +0200, Thomas Schatzl wrote:
 
  You should be using -Cparmv5t if you want armv5 and blx. The t indicates 
  that the device has thumb support, which most have, but armv5 is usually 
  safer, hence it's the default.
 
 You are right although fpc seems to generate bx with -Cparmv5 too.
 

Because it is correct, non-T armv5 supports the bx instruction without
the Thumb bit set.


 The point is how google defines its ABIs. As for Android, google
 mentions about armeabi:
 
 This is the name of an ABI for ARM-based CPUs that support *at* *least*
 the ARMv5TE instruction set. [...]
 

... which means that this is a non-issue because android ABI requires a
-T variant anyway.

Thomas



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Jonas Maebe


Felipe Monteiro de Carvalho wrote on Mon, 09 Jul 2012:


Is it complaining about general binutils, like strip.exe, or about the
cross-binutils?


That error is only printed if the Makefile cannot find pwd.exe in the  
PATH. It should be part of a default FPC 2.6.0 install.


Note that pwd.exe is not only utility the Makefile requires, it's just  
a quick sanity check. You must have all GNU utilities shipped with  
latest FPC release install in your PATH at all times when using the  
Makefiles. Otherwise you will get random errors all the time, as you  
seem to be getting based on your previous mails.



Jonas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Error building branch targetandroid

2012-07-09 Thread Felipe Monteiro de Carvalho
On Mon, Jul 9, 2012 at 11:55 AM, Jonas Maebe jonas.ma...@elis.ugent.be wrote:
 That error is only printed if the Makefile cannot find pwd.exe in the PATH.
 It should be part of a default FPC 2.6.0 install.

but I have:

SET PATH=C:\Programas\lazarus31\fpc\2.6.1\bin\i386-win32

And the file C:\Programas\lazarus31\fpc\2.6.1\bin\i386-win32\pwd.exe does exist

 Note that pwd.exe is not only utility the Makefile requires, it's just a
 quick sanity check. You must have all GNU utilities shipped with latest FPC
 release install in your PATH at all times when using the Makefiles.
 Otherwise you will get random errors all the time, as you seem to be getting
 based on your previous mails.

I don't think that this problem is related at all to the previous
e-mails. Previously I was trying to build in Mac OS X at home. Now I
am trying at work in Windows.

-- 
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel