Hello all,
Can anyone shed some light on this problem for me?
I am trying to configure FPC/Lazarus for Android Cross-Compiling. I have followed the directions as indicated here:
http://wiki.lazarus.freepascal.org/Android_Interface
but I get this error on compiling the project.
8< ------------------------------------------------------------ /usr/share/lazarus/1.0.2/packager/registration/lazaruspackageintf.pas(110) Error: Assembler arm-linux-as not found, switching to external assembling -------------------------------------------------------------- >8
If I use ~/.fpc.cfg as indicated in instructions the error is slightly different.
8< ------------------------------------------------------------ /usr/share/lazarus/1.0.2/packager/registration/lazaruspackageintf.pas(110) Error: Assembler /opt/cross-binutils/bin/as not found, switching to external assembling
-------------------------------------------------------------- >8
however the assembler and others cross-binutils are in my path.
I also tried changing the compiler path (/usr/bin/ppcarm) in Lazarus as indicated in th instructions, but I got the same result.
I should note that I had originally configured binutils with --prefix=/usr, but I got this error. There was no target for 'make uninstall', so ran ./configure again with --prefix=/opt/cross/binutils, so I could locate and remove the files from the original run--in case I had made an error. I left /opt/cross-binutils as is and modified my path.
Here is a rundown of what I did to configure cross arm compiling: 8< ------------------------------------------------------------ download and extract binutils-2.23
./configure --target=arm-linux --disable-werror --prefix=/opt/cross-binutils make
sudo make install
sudo mv arm-linux-as{,_orig}
sudo echo '/opt/cross-binutils/bin/arm-linux-as_orig -meabi=5 $@' > /opt/cross-binutils/bin/arm-linux-as
sudo chmod +x /opt/cross-binutils/bin/arm-linux-as
sudo ln arm-linux-as as
sudo ln arm-linux-ar ar
sudo ln arm-linux-ld ld
sudo ln /usr/share/fpcsrc /opt/
sudo make crossinstall CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=/opt/cross-binutils/bin OPT=-dFPC_ARMEL INSTALL_PREFIX=/usr
modify PATH in ~/.bashrc
PATH+=":/opt/cross-binutils/bin"
-------------------------------------------------------------- >8
These are the project options:
8< ------------------------------------------------------------ -MObjFPC
-Scghi
-WR
-O1
-Tlinux
-Parm
-Xs
-XX
-vewnhi
-l
-Filib/arm-linux
-Fl../../../src/android-ndk/platforms/android-8/arch-arm/usr/lib -Fl../../../src/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/lib/gcc/arm-linux-androideabi/4.4.3
-Fu/usr/share/lazarus/1.0.2/lcl/units/arm-linux/customdrawn -Fu/usr/share/lazarus/1.0.2/lcl/units/arm-linux
-Fu/usr/share/lazarus/1.0.2/components/lazutils/lib/arm-linux -Fu../../../.lazarus/lib/units/arm-linux
-Fu.
-FUlib/arm-linux/
-FEandroid/libs/armeabi/
-oliblclapp.so.so
-dLCL
-dLCLcustomdrawn
-dANDROID
-Xd
-CpARMV6
-------------------------------------------------------------- >8 The -Fu *arm-linux* lines appear to be generated, and those paths do not exist.
Thank you.
