Bug 921271 - VTK_DIR results in wrong VTK_INCLUDE_DIRS when PATH is non-standard
Summary: VTK_DIR results in wrong VTK_INCLUDE_DIRS when PATH is non-standard
Keywords:
Status: CLOSED DUPLICATE of bug 917407
Alias: None
Product: Fedora
Classification: Fedora
Component: vtk
Version: 18
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 917407
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-13 20:17 UTC by Orion Poplawski
Modified: 2014-10-22 21:05 UTC (History)
11 users (show)

Fixed In Version: vtk-5.10.1-7.fc19
Clone Of: 917407
Environment:
Last Closed: 2014-10-22 21:05:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Orion 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.

Comment 1 Orion Poplawski 2013-03-13 20:18:16 UTC
Looks like upstream cmake has a fix for this, but it's going to require vtk to be rebuilt with a fixed cmake.

Comment 2 Orion Poplawski 2013-11-06 03:27:09 UTC
I believe this should be fixed in vtk-5.10.1-7.fc19

Comment 3 Thomas Hisch 2014-10-22 19:29:08 UTC
I still get this behavior with the latest vtk version in fedora 20 and fedora 21 alpha.

Comment 4 Orion Poplawski 2014-10-22 21:05:24 UTC

*** This bug has been marked as a duplicate of bug 917407 ***


Note You need to log in before you can comment on or make changes to this bug.