MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013479 | CMake | CMake | public | 2012-08-17 05:23 | 2013-01-09 14:05 |
Reporter | Markus Blatt | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86_64 | OS | GNU/Linux | OS Version | Debian wheezy |
Product Version | CMake 2.8.9 | ||||
Target Version | CMake 2.8.10 | Fixed in Version | CMake 2.8.10 | ||
Summary | 0013479: add_library documentation does not mention POSITION_INDEPENDENT_CODE property | ||||
Description | I need to used the object libraries for building libs out of serveral convenient libraries. When trying to build shared libraries by using set(BUILD_SHARED_LIBS ON) the compilation with gcc fails with "[100%] Building CXX object CMakeFiles/a.dir/dummy.cc.o [100%] Built target a Linking CXX shared library libb.so /usr/bin/ld: CMakeFiles/a.dir/dummy.cc.o: relocation R_X86_64_32 against `_ZSt4cout' can not be used when making a shared object; recompile with -fPIC CMakeFiles/a.dir/dummy.cc.o: could not read symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [libb.so] Error 1 make[1]: *** [CMakeFiles/b.dir/all] Error 2 make: *** [all] Error 2 " | ||||
Steps To Reproduce | Setup the attached testcase and call cmake && make | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://public.kitware.com/Bug/file/4426/testcase.tar.gz | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-08-17 05:23 | Markus Blatt | New Issue | |||
2012-08-17 05:23 | Markus Blatt | File Added: testcase.tar.gz | |||
2012-08-17 08:36 | Brad King | Note Added: 0030688 | |||
2012-08-31 06:20 | Markus Blatt | Note Added: 0030807 | |||
2012-08-31 07:40 | Brad King | Note Added: 0030809 | |||
2012-08-31 07:40 | Brad King | Assigned To | => Brad King | ||
2012-08-31 07:40 | Brad King | Priority | high => normal | ||
2012-08-31 07:40 | Brad King | Severity | major => minor | ||
2012-08-31 07:40 | Brad King | Status | new => resolved | ||
2012-08-31 07:40 | Brad King | Resolution | open => fixed | ||
2012-08-31 07:40 | Brad King | Fixed in Version | => CMake 2.8.10 | ||
2012-08-31 07:40 | Brad King | Target Version | => CMake 2.8.10 | ||
2012-08-31 07:40 | Brad King | Summary | buildig shared libs from object libraries fails because of missing -fPIC opion => add_library documentation does not mention POSITION_INDEPENDENT_CODE property | ||
2013-01-09 14:05 | Robert Maynard | Note Added: 0032083 | |||
2013-01-09 14:05 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|