MantisBT - ParaView
View Issue Details
0010808ParaView(No Category)public2010-06-09 12:172016-08-12 09:58
Robert Maynard 
Robert Maynard 
normalminoralways
closedmoved 
Windows 7
 
 
0010808: configuration of projects incorrect for non administrator accounts.
When CMake is run without administrator privileges it incorrectly configures paraview. The symptoms include HAVE_FCNTL not being found, which is incorrect since if you run CMake as administrator it is found at:
C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include
No tags attached.
Issue History
2010-06-09 12:17Robert MaynardNew Issue
2010-06-09 12:17Robert MaynardStatusbacklog => tabled
2010-06-09 12:17Robert MaynardAssigned To => David Cole
2010-06-11 09:24David ColeNote Added: 0020988
2010-06-11 10:23David ColeNote Added: 0020990
2010-06-11 11:39David ColeNote Added: 0020992
2010-06-11 11:39David ColeProject@2@ => ParaView
2010-06-11 11:40David ColeAssigned ToDavid Cole => Robert Maynard
2011-06-16 13:10Zack GalbreathCategoryCMake => (No Category)
2016-08-12 09:58Kitware RobotNote Added: 0037834
2016-08-12 09:58Kitware RobotStatusexpired => closed
2016-08-12 09:58Kitware RobotResolutionopen => moved

Notes
(0020988)
David Cole   
2010-06-11 09:24   
Using this CMakeLists.txt file...

===============================================================
cmake_minimum_required(VERSION 2.6)
project(issue10808-simple-repro)

include(CheckIncludeFiles)
check_include_files(fcntl.h HAVE_FCNTL_H)

message(STATUS "HAVE_FCNTL_H='${HAVE_FCNTL_H}'")
===============================================================

...works just fine as a non-admin user on Windows 7, with all combinations of Visual Studio 2008 or 2010, and CMake 2.6.4 or 2.8.1...

Therefore: this bug only occurs with the more complex ParaView project for some reason. I will investigate what is happening specifically in a ParaView build tree and report back later.
(0020990)
David Cole   
2010-06-11 10:23   
Running a findstr/grep on fcntl on the ParaView CMakeCache.txt yields this:

C:\Users\blah\pvb1>findstr /I fcntl CMakeCache.txt
ICE_HAVE_FCNTL:PATH=ICE_HAVE_FCNTL-NOTFOUND
XDMF_HAVE_FCNTL:PATH=XDMF_HAVE_FCNTL-NOTFOUND
//Have include HAVE_FCNTL_H
HAVE_FCNTL_H:INTERNAL=1
//ADVANCED property for variable: ICE_HAVE_FCNTL
ICE_HAVE_FCNTL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: XDMF_HAVE_FCNTL
XDMF_HAVE_FCNTL-ADVANCED:INTERNAL=1

As you can see, HAVE_FCNTL_H is properly found: its value is 1.

It is ICE_HAVE_FCNTL and XDMF_HAVE_FCNTL that appear to be "NOTFOUND"... I will dig into the Ice and Xdmf CMakeLists files next...
(0020992)
David Cole   
2010-06-11 11:39   
I get identical results when running as an admin user...

This is a "false alarm" report in terms of it being a CMake bug...

C:\Users\davidcole\Dashboards\My Tests\pvb1>findstr /I fcntl CMakeCache.txt
ICE_HAVE_FCNTL:PATH=ICE_HAVE_FCNTL-NOTFOUND
XDMF_HAVE_FCNTL:PATH=XDMF_HAVE_FCNTL-NOTFOUND
//Have include HAVE_FCNTL_H
HAVE_FCNTL_H:INTERNAL=1
//ADVANCED property for variable: ICE_HAVE_FCNTL
ICE_HAVE_FCNTL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: XDMF_HAVE_FCNTL
XDMF_HAVE_FCNTL-ADVANCED:INTERNAL=1


The real culprit here is a ParaView (IceT/Xdmf2) bug.

The CMake code in "ParaView\Utilities\Xdmf2\Ice\CMakeLists.txt" looks like this:
Line 81: FIND_PATH(ICE_HAVE_FCNTL fcntl.h /usr/include /usr/include/sys)

And in "ParaView\Utilities\Xdmf2\libsrc\CMakeLists.txt" like this:
Line 353: FIND_PATH(XDMF_HAVE_FCNTL fcntl.h /usr/include /usr/include/sys)

This is clearly *not* the cross-platform way to find fcntl.h and those code bases need to be fixed to work on Windows if they are intended to work on Windows.

Any finding of an include file should use the typically accepted CMake/cross-platform pattern (as exemplified by my attempt at a simple-repro case for this bug):
  include(CheckIncludeFiles)
  check_include_files(fcntl.h HAVE_FCNTL_H)
(0037834)
Kitware Robot   
2016-08-12 09:58   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page.