MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013884 | CMake | CMake | public | 2013-01-28 09:22 | 2013-06-03 09:05 |
Reporter | Taoki | ||||
Assigned To | |||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Intel | OS | Linux openSUSE | OS Version | 12.2 |
Product Version | CMake 2.8.8 | ||||
Target Version | Fixed in Version | ||||
Summary | 0013884: SONAME_FLAG incorrectly prefixed to libraries in link.txt & relink.txt, causes linker to fail | ||||
Description | I discovered a major problem while configuring two C++ projects with cmake. When Generating the configuration, cmake adds the word SONAME_FLAG before the name of each library in link.txt and relink.txt once. This causes the linker to fail when compiling with make. Here's the error I get with the OGRE engine: c++: error: SONAME_FLAGlibOgreMain.so.1.9.0: No such file or directory make[2]: *** [lib/libOgreMain.so.1.9.0] Error 1 make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2 make: *** [all] Error 2 After hours of digging into the issue, I found where it happens and what goes wrong. Here's the OGRE and libOgreMain example, but the problem happens with each library of projects that are affected: - After you generate your cmake configuration, open the file .../OGRE/build/OgreMain/CMakeFiles/OgreMain.dir/link.txt - Somewhere within this file, you will find the following part: -shared SONAME_FLAGlibOgreMain.so.1.9.0 - To fix it, you must manually change that to: -shared -Wl,-soname,libOgreMain.so.1.9.0 | ||||
Steps To Reproduce | - Get the source of one of the projects affected by the issue. I only noticed it with OGRE and PolyVox, other C++ codes work fine. - Unpack it and run cmake (in my case I use cmake-gui). Specify "Unix makefiles" with "Default native compilers". If the main folder is OGRE set the build folder to OGRE/build. Leave all cmake options to their defaults and Configure then Generate. Normally you should see no errors or warnings. - Now go to OGRE/build and run "make". It will start to compile, but when it gets to linking the first library you get the error: c++: error: SONAME_FLAGlibWhatever.so.1.2.3: No such file or directory | ||||
Additional Information | Experienced with cmake 2.8.8. Operating system is Linux openSUSE 12.2 KDE 4.9.5. | ||||
Tags | c++, gcc, link, linker, linux, make, makefile, relink, unix | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2013-01-28 09:22 | Taoki | New Issue | |||
2013-01-28 09:22 | Taoki | Tag Attached: linker | |||
2013-01-28 09:23 | Taoki | Tag Attached: c++ | |||
2013-01-28 09:23 | Taoki | Tag Attached: gcc | |||
2013-01-28 09:23 | Taoki | Tag Attached: make | |||
2013-01-28 09:23 | Taoki | Tag Attached: makefile | |||
2013-01-28 09:23 | Taoki | Tag Attached: link | |||
2013-01-28 09:23 | Taoki | Tag Attached: relink | |||
2013-01-28 09:23 | Taoki | Tag Attached: unix | |||
2013-01-28 09:23 | Taoki | Tag Attached: linux | |||
2013-01-29 13:46 | Brad King | Note Added: 0032174 | |||
2013-01-29 14:05 | Taoki | Note Added: 0032175 | |||
2013-01-29 14:53 | Brad King | Status | new => resolved | ||
2013-01-29 14:53 | Brad King | Resolution | open => no change required | ||
2013-06-03 09:05 | Robert Maynard | Note Added: 0033194 | |||
2013-06-03 09:05 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|