[vtk-developers] CMake fails with build type "None" on Ubuntu 18.04

Elvis Stansvik elvis.stansvik at orexplore.com
Fri Jan 11 14:30:38 EST 2019


Hi all,

Previously I had successfully used (VTK master from some months ago):

cmake \
    -DCMAKE_INSTALL_PREFIX=/opt/VTK9 \
    -DCMAKE_INSTALL_RPATH=/opt/VTK9/lib \
    -DVTK_Group_Qt=ON \
    -DVTK_QT_VERSION=5 \
    -DVTK_Group_Imaging=ON \
    -DVTK_Group_Views=ON \
    -DModule_vtkRenderingFreeTypeFontConfig=ON \
    -DVTK_WRAP_PYTHON=ON \
    -DVTK_PYTHON_VERSION=3 \
    -DPYTHON_EXECUTABLE=/usr/bin/python3 \
    -DPYTHON_INCLUDE_DIR=/usr/include/python3.6 \
    -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \
    -DBUILD_TESTING=OFF \
    -DVTK_USE_SYSTEM_LIBRARIES=ON \
    -DVTK_USE_SYSTEM_LIBPROJ4=OFF \
    -DVTK_USE_SYSTEM_GL2PS=OFF \
    -DVTK_USE_SYSTEM_LIBHARU=OFF \
    -DVTK_USE_SYSTEM_GLEW=OFF \
    -DVTK_USE_SYSTEM_DOUBLECONVERSION=OFF \
    -DCMAKE_BUILD_TYPE=None \
    ..

Trying the same with current master (I know some stuff in the above
CMake line, like the *USE_SYSTEM* is not applicable anymore, but bear
with me), I get:

.
.
.
-- Looking for SO_REUSEADDR - found
CMake Error at ThirdParty/eigen/vtkeigen/CMakeLists.txt:28 (message):
  Unknown build type "None".  Allowed values are Debug, Release,
  RelWithDebInfo (case-insensitive).

This is due to a check in eigen's CMakeLists.txt which does not
include "None" as a valid type.

(Side note: This check is, rightfully IMHO, patched away by e.g. the
Ubuntu package for eigen3, allowing it to build with build type
"None", which is typically used for Debian packages).

But, I was just going to ask: Since I could successfully build VTK
master using build type "None" earlier, but not now after the new
module system was merged, something must have changed causing the
eigen3 CMakeLists.txt being parsed while previously it was not
(because eigen3 has had that check for a long time).

I have the full build log for the previously successful build if
that's of interest.

I have libeigen3-dev installed. But has something changed so that some
VTK module now requires the internal eigen3? Looking at e.g.
Filters/Statistics, it PRIVATE_DEPENDS on eigen3, which I guess means
it needs the internal one? But it seems to have needed that previously
too.. Did something change in how this is handled?

Calling for Ben's expertise here again I guess :)

FWIW, in my own build log from the successful build, I can see for example:

   -I/buildbot/b-vtk9/build/ThirdParty/eigen -I/usr/include/eigen3

so it was pointing to both the internal and the system-wide one.

Perhaps the old build system way was broken, and I was just lucky this worked?

Elvis


More information about the vtk-developers mailing list