[CMake] can't remove RPATH from libtcl8.5.so (Linux) CMake Git version

kent williams nkwmailinglists at gmail.com
Wed Apr 21 16:02:58 EDT 2010


I noticed that for some inscrutable reason, the Tcl install makes the
library read-only, so I use this to fix the permissions, but it didn't
make the error go away:

ExternalProject_Add_Step(${proj} after_install
COMMAND chmod u+w ${BRAINSTracer_BINARY_DIR}/lib/libtcl8.5.so
COMMENT "----------------------
${BRAINSTracer_BINARY_DIR}/lib/libtcl8.5.so installed read-only!
--------"
DEPENDS ${BRAINSTracer_BINARY_DIR}/lib/libtcl8.5.so
WORKING_DIRECTORY ${BRAINSTracer_BINARY_DIR}/lib
ALWAYS 1
)

And file(RPATH_REMOVE) a new command? It isn't in the on-line CMake
man page for 2.8!

On Wed, Apr 21, 2010 at 2:38 PM, kent williams
<nkwmailinglists at gmail.com> wrote:
> I downloaded the current Git version of CMake, and it solved that problem.
>
> Now I'm running into a new problem. As it happens, we build our own
> TCL 8.5.7, and so a Linux fixup_bundle
> needs to/wants to remove the RPATH from the library.   But for some
> reason it can't open libtcl8.5.so to fiddle with the RPATH.  Any ideas
> what the heck is going on?
>
>
> -- 81/204: copying '/scratch/kent/newbuild/BT-build/lib/libtcl8.5.so'
> CMake Error at /opt/cmake-2.9.20100421/share/cmake-2.9/Modules/BundleUtilities.cmake:431
> (file):
>  file RPATH_REMOVE could not remove RPATH from file:
>
>    /scratch/kent/newbuild/BT-build/bin/libtcl8.5.so
>
>  Error opening file for update.
> Call Stack (most recent call first):
>  /opt/cmake-2.9.20100421/share/cmake-2.9/Modules/BundleUtilities.cmake:531
> (copy_resolved_item_into_bundle)
>  cmake_install.cmake:54 (fixup_bundle)
>
>
> On Tue, Apr 20, 2010 at 3:08 PM, Clinton Stimpson <clinton at elemtech.com> wrote:
>>
>> To clarify, the patch I submitted saves you from debugging and figuring out
>> what the real problem is.
>>
>> The actual solution is to use the last parameter of fixup_bundle() and pass in
>> "${QT_BINARY_DIR};${QT_LIBRARY_DIR}"
>>
>> Clint
>>
>> On Tuesday 20 April 2010 01:46:25 pm Clinton Stimpson wrote:
>>> I've already made a patch to fix this problem and put it in the bug tracker
>>> (along with a couple other patches).
>>>
>>> Clint
>>>
>>> On Tuesday 20 April 2010 01:42:50 pm kent williams wrote:
>>> > Well I found the magic incantation on OS X to get fixup_bundle work.
>>> > Now I'd like it to work on Linux.
>>> >
>>> > What's happening is I get many of these messages:
>>> >
>>> > warning: cannot resolve item 'not'
>>> >
>>> > The problem comes, as near as I can figure out, from when ldd is run
>>> > to discover the library prerequisites.  Running ldd generates a lot of
>>> > lines like this:
>>> >     libQVTK.so.5.4 => not found
>>> >     libQtGui.so.4 => not found
>>> >
>>> > So the solution seems pretty clear -- if you're on linux, use the
>>> > directory list passed into fixup_bundle in order to set
>>> > LD_LIBRARY_PATH before running ldd. Otherwise fixup_bundle seems to
>>> > want to fix up all sorts of libraries named 'not' and fails.
>>> >
>>> > I'd just fix it myself but my CMake-fu isn't strong enough to hack
>>> > BundleUtilities.cmake
>>> >
>>> > For now I think I'll just turn off fixup_bundle on Linux...
>>> >
>>> > compute22 106% ldd BRAINSTracerQT
>>> >     libQVTK.so.5.4 => not found
>>> >     libQtGui.so.4 => not found
>>> >     libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0000003a22d00000)
>>> >     libSM.so.6 => /usr/X11R6/lib64/libSM.so.6 (0x0000003a1f200000)
>>> >     libICE.so.6 => /usr/X11R6/lib64/libICE.so.6 (0x0000003a1f000000)
>>> >     libXrender.so.1 => /usr/X11R6/lib64/libXrender.so.1 (0x0000003a1fc00000)
>>> >     libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0000003a1f400000)
>>> >     libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x0000003a1fa00000)
>>> >     libXext.so.6 => /usr/X11R6/lib64/libXext.so.6 (0x0000003a1ee00000)
>>> >     libX11.so.6 => /usr/X11R6/lib64/libX11.so.6 (0x0000003a1ea00000)
>>> >     libQtCore.so.4 => not found
>>> >     libz.so.1 => /usr/lib64/libz.so.1 (0x0000003a1e800000)
>>> >     libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0
>>> > (0x0000003a24c00000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0
>>> > (0x0000003a20a00000) libgobject-2.0.so.0 =>
>>> > /usr/lib64/libgobject-2.0.so.0 (0x0000003a20e00000) librt.so.1 =>
>>> > /lib64/tls/librt.so.1 (0x0000003a23600000)
>>> >     libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000003a1ec00000)
>>> >     libdl.so.2 => /lib64/libdl.so.2 (0x0000003a1e600000)
>>> >     libITKAlgorithms.so.3.18 => not found
>>> >     libITKStatistics.so.3.18 => not found
>>> >     libITKFEM.so.3.18 => not found
>>> >     libitkNetlibSlatec.so.3.18 => not found
>>> >     libitkv3p_lsqr.so.3.18 => not found
>>> >     libITKEXPAT.so.3.18 => not found
>>> >     libitksys.so.3.18 => not found
>>> >     libvtkRenderingAddOn.so => not found
>>> >     libvtkRendering.so.5.4 => not found
>>> >     libvtkFiltering.so.5.4 => not found
>>> >     libvtkVolumeRendering.so.5.4 => not found
>>> >     libtcl8.4.so => /usr/lib64/libtcl8.4.so (0x0000002a95594000)
>>> >     libModuleDescriptionParser.so => not found
>>> >     libvtkQtChart.so.5.4 => not found
>>> >     libQtOpenGL.so.4 => not found
>>> >     libGLU.so.1 => /usr/X11R6/lib64/libGLU.so.1 (0x0000003a21800000)
>>> >     libGL.so.1 => /usr/X11R6/lib64/libGL.so.1 (0x0000003a21400000)
>>> >     libm.so.6 => /lib64/tls/libm.so.6 (0x0000003a1e400000)
>>> >     libQtSql.so.4 => not found
>>> >     libvtkViews.so.5.4 => not found
>>> >     libvtkInfovis.so.5.4 => not found
>>> >     libvtklibxml2.so.5.4 => not found
>>> >     libvtkalglib.so.5.4 => not found
>>> >     libITKNumerics.so.3.18 => not found
>>> >     libITKBasicFilters.so.3.18 => not found
>>> >     libITKIO.so.3.18 => not found
>>> >     libITKNrrdIO.so.3.18 => not found
>>> >     libitkgdcm.so.3.18 => not found
>>> >     libitkjpeg12.so.3.18 => not found
>>> >     libitkjpeg16.so.3.18 => not found
>>> >     libitkopenjpeg.so.3.18 => not found
>>> >     libuuid.so.1 => /lib64/tls/libuuid.so.1 (0x0000002a95758000)
>>> >     libitkpng.so.3.18 => not found
>>> >     libitktiff.so.3.18 => not found
>>> >     libitkjpeg8.so.3.18 => not found
>>> >     libITKSpatialObject.so.3.18 => not found
>>> >     libITKCommon.so.3.18 => not found
>>> >     libitkvnl_inst.so.3.18 => not found
>>> >     libitkvnl_algo.so.3.18 => not found
>>> >     libitkv3p_netlib.so.3.18 => not found
>>> >     libitkvnl.so.3.18 => not found
>>> >     libitkvcl.so.3.18 => not found
>>> >     libITKMetaIO.so.3.18 => not found
>>> >     libITKDICOMParser.so.3.18 => not found
>>> >     libITKniftiio.so.3.18 => not found
>>> >     libITKznz.so.3.18 => not found
>>> >     libitkzlib.so.3.18 => not found
>>> >     libvtkWidgets.so.5.4 => not found
>>> >     libvtkHybrid.so.5.4 => not found
>>> >     libvtkGraphics.so.5.4 => not found
>>> >     libvtkverdict.so.5.4 => not found
>>> >     libvtkImaging.so.5.4 => not found
>>> >     libvtkftgl.so.5.4 => not found
>>> >     libvtkfreetype.so.5.4 => not found
>>> >     libXt.so.6 => /usr/X11R6/lib64/libXt.so.6 (0x0000003a23e00000)
>>> >     libXss.so.1 => /usr/X11R6/lib64/libXss.so.1 (0x0000003a26900000)
>>> >     libXft.so.2 => /usr/X11R6/lib64/libXft.so.2 (0x0000003a20400000)
>>> >     libvtkIO.so.5.4 => not found
>>> >     libvtkCommon.so.5.4 => not found
>>> >     libvtkDICOMParser.so.5.4 => not found
>>> >     libvtkmetaio.so.5.4 => not found
>>> >     libvtksqlite.so.5.4 => not found
>>> >     libvtkpng.so.5.4 => not found
>>> >     libvtktiff.so.5.4 => not found
>>> >     libvtkzlib.so.5.4 => not found
>>> >     libvtkjpeg.so.5.4 => not found
>>> >     libvtkexpat.so.5.4 => not found
>>> >     libvtksys.so.5.4 => not found
>>> >     libvtkexoIIc.so.5.4 => not found
>>> >     libvtkNetCDF.so.5.4 => not found
>>> >     libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003a20c00000)
>>> >     libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003a20600000)
>>> >     libc.so.6 => /lib64/tls/libc.so.6 (0x0000003a1e100000)
>>> >     libexpat.so.0 => /usr/lib64/libexpat.so.0 (0x0000003a1f600000)
>>> >     /lib64/ld-linux-x86-64.so.2 (0x0000003a1df00000)
>>> >     libXxf86vm.so.1 => /usr/X11R6/lib64/libXxf86vm.so.1 (0x0000003a21e00000)
>>> > _______________________________________________
>>> > Powered by www.kitware.com
>>> >
>>> > Visit other Kitware open-source projects at
>>> >  http://www.kitware.com/opensource/opensource.html
>>> >
>>> > Please keep messages on-topic and check the CMake FAQ at:
>>> >  http://www.cmake.org/Wiki/CMake_FAQ
>>> >
>>> > Follow this link to subscribe/unsubscribe:
>>> > http://www.cmake.org/mailman/listinfo/cmake
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>>  http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>>  http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>>
>>
>


More information about the CMake mailing list