DescriptionOrion Poplawski
2013-03-13 20:17:27 UTC
+++ This bug was initially created as a clone of Bug #917407 +++
Description of problem:
When PATH lists non-usr directories first (eg PATH=/sbin:/bin:/usr/sbin:/usr/bin), VTK_DIR is determined to be /lib64/vtk. In the VTKConfig.cmake, this results in a VTK_INCLUDE_DIRS of //include/vtk, which doesn't exist, of course. This non-standard PATH variable occurred for me when I "sudo su <user> -" to a user, which is not an unusual procedure.
Version-Release number of selected component (if applicable): 5.10.0-3.fc18
How reproducible: 100%
Steps to Reproduce:
1. export PATH=/sbin:/bin:/usr/sbin:/usr/bin
2. mkdir ~/vtktest && cd vtktest
3. echo "cmake_minimum_required(VERSION 2.8)
find_package(VTK REQUIRED)
message(\"VTK_INCLUDE_DIRS: \${VTK_INCLUDE_DIRS}\")" > CMakeLists.txt
4. cmake .
Actual results:
VTK_INCLUDE_DIRS: //include/vtk
Expected results:
VTK_INCLUDE_DIRS: /usr/include/vtk
Additional info:
This has been presented before:
http://www.pcl-users.org/Compiling-PCL-1-6-0-on-Fedora-17-td4023336.html
but couldn't be reproduced.
--- Additional comment from Scott K Logan on 2013-03-03 18:46:30 EST ---
Looks like I missed a ~/ in step 2, should be:
2. mkdir ~/vtktest && cd ~/vtktest
--- Additional comment from Orion Poplawski on 2013-03-12 23:23:35 EDT ---
This is actually a cmake issue (as it ships FindVTK.cmake). I've posted to the cmake user list to ask for suggestions on how to handle this in a general way. We can hack it for FindVTK to search in /usr first, but we may have to do this for many other modules as well.