MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013332 | CMake | CMake | public | 2012-06-20 15:48 | 2016-06-10 14:31 |
Reporter | Daniel Richard G. | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | PA-RISC | OS | HP-UX | OS Version | 11.00 |
Product Version | CMake 2.8.8 | ||||
Target Version | Fixed in Version | ||||
Summary | 0013332: Can't link a shared library with cc on HP-UX | ||||
Description | Bootstrapping 2.8.8 on HP-UX 11.00 with the vendor compiler fails with [...] Linking C shared module libcmsysTestDynload.sl cd /tmp/cmake-2.8.8-test/_build-cc/Source/kwsys && /tmp/cmake-2.8.8-test/_build-cc/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/cmsysTestDynload.dir/link.txt --verbose=1 /opt/ansic/bin/cc +Z -Ae +DA2.0 +ESlit +w1 -z -Wp,-H262144 +O2 -Wl,-E,+nodefaultrpath -b -L/usr/lib -Wl,+hlibcmsysTestDynload.sl -o libcmsysTestDynload.sl CMakeFiles/cmsysTestDynload.dir/testDynload.c.o -Wl,+b/usr/lib cc: warning 488: "cc +help" invokes On-Line C reference manual. cc: warning 422: Unknown option "b" ignored. /usr/ccs/bin/ld: Unsatisfied symbols: main (Not referenced yet! Probably due to -u option) gmake[2]: *** [Source/kwsys/libcmsysTestDynload.sl] Error 1 gmake[2]: Leaving directory `/tmp/cmake-2.8.8-test/_build-cc' gmake[1]: *** [Source/kwsys/CMakeFiles/cmsysTestDynload.dir/all] Error 2 gmake[1]: Leaving directory `/tmp/cmake-2.8.8-test/_build-cc' gmake: *** [all] Error 2 For one, that -b needs to be a -Wl,-b. If I do the compiler invocation that way, I get host:/tmp/cmake-2.8.8-test/_build-cc/Source/kwsys$ /opt/ansic/bin/ cc +Z -Ae +DA2.0 +ESlit +w1 -z -Wp,-H262144 +O2 -Wl,-E,+nodefaultrpath -Wl,-b -L /usr/lib -Wl,+hlibcmsysTestDynload.sl -o libcmsysTestDynload.sl CMakeFiles/cmsys TestDynload.dir/testDynload.c.o -Wl,+b/usr/lib /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file /opt/langtools/lib/crt0.o - shared library must be position independent. Use +z or +Z to recompile. Adding -v to that gives me cc: NLSPATH is /opt/ansic/lib/nls/msg/%L/%N.cat:/opt/ansic/lib/nls/msg/C/%N.cat: cc: CCOPTS is not set. cc: INCLUDIR is INCLUDIR=/usr/include cc: LPATH is /usr/lib:/opt/langtools/lib: /usr/ccs/bin/ld /opt/langtools/lib/crt0.o -u main -z -E +nodefaultrpath -b -L/usr/lib +hlibcmsysTestDynload.sl -o libcmsysTestDynload.sl CMakeFiles/cmsysTestDynload.dir/testDynload.c.o +b/usr/lib -lc cc: Entering Link editor. /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file /opt/langtools/lib/crt0.o - shared library must be position independent. Use +z or +Z to recompile. I don't know how crt0.o is getting in there, but if I invoke ld directly without that, the link works. There is probably an option that can be given to cc(1) so that it doesn't pass crt0.o to the linker, but I'm not seeing anything along those lines in the man page... | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-06-20 15:48 | Daniel Richard G. | New Issue | |||
2012-06-20 16:09 | Brad King | Note Added: 0029782 | |||
2012-06-20 16:44 | Daniel Richard G. | Note Added: 0029787 | |||
2012-06-21 08:27 | Brad King | Note Added: 0029794 | |||
2012-06-21 08:27 | Brad King | Status | new => backlog | ||
2012-06-21 12:31 | Daniel Richard G. | Note Added: 0029799 | |||
2012-06-21 13:00 | Brad King | Note Added: 0029800 | |||
2012-06-22 09:30 | Daniel Richard G. | Note Added: 0029815 | |||
2016-06-10 14:28 | Kitware Robot | Note Added: 0042071 | |||
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved | ||
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|