[fpc-devel] fpc compiler is unable to link on OSX Mavericks

Michael Ring mail at michael-ring.org
Fri Oct 4 14:21:45 CEST 2013


XR does the trick... I will check later today if the installation of the 
fpc packages still works out of the box or if the missing crt1.o will 
cause a problem for new users.

on commandline-tools:
the funny thing is that XCode (5.01 GA) does not show command line 
package tools package in 'Downloads' anymore on my system, not sure if 
this is because I updated my system or because they changed the way that 
the commandline tools are installed.

Michael

[ring at macbookpro devel]$ fpc hello.pas 
-XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
Free Pascal Compiler version 2.6.2 [2013/02/03] for i386
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Darwin for i386
Compiling hello.pas
Assembling (pipe) hello.s
Linking hello
4 lines compiled, 0.1 sec


[ring at macbookpro devel]$ clang -print-search-dirs
programs: 
=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
libraries: 
=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0

[ring at macbookpro devel]$ ls -l 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/lib/darwin
total 272
-rw-r--r--@ 1 ring  admin    7832 Sep 26 22:09 libclang_rt.10.4.a
-rw-r--r--@ 1 ring  admin  263596 Sep 26 22:09 libclang_rt.cc_kext.a
-rw-r--r--@ 1 ring  admin  123532 Sep 26 22:09 libclang_rt.cc_kext_ios5.a
-rw-r--r--@ 1 ring  admin    1824 Sep 24 04:34 libclang_rt.eprintf.a
-rw-r--r--@ 1 ring  admin   20484 Sep 26 22:09 libclang_rt.ios.a
-rw-r--r--@ 1 ring  admin    5968 Sep 24 04:34 libclang_rt.osx.a
-rw-r--r--@ 1 ring  admin   54564 Sep 26 22:09 libclang_rt.profile_ios.a
-rw-r--r--@ 1 ring  admin   25504 Sep 26 22:09 libclang_rt.profile_osx.a


Am 04.10.13 13:15, schrieb Jonas Maebe:
>
> On 04 Oct 2013, at 13:03, Michael Ring wrote:
>
>> I today installed the GA of Mavericks, it seems that crt1.o was 
>> deleted from /usr/lib:
>>
>> [ring at macbookpro devel]$ fpc hello.pas
>> Free Pascal Compiler version 2.6.2 [2013/02/03] for i386
>> Copyright (c) 1993-2012 by Florian Klaempfl and others
>> Target OS: Darwin for i386
>> Compiling hello.pas
>> Assembling (pipe) hello.s
>> Linking hello
>> ld: file not found: /usr/lib/crt1.o
>> An error occurred while linking
>> hello.pas(4,1) Error: Error while linking
>> hello.pas(4,1) Fatal: There were 1 errors compiling module, stopping
>>
>> crt1.o can now be found in the following places:
>>
>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/crt1.o 
>>
>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/crt1.o 
>>
>
> If this is the case even after *re*installing the command line tools 
> in case you upgraded (which I assume you did, otherwise you'd 
> presumably get other errors), then you will have to explicitly specify 
> a location of an SDK via 
> -XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk 
> or 
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
>
>
> Jonas
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>




More information about the fpc-devel mailing list