PB 5.62 - OS X Lion 10.7.5 - Linker Error crt1.10.6.o

Mac OSX specific forum
PeDe
Enthusiast
Enthusiast
Posts: 284
Joined: Sun Nov 26, 2017 3:13 pm

PB 5.62 - OS X Lion 10.7.5 - Linker Error crt1.10.6.o

Post by PeDe »

I have an old MacBook Core2Duo from 2007, and have PureBasic 5.62 x64 installed and also older versions. But there is a linker error saying that the Xcode CommandLine tools need to be installed.
Xcode is installed, I have also compiled e.g. libusb with it. The Command Line Tools are also installed.

Code: Select all

Xcode 4.6.3
Command Line Tools: Xcode 4.6.3 (4H1503) - /Applications/Xcode.app

When I start PB via sudo, I get an error message that the library crt1.10.6.o was not found.

Code: Select all

PB 5.62  x64/ 5.43 / 5.31 …
sudo /Applications/PureBasic562.app/Contents/MacOS/PureBasic

PureBasic - Linker error
ld: library not found for -lcrt1.10.6.o
collect2: ld returned 1 exit status

The search in the terminal produces the following result:

Code: Select all

find / -name crt1.10.6.o

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/crt1.10.6.o
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/crt1.10.6.o
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/crt1.10.6.o

I edited the /etc/paths file and added the paths to Xcode, they were not there:

Code: Select all

set
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/usr/X11/bin

I can call g++ or gcc in the terminal:

Code: Select all

g++ -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

I have searched the internet and forum for a long time, but have not found a solution.
Does anyone know a trick?

Peter
Wolfram
Enthusiast
Enthusiast
Posts: 604
Joined: Thu May 30, 2013 4:39 pm

Re: PB 5.62 - OS X Lion 10.7.5 - Linker Error crt1.10.6.o

Post by Wolfram »

Please try to repair your permissions.
macOS Catalina 10.15.7
PeDe
Enthusiast
Enthusiast
Posts: 284
Joined: Sun Nov 26, 2017 3:13 pm

Re: PB 5.62 - OS X Lion 10.7.5 - Linker Error crt1.10.6.o

Post by PeDe »

Thank you, I have now done that. There was a long list of iTunes and the language packs and a few other files.
But with PureBasic nothing has changed, the command line tools are not found. Not even after a restart.

Peter
PeDe
Enthusiast
Enthusiast
Posts: 284
Joined: Sun Nov 26, 2017 3:13 pm

Re: PB 5.62 - OS X Lion 10.7.5 - Linker Error crt1.10.6.o

Post by PeDe »

I am one small step further. When I start PB from the terminal with 'open purebasic562.app', I immediately get the error message about the missing crt1.10.6.o file when executing code.
The error message that the command line tools are not installed no longer appears. I suspect there is something wrong with the paths.

Peter
PeDe
Enthusiast
Enthusiast
Posts: 284
Joined: Sun Nov 26, 2017 3:13 pm

Re: PB 5.62 - OS X Lion 10.7.5 - Linker Error crt1.10.6.o

Post by PeDe »

I have now installed Xcode Tools 3.0.0 and PB 5.62 x64 works without errors.

Peter
Post Reply