MantisBT - CMake
View Issue Details
0010418CMakeModulespublic2010-03-13 17:422010-09-09 23:59
Clinton Stimpson 
David Cole 
normalminorsometimes
closedfixed 
 
CMake 2.8.3CMake 2.8.3 
0010418: get_prerequisites() gives bad results if ldd couldn't find full path to item
ldd gives "not found" if the full path to a library could not be found.
GetPrerequisites.cmake interprets that as the target depending on "not" and I have to debug the script for which library it really is.
It should probably be fixed to return the name of the library, instead of the full path, so one can get relevant warnings/errors from BundleUtilities.cmake.
No tags attached.
patch gp.patch (2,310) 2010-03-17 00:12
https://public.kitware.com/Bug/file/2978/gp.patch
Issue History
2010-03-13 17:42Clinton StimpsonNew Issue
2010-03-16 08:58Bill HoffmanStatusnew => assigned
2010-03-16 08:58Bill HoffmanAssigned To => David Cole
2010-03-16 11:20Clinton StimpsonNote Added: 0019895
2010-03-17 00:12Clinton StimpsonFile Added: gp.patch
2010-03-17 00:12Clinton StimpsonNote Added: 0019917
2010-06-25 16:47Clinton StimpsonNote Added: 0021180
2010-06-25 16:47Clinton StimpsonStatusassigned => closed
2010-06-25 16:47Clinton StimpsonResolutionopen => fixed
2010-09-09 23:59David ColeFixed in Version => CMake 2.8.3
2010-09-09 23:59David ColeTarget Version => CMake 2.8.3

Notes
(0019895)
Clinton Stimpson   
2010-03-16 11:20   
Here's an example to demonstrate the problem:

====
# pick any non-system library with non-system dependencies
set(lib1 $ENV{HOME}/vtk/build/bin/libvtkFiltering.so)
set(lib2 ${CMAKE_CURRENT_BINARY_DIR}/libvtkFiltering.so)

configure_file("${lib1}" "${lib2}" COPYONLY)
file(RPATH_REMOVE FILE "${lib2}")

include(GetPrerequisites)

get_prerequisites("${lib2}" deps 0 0 "" "")

message("deps are:")
foreach(dep ${deps})
message(" ${dep}")
endforeach(dep)
====

Output of cmake -P <script> is:
deps are:
  /lib/libc.so.6
  /lib/libdl.so.2
  /lib/libgcc_s.so.1
  /lib/libm.so.6
  /usr/lib/libstdc++.so.6
  not

Instead of "not" I'd rather see "libvtkCommon.so.5.5" and "libvtksys.so.5.5" which comes out in the first column of ldd, even without full paths, just so I can see what the problem really is.
(0019917)
Clinton Stimpson   
2010-03-17 00:12   
I've attached a patch that fixes it.
(0021180)
Clinton Stimpson   
2010-06-25 16:47   
fixed in git