Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libminc and/or ITK not accessible in minc4itk build when building with system ITK #36

Open
bcdarwin opened this issue Nov 30, 2015 · 3 comments

Comments

@bcdarwin
Copy link

Building in a clean sandbox:

[  4%] Built target minc2
Scanning dependencies of target minc_io
[  4%] Building CXX object libminc/ezminc/CMakeFiles/minc_io.dir/minc_1_rw.cpp.o
[  4%] Building CXX object libminc/ezminc/CMakeFiles/minc_io.dir/minc_1_simple_rw.cpp.o
[  4%] Linking CXX shared library libminc_io.so
[  4%] Built target minc_io
Scanning dependencies of target ITKIOMINC
[  4%] Building CXX object minc4itk/CMakeFiles/ITKIOMINC.dir/src/itkMincHelpers.cxx.o
[  4%] Building CXX object minc4itk/CMakeFiles/ITKIOMINC.dir/src/itkMincImageIO.cxx.o
[  4%] Building CXX object minc4itk/CMakeFiles/ITKIOMINC.dir/src/itkMincImageIOFactory.cxx.o
[  4%] Building CXX object minc4itk/CMakeFiles/ITKIOMINC.dir/src/itkMincTransformIO.cxx.o
/tmp/<stuff>/src/itkMincTransformIO.cxx: In member function 'void itk::MincTransformIO::ReadOneTransform(VIO_General_transform*)':
/tmp/<stuff>/minc-toolkit-9dbb6ed/minc4itk/src/itkMincTransformIO.cxx:139:11: error: 'Volume' was not declared in this scope
           Volume grid=static_cast<Volume>(xfm->displacement_volume);
           ^

followed by lots of resulting syntax (!) errors.

Flags:

  -DCMAKE_INSTALL_PREFIX=$out
  -DMT_BUILD_SHARED_LIBS=ON
  -DUSE_SYSTEM_FFTW3F=ON
  -DUSE_SYSTEM_GSL=ON
  -DUSE_SYSTEM_HDF5=ON
  -DUSE_SYSTEM_ITK=ON
  -DUSE_SYSTEM_NETCDF=ON
  -DUSE_SYSTEM_PCRE=ON
  -DUSE_SYSTEM_ZLIB=ON
  -DMT_BUILD_VISUAL_TOOLS=ON
  -DMT_BUILD_ITK_TOOLS=ON
  -DMT_BUILD_MINC_ANTS=ON

but this happens with/without shared libs and with/without superbuild (e.g., not using system (say) fftw3f; see next-most-recent bug). ITK version is 4.0.0.

@bcdarwin
Copy link
Author

If I turn off BUILD_ITK_TOOLS, the build succeeds.

@bcdarwin
Copy link
Author

Oh, I assume I wasn't supposed to use ITK4 - closing for now.

@bcdarwin
Copy link
Author

bcdarwin commented Dec 1, 2015

Using an existing ITK 3 doesn't seem to work either:

CMake Warning at CMakeLists.txt:319 (FIND_PACKAGE):
  By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "ITK", but
  CMake did not find one.

  Could not find a package configuration file provided by "ITK" with any of
  the following names:

    ITKConfig.cmake
    itk-config.cmake

  Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set "ITK_DIR"
  to a directory containing one of the above files.  If "ITK" provides a
  separate development package or SDK, be sure it has been installed.
 ...
CMake Warning (dev) at CMakeLists.txt:342 (ADD_DEPENDENCIES):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "ITKv3" of target "ANTS" does not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:351 (ADD_DEPENDENCIES):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "ITKv3" of target "C3D" does not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.
 ...
[  4%] Built target minc2
Scanning dependencies of target minc_io
[  4%] Building CXX object libminc/ezminc/CMakeFiles/minc_io.dir/minc_1_rw.cpp.o
[  5%] Building CXX object libminc/ezminc/CMakeFiles/minc_io.dir/minc_1_simple_rw.cpp.o
[  5%] Linking CXX shared library libminc_io.so
[  5%] Built target minc_io
Scanning dependencies of target ITKIOMINC
[  5%] Building CXX object minc4itk/CMakeFiles/ITKIOMINC.dir/src/itkMincHelpers.cxx.o
In file included from /tmp/.../minc-toolkit-9dbb6ed/minc4itk/src/itkMincHelpers.cxx:16:0:
/tmp/.../minc-toolkit-9dbb6ed/minc4itk/include/itkMincHelpers.h:23:22: fatal error: itkArray.h: No such file or directory
 #include "itkArray.h"
                      ^
compilation terminated.
minc4itk/CMakeFiles/ITKIOMINC.dir/build.make:62: recipe for target 'minc4itk/CMakeFiles/ITKIOMINC.dir/src/itkMincHelpers.cxx.o' failed
make[2]: *** [minc4itk/CMakeFiles/ITKIOMINC.dir/src/itkMincHelpers.cxx.o] Error 1
CMakeFiles/Makefile2:15746: recipe for target 'minc4itk/CMakeFiles/ITKIOMINC.dir/all' failed
make[1]: *** [minc4itk/CMakeFiles/ITKIOMINC.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

@bcdarwin bcdarwin reopened this Dec 1, 2015
@bcdarwin bcdarwin changed the title libminc not accessible in minc4itk build libminc and/or ITK not accessible in minc4itk build Dec 1, 2015
@bcdarwin bcdarwin changed the title libminc and/or ITK not accessible in minc4itk build libminc and/or ITK not accessible in minc4itk build when building with system ITK Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant