Welcome, Guest
Username: Password: Remember me
CodeTyphon MacOS Development, discussions and problems
  • Page:
  • 1

TOPIC:

Cannot build FPC or IDE on MacOS Sierra 8 years 1 month ago #10024

  • rarnu
  • rarnu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 9
  • Thank you received: 0
MacOS Sierra moved almost all libs away from /usr/lib
Now they are in "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib"

While compiling, we will meet the error like that in screenshot:


I have tried to set the environment variable:


But it does not work...

What should I do now?

Please Log in or Create an account to join the conversation.

Cannot build FPC or IDE on MacOS Sierra 8 years 1 month ago #10025

  • rarnu
  • rarnu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 9
  • Thank you received: 0
Yet still no answer. I solved it myself. Now share my solution.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Step 1. Update your MacPorts
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Step 2. Unpack fpc archives and change fpc.cfg

$ 7z x ./binfpc/i386-darwin.7z
$ 7z x ./binfpc/x86_64-darwin.7z

Find fpc.cfg (twice) and add this line at last:
-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib

Repack and replace the archives

$ 7z a i386-darwin.7z i386-darwin
$ 7z a x86_64-darwin.7z x86_64-darwin
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Step 3. Make Symlinks

In this step you must remove the Mac's security lock first.
Reboot your Mac and press Command+R when booting up. This will take you to the recovery mode. Then go into Utilities -> Terminal and type the command:

# csrutil disable
# reboot

Now you can make any symlinks in "/usr/lib"

Run this script for make the symlinks:

#!/bin/sh
MACSDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
MACSDK_LIB=${MACSDK}/usr/lib
cd /usr/lib
sudo ln -s ${MACSDK_LIB}/crt1.o crt1.o
sudo ln -s ${MACSDK_LIB}/crt1.10.5.o crt1.10.5.o
sudo ln -s ${MACSDK_LIB}/crt1.10.6.o crt1.10.6.o
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Step 4. Build FPC and Typhon IDE by official steps.

Please Log in or Create an account to join the conversation.

Cannot build FPC or IDE on MacOS Sierra 8 years 1 month ago #10026

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Thanks Sir
please, give us time to solve the problem
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1