[fpc-pascal] Trying to update to: Xcode 12.5, FPC 3.2.2

Jonas Maebe jonas at freepascal.org
Sun Oct 31 18:44:06 CET 2021


On 21/09/2021 06:59, Ng Pheng Siong via fpc-pascal wrote:
> /Users/ngps/src/fpc_source/compiler/ppcrossx64 -Tiphonesim -Ur -Xs -O2 -n -Fux86_64 -Fusystems -Fu/Users/ngps/src/fpc_source/rtl/units/x86_64-iphonesim -Fix86_64 -FEx86_64/bin/x86_64-iphonesim -FUx86_64/units/x86_64-iphonesim -dRELEASE -ap -XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -ao-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -k"-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"    -DD2021/09/20 -dx86_64 -dGDB -Fux86 -Fix86 -Sew -o/Users/ngps/src/fpc_source/compiler/ppcx64 pp.pas
> ld: building for iOS, but linking in object file built for iOS Simulator, file 'x86_64/units/x86_64-iphonesim/pp.o'
> pp.pas(288,36) Error: Error while linking
> pp.pas(288,36) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> make[3]: *** [ppcx64] Error 1
> make[2]: *** [cycle] Error 2
> make[1]: *** [compiler_cycle] Error 2
> make: *** [build-stamp.x86_64-iphonesim] Error 2
> 
> Here's the error:
> 
>    ld: building for iOS, but linking in object file built for iOS Simulator, file 'x86_64/units/x86_64-iphonesim/pp.o'

I've finally looked into this and found the error: the compiler has to 
specify -ios_simulator_version_min rather than -iphoneos_version_min to 
the linker when targeting the simulator. This is fixed in latest trunk 
and in the fixes_3_2 branch.

You might be able to also work around it on 3.2.2 by adding 
CROSSOPT="-k-ios_simulator_version_min -9.0" to the make command line, 
and also add those parameters when compiling a program for the iphonesim 
target.


Jonas


More information about the fpc-pascal mailing list