# [fpc-devel] Error building branch targetandroid

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Fri Sep 14 15:49:11 CEST 2012

```Thanks,

Some strange things happen. It generates the ppas.bat file as
utils/fppkg/bin/arm-android/ppas.bat, but running the file in this
position causes all kinds of errors because the paths inside the file
seam to suppose that it is located in utils/fppkg/

So I copied the file to utils/fppkg/ and ran it there, which in turn
results in an error about not finding -lc:

C:\Programas\android-ndk-r8\toolchains\arm-linux-androideabi-4.4.3\prebuilt\wind
ows\bin\arm-linux-androideabi-ld.exe: cannot find -lc
An error occured while linking bin\arm-android\fppkg
Aby kontynuować, naciśnij dowolny klawisz . . .

So I though that maybe -Fl is missing, so now I changed my script to:

SET PATH=;C:\Programas\lazarus31_fpc260\fpc\2.6.0\bin\i386-win32;C:\Programas\android-ndk-r8\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin
make crossinstall CPU_TARGET=arm OS_TARGET=android
OPT="-FlC:/Programas/android-ndk-r7b/platforms/android-8/arch-arm/usr/lib/"
CROSSOPT="-CpARMv6 -CfSoft" BINUTILSPREFIX=arm-linux-androideabi-
INSTALL_PREFIX=output
pause

Note that due to some kind of hellish issue I indeed needed to write

But even after doing that, the result seams to be the same. I get the
same linking error, and ppas.bat did not change:

@echo off
SET THEFILE=bin\arm-android\fppkg
C:\Programas\android-ndk-r8\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-ld.exe
goto end
:asmend
echo An error occured while assembling %THEFILE%
goto end