Re: Missing libstdc++ symlink in the 10.6 SDK from Xcode 4.3?
Re: Missing libstdc++ symlink in the 10.6 SDK from Xcode 4.3?
- Subject: Re: Missing libstdc++ symlink in the 10.6 SDK from Xcode 4.3?
- From: Andreas Grosam <email@hidden>
- Date: Tue, 28 Feb 2012 11:09:50 +0100
On Feb 27, 2012, at 7:56 PM, Jamie Kirkpatrick wrote:
> Seems that clang++ isn't behaving itself like llvm-g++. If I force the use of llvm-g++ things build as expected: clang++ doesn't seem to add the correct directories to the search path as you indicated it should. Is this a bug?
It would be worth to know which library path clang++ uses. It seems, we couldn't figure out that.
If you get actually linker errors when compiling with Xcode using clang and the usual setup - then this would be certainly a bug. However, I don't get a linker error. On the other hand, unless we know which library clang uses and whether this path is actually correct, it's worth to investigate further. To me, the paths set in gcc look like a mess. Many of them just are plainly wrong.
So, I would appreciate it if somebody else could help here.
Regards
Andreas
>
> --
> jkp
>
>
> On Monday, 27 February 2012 at 12:27, Andreas Grosam wrote:
>
>>
>> On Feb 27, 2012, at 8:38 AM, Jamie Kirkpatrick wrote:
>>
>>> Can someone confirm if they see the same thing as me here:
>>>
>>> jkp@KidA [09:48:39] [~] -> % ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libstdc++* /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libstdc++-static.a /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libstdc++.6.0.9.dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libstdc++.6.dylib
>>>
>>> This causes problems for any code that tries to link to libstdc++ without specifying a version.
>>
>> When building with Xcode and Base SDK set to 10.6, I get no linker errors. Should we?
>>
>> When building with Xcode you should specify the Base SDK. This sets the compiler option -sysroot, e.g.:
>> -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
>>
>> Internally, the driver uses this path to set library paths correspondingly.
>>
>> If you investigate a bit deeper, you get this information with:
>>
>> $ g++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -print-search-dirs
>>
>> This prints out a lot of paths, including the *actual* library search path for the standard libs, e.g.:
>>
>> ...
>> libraries: =/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/lib/i686-apple-darwin11/4.2.1/x86_64/
>> :/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/lib/x86_64/
>> :/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin11/4.2.1/x86_64/
>> ...
>> ...
>> :/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/
>> ...
>>
>>
>> The first path that contains a file or link 'libstdc++.dylib' is the last path, shown in the partial list above. This is a link which points to /usr/lib/libstdc++.6.dylib which in turn points to /usr/lib/libstdc++.6.0.9.dylib.
>>
>>
>> The product is finally dynamically linked against
>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
>> on my Lion 10.7.3.
>>
>>
>> Unfortunately, clang++ does not print much useful (that is complete) information with option -print-search-dirs.
>>
>>
>>
>> But FWIW, the sheer number of paths printed with option -print-search-dirs worries me whether this is actually correct.
>>
>>
>> Regards
>> Andreas
>>
>>
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Xcode-users mailing list (email@hidden (mailto:email@hidden))
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden (mailto:email@hidden)
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden