Problem with ld and colon after --export-dynamic option
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I downloaded 3.10.1 today and started compiling it. The compilation failed fairly soon with
$ make Linking C executable ../../bin/vtkWrapHierarchy [ 0%] Built target vtkWrapHierarchy Linking C executable ../../bin/vtkWrapPython [ 0%] Built target vtkWrapPython Linking C executable ../../bin/vtkWrapPythonInit [ 0%] Built target vtkWrapPythonInit Linking CXX shared library ../../../bin/libvtksys.so [ 0%] Built target vtksys Linking C shared library ../../../bin/libvtkzlib.so [ 1%] Built target vtkzlib Linking C executable ../../../../bin/H5detect /usr/bin/ld: unrecognized option '--export-dynamic;' /usr/bin/ld: use the --help option for usage information collect2: ld returned 1 exit status make[2]: *** [bin/H5detect] Error 1 make[1]: *** [VTK/Utilities/vtkhdf5/src/CMakeFiles/H5detect.dir/all] Error 2 make: *** [all] Error 2
Reason for this is the colon after --export-dynamic: $ grep -inR "Wl,--export" * CMakeCache.txt:476:MPI_LINK_FLAGS:STRING=-Wl,--export-dynamic VTK/Utilities/vtkhdf5/src/CMakeFiles/H5make_libsettings.dir/link.txt:1:/usr/bin/gcc -std=c99 -fomit-frame-pointer -finline-functions -fno-common -w -fmessage-length=0 -O3 -DNDEBUG -Wl,--export-dynamic; CMakeFiles/H5make_libsettings.dir/H5make_libsettings.c.o -o ../../../../bin/H5make_libsettings -rdynamic VTK/Utilities/vtkhdf5/src/CMakeFiles/H5detect.dir/link.txt:1:/usr/bin/gcc -std=c99 -fomit-frame-pointer -finline-functions -fno-common -w -fmessage-length=0 -O3 -DNDEBUG -Wl,--export-dynamic; CMakeFiles/H5detect.dir/H5detect.c.o -o ../../../../bin/H5detect -rdynamic
If I remove the colon in the two files above everything works fine.