#250 closed defect (fixed)
Cmake build failure: /usr/bin/ld: cannot find -loptimized
Reported by: | king | Owned by: | diane |
---|---|---|---|
Priority: | blocker | Milestone: | release_1.1 |
Component: | Qt Gui | Version: | |
Keywords: | Cc: |
Description
For some reason why I switch the build type from Debug to Release (on Windows and Linux), Mussa no longer builds because it's trying to use -loptimized, which isn't a library. (error: /usr/bin/ld: cannot find -loptimized) Something is going wrong with the Cmake dependency finding.
On Windows, I am using Cmake 2.4.6 On Linux, I am using Cmake 2.4.5
Here is the 'make VERBOSE=1' output:
<snip> Linking CXX shared module mussa.so cd /home/king/proj/mussa/build/py && /usr/local/bin/cmake -P CMakeFiles/mussa.dir/cmake_clean_target.cmake cd /home/king/proj/mussa/build/py && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/mussa.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -O3 -DNDEBUG -shared -Wl,-soname,mussa.so -o mussa.so "CMakeFiles/mussa.dir/annot.o" "CMakeFiles/mussa.dir/annotation_colors.o" "CMakeFiles/mussa.dir/conserved_path.o" "CMakeFiles/mussa.dir/flp.o" "CMakeFiles/mussa.dir/glsequence.o" "CMakeFiles/mussa.dir/module.o" "CMakeFiles/mussa.dir/mussa.o" "CMakeFiles/mussa.dir/nway_paths.o" "CMakeFiles/mussa.dir/sequence.o" -L/home/king/proj/mussa/build/alg -L/usr/local/Trolltech/Qt-4.2.2/lib -L/usr/lib/python2.4/config -Wl,-Bstatic -lmussa_core -Wl,-Bdynamic -lboost_python -lboost_filesystem -Wl,-Bstatic -lboost_serialization -Wl,-Bdynamic -lGL -loptimized -lQtCore -lpython2.4 -Wl,-rpath,/home/king/proj/mussa/build/alg:/usr/local/Trolltech/Qt-4.2.2/lib:/usr/lib/python2.4/config /usr/bin/ld: cannot find -loptimized collect2: ld returned 1 exit status make[2]: *** [py/mussa.so] Error 1 make[2]: Leaving directory `/home/king/proj/mussa/build' make[1]: *** [py/CMakeFiles/mussa.dir/all] Error 2 make[1]: Leaving directory `/home/king/proj/mussa/build' make: *** [all] Error 2
I'm still trying to track down what is causing -loptimized to be added. So far, I know that in CMakeCache.txt, optimized shows up here:
mussa_LIB_DEPENDS:STATIC=mussa_core;/usr/lib/libboost_python.so;/usr/lib/libboos t_filesystem.so;/usr/lib/libboost_serialization.a;/usr/lib/libGL.so;optimized;/u sr/local/Trolltech/Qt-4.2.2/lib/libQtCore.so;/usr/local/Trolltech/Qt-4.2.2/lib/l ibQtCore.so;/usr/local/Trolltech/Qt-4.2.2/lib/libQtCore.so;/usr/lib/python2.4/co nfig/libpython2.4.so;
Change History (2)
comment:1 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 18 years ago
Just to include the cause behind the problem, here is the note from Diane's patch:
Fri Feb 23 11:28:10 Pacific Standard Time 2007 diane * cmake was trying to link -loptimized ticket:250 aparently QT_QTCORE_LIBRARY wasn't defined, so cmake was trying to link -loptimized. However QT_QTCORE_LIBRARY_RELASE was defined, which makes CMake happier
Fixed by Diane's patch --> changeset [521].