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

Ng Pheng Siong ngps at objectmemetic.com
Tue Sep 21 06:59:48 CEST 2021


On Mon, Jul 19, 2021 at 04:10:28PM +0000, conlin664 via fpc-pascal wrote:
>  Okay, I'm still trying to get past one issue.When trying to compile for iphonesim I get errors:

I hope it is ok to follow up to an oldish thread.

I am on an Intel MBP, MacOS 10.15.7 Catalina, XCode 12.4.  I installed FPC
3.2.0 from the download DMG. I then checked out fpc_source from Gitlab, and
from it built a local installation for 3.2.2.

Using this 3.2.2, building the aarch64 iOS cross compiler completed,
although I haven't tested it yet. But I can't get the iphonesim target to
build. I've tried several combinations of the make command line (trying out
stuff I see in manpages or on the web). Here's one attempt:

% echo $IOS_SDK
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
% make FPC="<my local ppcx64>" \
  CROSSOPT="-ap -XR${IOS_SDK} -ao-isysroot${IOS_SDK} -k\"-syslibroot ${IOS_SDK}\"" \
  CPU_TARGET=x86_64 OS_TARGET=iphonesim \
  CPU_SOURCE=x86_64 OS_SOURCE=darwin \
  all
<some minutes later>
/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'

Any hints appreciated.

Pheng


More information about the fpc-pascal mailing list