Code Monkey home page Code Monkey logo

Comments (5)

LongDirtyAnimAlf avatar LongDirtyAnimAlf commented on September 1, 2024

Confirmed.
Thanks for the extensive report. Will look into it !

from fpcupdeluxe.

LongDirtyAnimAlf avatar LongDirtyAnimAlf commented on September 1, 2024

Would you mind trying one of these:
https://github.com/newpascal/fpcupdeluxe/releases/tag/v1.4.0o
Thanks !

from fpcupdeluxe.

michaliskambi avatar michaliskambi commented on September 1, 2024

Thank you for such quick fix! I tested fpcupdeluxe-x86_64-darwin-cocoa.app.zip from https://github.com/newpascal/fpcupdeluxe/releases/tag/v1.4.0o . I can now build a cross-compiler for arm/darwin OK.

However, the problem still exists when trying to build a cross-compiler for iPhoneSimulator (i-sim) / i386 or x86_64. They fail with an error about ___keymgr_dwarf2_register_sections:

For iPhoneSimulator on i386:

 [2017-09-27 04:32:20.404 Info] /Users/michalis/fpcupdeluxe/fpcsrc/compiler/ppcross386 -Tiphonesim -Pi386 -Ur -Xs -O2 -n -Fui386 -Fusystems -Fu/Users/michalis/fpcupdeluxe/fpcsrc/rtl/units/i386-iphonesim -Fii386 -FD/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/bin -FE. -FUi386/units/i386-iphonesim -dRELEASE -XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -FD/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/bin -WP5.1 -vw-n-h-l-d-u-t-p-c- -ap -dREVINC -di386 -dGDB -dBROWSERLOG -Fux86 -Sew -XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -FD/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/bin -WP5.1    -dREVINC -di386 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pas

 [2017-09-27 04:32:35.024 Info] ld: warning: URGENT: building for iOS, but linking in object file (/usr/lib/crt1.o) built for OSX. Note: This will be an error in the future.
ld: warning: object file (/usr/lib/crt1.o) was built for newer OSX version (10.4) than being linked (5.1)

 [2017-09-27 04:32:35.224 Info] Undefined symbols for architecture i386:
  "___keymgr_dwarf2_register_sections", referenced from:
      __start in crt1.o

 [2017-09-27 04:32:35.250 Info] ld: symbol(s) not found for architecture i386
An error occurred while linking 
pp.pas(250,36) Error: Error while linking

For iPhoneSimulator on x86_64:

 [2017-09-27 04:35:41.497 Info] /Users/michalis/fpcupdeluxe/fpcsrc/compiler/ppcrossx64 -Tiphonesim -Ur -Xs -O2 -n -Fux86_64 -Fusystems -Fu/Users/michalis/fpcupdeluxe/fpcsrc/rtl/units/x86_64-iphonesim -Fix86_64 -FD/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/bin -FE. -FUx86_64/units/x86_64-iphonesim -dRELEASE -XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -FD/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/bin -vw-n-h-l-d-u-t-p-c- -ap    -dREVINC -dx86_64 -dGDB -dBROWSERLOG -Fux86 -Sew pp.pas

 [2017-09-27 04:35:54.192 Info] ld: warning: URGENT: building for iOS, but linking in object file (/usr/lib/crt1.o) built for OSX. Note: This will be an error in the future.
ld: warning: object file (/usr/lib/crt1.o) was built for newer OSX version (10.4) than being linked (7.0)

 [2017-09-27 04:35:54.350 Info] Undefined symbols for architecture x86_64:
  "___keymgr_dwarf2_register_sections", referenced from:
      __start in crt1.o

 [2017-09-27 04:35:54.373 Info] ld: symbol(s) not found for architecture x86_64
An error occurred while linking 
pp.pas(250,36) Error: Error while linking

As far as I see, the building commands still do make all ..., not make crossall ..., thus they try to build a compiler that could be executed on iPhoneSimulator "OS", which is more than we need (we only need a compiler that can be executed on current OS, and can target iPhoneSimulator "OS").

I checked that replacing "all" with "crossall" helps for i-sim/i386 by performing the same commands as fpcupdeluxe from the command-line:

$ cd ~/fpcupdeluxe/fpcsrc/

$ make "FPC=/Users/michalis/fpcupdeluxe/fpcbootstrap/ppcx64" "--directory=/Users/michalis/fpcupdeluxe/fpcsrc" "INSTALL_PREFIX=/Users/michalis/fpcupdeluxe/fpc" "CROSSBINDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/bin" "all" "CPU_SOURCE=x86_64" "OS_SOURCE=darwin" "OS_TARGET=iphonesim" "CPU_TARGET=x86_64" "NOGDBMI=1" "CROSSOPT=-XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -FD/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/bin" "OPT=-vw-n-h-l-d-u-t-p-c- -ap"
...
# fails with
Undefined symbols for architecture x86_64:
  "___keymgr_dwarf2_register_sections", referenced from:
      __start in crt1.o


# now execute the same thing with "crossall" instead of "all"

$ make "FPC=/Users/michalis/fpcupdeluxe/fpcbootstrap/ppcx64" "--directory=/Users/michalis/fpcupdeluxe/fpcsrc" "INSTALL_PREFIX=/Users/michalis/fpcupdeluxe/fpc" "CROSSBINDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/bin" "crossall" "CPU_SOURCE=x86_64" "OS_SOURCE=darwin" "OS_TARGET=iphonesim" "CPU_TARGET=x86_64" "NOGDBMI=1" "CROSSOPT=-XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -FD/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/bin" "OPT=-vw-n-h-l-d-u-t-p-c- -ap"

... goes OK

from fpcupdeluxe.

LongDirtyAnimAlf avatar LongDirtyAnimAlf commented on September 1, 2024

Confirmed.
I have updated the current release to fix the iphonesim cross-compilers.
So, please re-download again the current release (1.4.0o). These contain the bugfixes.
They work 100% on my system now.

crossdarwinx64

from fpcupdeluxe.

michaliskambi avatar michaliskambi commented on September 1, 2024

Thank you! Things are working perfectly now, I can build and rebuild all cross-compilers that I tested.

I can now easily test Castle Game Engine on iOS with FPC 3.1.1 and all cross-compilers build by fpxupdeluxe. I have added notes on my iOS wiki page ( https://github.com/castle-engine/castle-engine/wiki/iOS ) pointing to use fpcupdeluxe to try FPC 3.1.1 on iOS easily. Many, many thanks again!

from fpcupdeluxe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.