Recent

Author Topic: Problem building trunk Android cross compiler from Windows  (Read 455 times)

Ats

  • Newbie
  • Posts: 2
Problem building trunk Android cross compiler from Windows
« on: October 14, 2024, 04:40:07 pm »
Hello. I'm running into a problem with threads on Android, and after trying everything I could, I wanted to try using a more recent version of FPC, just in case.

I'm currently using the prebuilt release version 3.2.2 of FPC for Windows.

With it, I'm able to build the branch named fixes_3_2 without problems, but it doesn't solve my problem with threads.

But when I try to compile the trunk version of FPC, I can only compile the main thing using:

Code: Bash  [Select][+][-]
  1. PATH=C:\FPC\3.2.2\bin\i386-win32;
  2. SET FPC=C:\FPC\3.2.2\bin\i386-win32\fpc.exe
  3. make.exe clean distclean
  4. make.exe all OPT="-gw -godwarfset -O-1"
  5. make.exe install INSTALL_PREFIX=C:\FPC\trunk COPYTREE=echo

When I try to build the cross-compiler for Android:

Code: Bash  [Select][+][-]
  1. PATH=C:\FPC\3.2.2\bin\i386-win32;C:\Android\android-ndk-r21e\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin;
  2. SET FPC=C:\FPC\3.2.2\bin\i386-win32\fpc.exe
  3. SET CROSSOPT="-dANDROID"
  4. make clean crossall crossinstall OS_TARGET=android CPU_TARGET=aarch64 CROSSOPT=%CROSSOPT% INSTALL_PREFIX=C:\FPC\trunk

I get this error:

Quote
make[4]: Entering directory `C:/FPC/fpc/rtl/android'
C:/FPC/3.2.2/bin/i386-win32/gmkdir.exe -p C:/FPC/fpc/rtl/units/arm-android
arm-linux-androideabi-as  -o C:/FPC/fpc/rtl/units/arm-android/prt0.o --defsym CPU32=1 prt0.as
arm-linux-androideabi-as  -o C:/FPC/fpc/rtl/units/arm-android/dllprt0.o --defsym CPU32=1 dllprt0.as
C:/FPC/fpc/compiler/ppcrossarm.exe -Ur -Tandroid -Parm -XParm-linux-androideabi- -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FE. -FUC:/FPC/fpc/rtl/units/arm-android -darm -dRELEASE -dANDROID -CpARMv7A -CfVFPv3  -Us -Sg ../linux/system.pp
C:/FPC/fpc/compiler/ppcrossarm.exe -Ur -Tandroid -Parm -XParm-linux-androideabi- -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FE. -FUC:/FPC/fpc/rtl/units/arm-android -darm -dRELEASE -dANDROID -CpARMv7A -CfVFPv3  -Fi../objpas ../objpas/objpas.pp
C:/FPC/fpc/compiler/ppcrossarm.exe -Ur -Tandroid -Parm -XParm-linux-androideabi- -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FE. -FUC:/FPC/fpc/rtl/units/arm-android -darm -dRELEASE -dANDROID -CpARMv7A -CfVFPv3  ../objpas/sysconst.pp
C:/FPC/fpc/compiler/ppcrossarm.exe -Ur -Tandroid -Parm -XParm-linux-androideabi- -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FE. -FUC:/FPC/fpc/rtl/units/arm-android -darm -dRELEASE -dANDROID -CpARMv7A -CfVFPv3  ../unix/unixtype.pp
C:/FPC/fpc/compiler/ppcrossarm.exe -Ur -Tandroid -Parm -XParm-linux-androideabi- -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FE. -FUC:/FPC/fpc/rtl/units/arm-android -darm -dRELEASE -dANDROID -CpARMv7A -CfVFPv3  ../inc/ctypes.pp
C:/FPC/fpc/compiler/ppcrossarm.exe -Ur -Tandroid -Parm -XParm-linux-androideabi- -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FE. -FUC:/FPC/fpc/rtl/units/arm-android -darm -dRELEASE -dANDROID -CpARMv7A -CfVFPv3  ../unix/dl.pp
C:/FPC/fpc/compiler/ppcrossarm.exe -Ur -Tandroid -Parm -XParm-linux-androideabi- -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm -FE. -FUC:/FPC/fpc/rtl/units/arm-android -darm -dRELEASE -dANDROID -CpARMv7A -CfVFPv3  ../inc/strings.pp
make[4]: *** No rule to make target `ptypes.inc', needed by `baseunix.ppu'.  Stop.
make[4]: Leaving directory `C:/FPC/fpc/rtl/android'

What should I do?
Thanks for your help :)
« Last Edit: October 14, 2024, 04:47:15 pm by Ats »

TRon

  • Hero Member
  • *****
  • Posts: 3619
Re: Problem building trunk Android cross compiler from Windows
« Reply #1 on: October 14, 2024, 11:13:12 pm »
What should I do?
I just finished building the same target on my linux machine (using fpcupdeluxe) which worked for me without issues.

Perhaps/maybe something was addressed in FPC fixes so try to use the 3.2.3 compiler to build your android cross-compiler (you just build it anyway so might as well use it).

Fixes is v3.2.3, not trunk btw (which is designated 3.3.1).
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

Ats

  • Newbie
  • Posts: 2
Re: Problem building trunk Android cross compiler from Windows
« Reply #2 on: October 15, 2024, 01:08:35 am »
Quote
you just build it anyway so might as well use it
Oh, right! Thanks, the compilation is working now. And the thread problem wasn't coming from that.
Thanks for your help!

 

TinyPortal © 2005-2018