[CMake] OSX deployment target confusion for 2.8.10

Matthew Brett matthew.brett at gmail.com
Wed Nov 7 15:14:56 EST 2012


Hi,

On Wed, Nov 7, 2012 at 5:33 AM, Brad King <brad.king at kitware.com> wrote:
> On 11/06/2012 03:29 PM, Matthew Brett wrote:
>> $ ls /Library/Frameworks | grep Qt
>> Qt3Support.framework
>> QtCore.framework
>
> Okay.
>
>> $ ls -al /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/
>> total 8
>> drwxr-xr-x  4 root  wheel  136 Jul 13 21:21 .
>> drwxr-xr-t  3 root  wheel  102 Feb 14  2011 ..
>> lrwxr-xr-x  1 root  wheel   19 Jul 13 21:21 Frameworks -> /Library/Frameworks
>> drwxr-xr-x  3 root  wheel  102 Jan  4  2011 PluginManager.framework
>
> This looks incorrect.  Why does the Frameworks/ directory contain
> a Frameworks symlink?  That means one would need a search path like
>
>  /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/Frameworks
>
> to find them.  Did something modify this SDK since it was installed?

If so, I don't know what modified the SDK.  The link is later than the
rest of the installation, but I suppose that may have been the
postinstall script.  Now I search, I see this:

http://bugs.python.org/issue14018

I do have (as for the issue) xcode 3.2.6

I don't have the same strange link on another machine with 10.6 and
xcode 3.2.6, although the installations seem otherwise identical:

$ xcodebuild -version
Xcode 3.2.6
Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0
BuildVersion: 10M2518

>> Output of adding -v:
>
> I think we need "-Wl,-v" to get the linker to tell us what framework
> search path it is using.  Try with and without the -isysroot option.

With -isysroot:

collect2 version 4.2.1 (Apple Inc. build 5666) (dot 3) (i686 Darwin)
/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld -dynamic -arch x86_64
-macosx_version_min 10.6 -syslibroot /Developer/SDKs/MacOSX10.6.sdk
-weak_reference_mismatches non-weak -o shiboken -lcrt1.10.6.o
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1
-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib -L.
-L/Users/mb312/usr/local/lib -L.
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1
-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../..
-search_paths_first -headerpad_max_install_names
CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o ../ApiExtractor/libapiextractor.a
-framework QtCore -framework QtXml -framework QtXmlPatterns -framework
QtXml -v -lstdc++ -lSystem -lgcc -lSystem
@(#)PROGRAM:ld  PROJECT:ld64-97.17
Library search paths:
	/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
	/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
	/Developer/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1
	/Developer/SDKs/MacOSX10.6.sdk/usr/lib
	.
	/Users/mb312/usr/local/lib
	.
	/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1
	/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1
	/Developer/SDKs/MacOSX10.6.sdk/usr/lib/i686-apple-darwin10/4.2.1
	/Developer/SDKs/MacOSX10.6.sdk/usr/lib
	/Developer/SDKs/MacOSX10.6.sdk/usr/lib
	/Developer/SDKs/MacOSX10.6.sdk/usr/local/lib
Framework search paths:
	/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/
	/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/
ld: framework not found QtCore
collect2: ld returned 1 exit status

Without:

collect2 version 4.2.1 (Apple Inc. build 5666) (dot 3) (i686 Darwin)
/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld -dynamic -arch x86_64
-macosx_version_min 10.6 -weak_reference_mismatches non-weak -o
shiboken -lcrt1.10.6.o -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/i686-apple-darwin10/4.2.1 -L. -L/Users/mb312/usr/local/lib
-L. -L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.. -search_paths_first
-headerpad_max_install_names CMakeFiles/shiboken.dir/generator.cpp.o
CMakeFiles/shiboken.dir/shiboken/cppgenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/headergenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/overloaddata.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokengenerator.cpp.o
CMakeFiles/shiboken.dir/shiboken/shibokennormalize.cpp.o
CMakeFiles/shiboken.dir/main.cpp.o ../ApiExtractor/libapiextractor.a
-framework QtCore -framework QtXml -framework QtXmlPatterns -framework
QtXml -v -lstdc++ -lSystem -lgcc -lSystem
@(#)PROGRAM:ld  PROJECT:ld64-97.17
Library search paths:
	/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
	/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
	/usr/lib/i686-apple-darwin10/4.2.1
	.
	/Users/mb312/usr/local/lib
	.
	/usr/lib/gcc/i686-apple-darwin10/4.2.1
	/usr/lib/gcc/i686-apple-darwin10/4.2.1
	/usr/lib/i686-apple-darwin10/4.2.1
	/usr/lib
	/usr/lib
	/usr/local/lib
Framework search paths:
	/Library/Frameworks/
	/System/Library/Frameworks/

- I guess that explains it...  Hum, how frustrating to have to worry
about the bad symlink.

Thanks,

Matthew


More information about the CMake mailing list