• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Missing libstdc++ symlink in the 10.6 SDK from Xcode 4.3?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Jamie Kirkpatrick <email@hidden>
  • Date: Mon, 27 Feb 2012 14:28:50 +0100

OK, well I'm seeing the problem when building qt5-base.  It's compiling directly with clang and is passing the SDK path down to the compiler but I guess things are failing there somewhere?  I need to go back and verify exactly what flag it uses - perhaps its using another one that doesn't add all the search paths?  

Thanks for the very useful pointers though.  I will post back when I find more info.

On 27 February 2012 12:27, Andreas Grosam <email@hidden> 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)
Help/Unsubscribe/Update your Subscription:

This email sent to 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

References: 
 >Missing libstdc++ symlink in the 10.6 SDK from Xcode 4.3? (From: Jamie Kirkpatrick <email@hidden>)
 >Re: Missing libstdc++ symlink in the 10.6 SDK from Xcode 4.3? (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Re: Missing libstdc++ symlink in the 10.6 SDK from Xcode 4.3?
  • Next by Date: Xcode 4 rebuilds entire project
  • Previous by thread: Re: Missing libstdc++ symlink in the 10.6 SDK from Xcode 4.3?
  • Next by thread: Re: Missing libstdc++ symlink in the 10.6 SDK from Xcode 4.3?
  • Index(es):
    • Date
    • Thread