conda-forge / vtk-feedstock

A conda-smithy repository for vtk.
BSD 3-Clause "New" or "Revised" License
13 stars 64 forks source link

missing vtkRegressionTestImage.h #88

Closed massich closed 8 months ago

massich commented 5 years ago

Issue:

I'm compiling some VTK MWE with a cmake like this:

cmake_minimum_required (VERSION 3.9)
project (edl VERSION 0.9999 LANGUAGES C CXX)

# find_package(TBB REQUIRED)
find_package(VTK REQUIRED)

add_executable(edl edl.cxx)
target_link_libraries(edl ${VTK_LIBRARIES})

I call cmake like:

mkdir -p ./build && cd ./build
cmake -D CMAKE_LIBRARY_PATH=$PATH_WHERE_TBB_AND_VTK_ARE ..
make 

and I get the following error:

(pyvista_cxx) ❯ make                 
[ 50%] Building CXX object CMakeFiles/edl.dir/edl.cxx.o
In file included from /home/sik/miniconda3/envs/pyvista_cxx/include/vtk-8.2/vtkAtomicTypes.h:18:0,
                 from /home/sik/miniconda3/envs/pyvista_cxx/include/vtk-8.2/vtkObjectBase.h:54,
                 from /home/sik/miniconda3/envs/pyvista_cxx/include/vtk-8.2/vtkObject.h:45,
                 from /home/sik/miniconda3/envs/pyvista_cxx/include/vtk-8.2/vtkProp.h:32,
                 from /home/sik/miniconda3/envs/pyvista_cxx/include/vtk-8.2/vtkProp3D.h:37,
                 from /home/sik/miniconda3/envs/pyvista_cxx/include/vtk-8.2/vtkActor.h:36,
                 from /home/sik/repos/pyvista_is256_mwe/edl.cxx:20:
/home/sik/miniconda3/envs/pyvista_cxx/include/vtk-8.2/vtkAtomic.h:28:10: fatal error: tbb/atomic.h: No such file or directory
 #include <tbb/atomic.h>
          ^~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/edl.dir/build.make:62: recipe for target 'CMakeFiles/edl.dir/edl.cxx.o' failed
make[2]: *** [CMakeFiles/edl.dir/edl.cxx.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/edl.dir/all' failed
make[1]: *** [CMakeFiles/edl.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

tbb/atomic.h is there:

(pyvista_cxx) ❯ find /home/sik/miniconda3/envs/pyvista_cxx/ -iname '*.h' -type f | grep atomic
/home/sik/miniconda3/envs/pyvista_cxx/include/tbb/atomic.h
/home/sik/miniconda3/envs/pyvista_cxx/include/python3.7m/pyatomic.h

as a workaround I can add the include path

$ export CPLUS_INCLUDE_PATH=/home/sik/miniconda3/envs/pyvista_cxx/include
$ make
[ 50%] Building CXX object CMakeFiles/edl.dir/edl.cxx.o
/home/sik/repos/pyvista_is256_mwe/edl.cxx:29:10: fatal error: vtkRegressionTestImage.h: No such file or directory
 #include "vtkRegressionTestImage.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/edl.dir/build.make:62: recipe for target 'CMakeFiles/edl.dir/edl.cxx.o' failed
make[2]: *** [CMakeFiles/edl.dir/edl.cxx.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/edl.dir/all' failed
make[1]: *** [CMakeFiles/edl.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

And this time vtkRegressionTestImage is not there:

(pyvista_cxx) ❯ find /home/sik/miniconda3/envs/pyvista_cxx/ -iname '*.h' -type f | grep -i vtkreg  
/home/sik/miniconda3/envs/pyvista_cxx/include/vtk-8.2/vtkRegularPolygonSource.h

I could not find vtkRegressionTestImage in the recipe either.

Is there a way to export those files with the recipie? shall I do something different to get the vtk targets, so that I can link against them?


Environment (conda list):

```sh $ conda list # packages in environment at /home/sik/miniconda3/envs/pyvista_cxx: # # Name Version Build Channel appdirs 1.4.3 pypi_0 pypi bzip2 1.0.6 h14c3975_1002 conda-forge ca-certificates 2019.6.16 hecc5488_0 conda-forge certifi 2019.6.16 py37_0 conda-forge curl 7.64.1 hf8cf82a_0 conda-forge expat 2.2.5 he1b5a44_1003 conda-forge freetype 2.10.0 he983fc9_0 conda-forge future 0.17.1 py37_1000 conda-forge hdf4 4.2.13 h9a582f1_1002 conda-forge hdf5 1.10.4 nompi_h3c11f04_1106 conda-forge icu 58.2 hf484d3e_1000 conda-forge imageio 2.5.0 pypi_0 pypi jpeg 9c h14c3975_1001 conda-forge jsoncpp 1.8.4 h6bb024c_1001 conda-forge krb5 1.16.3 h05b26f9_1001 conda-forge libcurl 7.64.1 hda55be3_0 conda-forge libedit 3.1.20170329 hf8c457e_1001 conda-forge libffi 3.2.1 he1b5a44_1006 conda-forge libgcc-ng 9.1.0 hdf63c60_0 libgfortran-ng 7.3.0 hdf63c60_0 libiconv 1.15 h516909a_1005 conda-forge libnetcdf 4.6.2 hbdf4f91_1001 conda-forge libpng 1.6.37 hed695b0_0 conda-forge libssh2 1.8.2 h22169c7_2 conda-forge libstdcxx-ng 9.1.0 hdf63c60_0 libtiff 4.0.10 h57b8799_1003 conda-forge libuuid 2.32.1 h14c3975_1000 conda-forge libxcb 1.13 h14c3975_1002 conda-forge libxml2 2.9.9 h13577e0_0 conda-forge lz4-c 1.8.3 he1b5a44_1001 conda-forge ncurses 6.1 hf484d3e_1002 conda-forge numpy 1.16.4 pypi_0 pypi openssl 1.1.1b h14c3975_1 conda-forge pillow 6.0.0 pypi_0 pypi pip 19.1.1 py37_0 conda-forge pthread-stubs 0.4 h14c3975_1001 conda-forge python 3.7.3 h5b0a415_0 conda-forge pyvista 0.20.4 pypi_0 pypi readline 7.0 hf8c457e_1001 conda-forge setuptools 41.0.1 py37_0 conda-forge sqlite 3.28.0 h8b20d00_0 conda-forge tbb 2019.7 hc9558a2_0 conda-forge tbb-devel 2019.7 hc9558a2_0 conda-forge tk 8.6.9 hed695b0_1002 conda-forge vtk 8.2.0 py37ha8e561a_201 conda-forge wheel 0.33.4 py37_0 conda-forge xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.9 h516909a_1004 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.7 h14c3975_1000 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xorg-libxt 1.2.0 h516909a_0 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.4 h14c3975_1001 conda-forge zlib 1.2.11 h14c3975_1004 conda-forge zstd 1.4.0 h3b9ef0a_0 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : pyvista_cxx active env location : /home/sik/miniconda3/envs/pyvista_cxx shell level : 3 user config file : /home/sik/.condarc populated config files : /home/sik/.condarc conda version : 4.7.5 conda-build version : not installed python version : 3.7.1.final.0 virtual packages : base environment : /home/sik/miniconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/sik/miniconda3/pkgs /home/sik/.conda/pkgs envs directories : /home/sik/miniconda3/envs /home/sik/.conda/envs platform : linux-64 user-agent : conda/4.7.5 requests/2.19.1 CPython/3.7.1 Linux/4.15.0-46-generic ubuntu/18.04.1 glibc/2.27 UID:GID : 1001:1001 netrc file : None offline mode : False ```
Tobias-Fischer commented 8 months ago

I think we can close here - this was for vtk 8.