Bug 921271

Summary: VTK_DIR results in wrong VTK_INCLUDE_DIRS when PATH is non-standard
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: vtkAssignee: Orion Poplawski <orion>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 18CC: Axel.Thimm, jonathan.underwood, jreznik, logans, ltinkl, mrceresa, orion, pertusus, pmachata, rdieter, t.hisch
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: vtk-5.10.1-7.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 917407 Environment:
Last Closed: 2014-10-22 21:05:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 917407    
Bug Blocks:    

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 ***