[cmake-developers] [CMake 0013765]: Failed to link against framework in /Library/Framework when CMAKE_OS_* variables are set
Mantis Bug Tracker
mantis at public.kitware.com
Fri Nov 30 15:02:22 EST 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13765
======================================================================
Reported By: Jean-Christophe Fillion-Robin
Assigned To:
======================================================================
Project: CMake
Issue ID: 13765
Category: CMake
Reproducibility: always
Severity: major
Priority: high
Status: new
======================================================================
Date Submitted: 2012-11-30 22:02 WAST
Last Modified: 2012-11-30 22:02 WAST
======================================================================
Summary: Failed to link against framework in
/Library/Framework when CMAKE_OS_* variables are set
Description:
Failed to link against framework in /Library/Framework when CMAKE_OS_* variables
are set
The problem occurs when using:
- CMake 2.8.10.2
- mac OSX 10.8
- XCode Version 4.5.2 (4G2008a)
- g++ --version i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple
Inc. build 5658) (LLVM build 2336.11.00)
After installing qt 4.7.4:
ftp://ftp.qt.nokia.com/qt/source/qt-mac-opensource-4.7.4.dmg
This small project allows to reproduce the problem.
$ git clone git://github.com/jcfr/CMakeWithQtFramework.git
$ mkdir CMakeWithQtFramework-build
$ cd CMakeWithQtFramework-build
$ cmake ../
[…]
$ make VERBOSE=1
[…]
Linking CXX executable foo
"/Volumes/Dashboards/Support/CMake 2.8-10.app/Contents/bin/cmake" -E
cmake_link_script CMakeFiles/foo.dir/link.txt --verbose=1
/usr/bin/c++ -arch x86_64 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
-mmacosx-version-min=10.8 -Wl,-search_paths_first
-Wl,-headerpad_max_install_names CMakeFiles/foo.dir/main.cpp.o -o foo
-framework QtWebKit -framework QtXmlPatterns -framework QtGui -framework
QtNetwork -framework QtCore
ld: framework not found QtWebKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [foo] Error 1
make[1]: *** [CMakeFiles/foo.dir/all] Error 2
make: *** [all] Error 2
By manually adding -F /Library/Frameworks to the build line, it succeed.
/usr/bin/c++ -arch x86_64 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
-mmacosx-version-min=10.8 -Wl,-search_paths_first
-Wl,-headerpad_max_install_names CMakeFiles/foo.dir/main.cpp.o -o foo
-framework QtWebKit -framework QtXmlPatterns -framework QtGui -framework
QtNetwork -framework QtCore -F /Library/Frameworks/
I would assume that CMake should automatically add the "-F /Library/Frameworks/"
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-11-30 22:02 Jean-Christophe Fillion-RobinNew Issue
======================================================================
More information about the cmake-developers
mailing list