[fpc-pascal] where to set the binutils-path

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Jun 25 13:54:48 CEST 2014


On 25 Jun 2014, at 13:21, Lukas Gradl wrote:

> ANDROIDBINDIR="~/Software/Android_Development/android-ndk-r9d/ 
> toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin"
> export PATH=$ANDROIDBINDIR:$PATH
>
> make crossall CPU_TARGET=arm OS_TARGET=android FPC=$FPCBIN CROSSOPT=- 
> CfVFPV3 CROSSBINDIR=$ANDROIDBINDIR BINUTILSPREFIX=arm-linux- 
> androideabi-
>
> The script stops with:
>
> /bin/mkdir -p /space/projekte/Sourcen/fpc27/rtl/units/arm-android
> ~/Software/Android_Development/android-ndk-r9d/toolchains/arm-linux- 
> androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as  - 
> o /space/projekte/Sourcen/fpc27/rtl/units/arm-android/prt0.o arm/ 
> prt0.as
> ~/Software/Android_Development/android-ndk-r9d/toolchains/arm-linux- 
> androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as  - 
> o /space/projekte/Sourcen/fpc27/rtl/units/arm-android/dllprt0.o arm/ 
> dllprt0.as
> /space/projekte/Sourcen/fpc27/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~/Software/ 
> Android_Development/android-ndk-r9d/toolchains/arm-linux- 
> androideabi-4.8/prebuilt/linux-x86_64/bin -FE. -FU/space/projekte/ 
> Sourcen/fpc27/rtl/units/arm-android -darm -dRELEASE -CfVFPV3 -Us - 
> Sg ../linux/system.pp
> system.inc(1804,8) Warning: Implicit string type conversion from  
> "RawByteString" to "UnicodeString"
> system.pp(376) Error: Assembler arm-linux-androideabi-as not found,  
> switching to external assembling
> system.pp(376) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
>
>
> So, prt0.o is built, dllprt0.o as well, but for system.pp it fails.

It's because your ANDROIDBINDIR/CROSSBINDIR setting is wrong. You are  
using the "~" character to denote your home directory, but
a) you are quoting the string that you assign to ANDROIDBINDIR, so you  
are telling the shell that it must not perform certain substitutions.  
One of those it doesn't perform, is changing "~" into the full path to  
your home directory. This is a very important point: the equivalence  
of "~" and your home directory is a *unix shell convention* (just like  
";" means "separator between two separate commands"), it is not (or at  
least should not be) interpreted in a special way by any other program
b) "make" uses a shell for external invocations, so you're just lucky  
there that the shell is invoked a second time (without a quoted  
version of that environment variable), so it can substitute the ~ at  
that point
c) FPC directly executes programs and hence no ~-substitution will  
happen

FPC cannot be modified to substitute ~ with the value of $HOME,  
because apart from the fact that it's not a shell, a literal "~" is  
also a valid directory name.

The proper alternative is to use $HOME instead (as long as you don't  
use single quotes).


Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140625/d0f0a57c/attachment.html>


More information about the fpc-pascal mailing list