InsightSoftwareConsortium / InsightSoftwareConsortium/ITK
Guix package definition; Configure fails.
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 748
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 64
Description
### Description
I'm trying to write a Guix package definition for ITK. It's important to neither use bundled software (if possible/feasible) nor download additional assets during the build. I found `ITK_USE_SYSTEM_LIBRARIES` and set it to `ON`.
### Steps to Reproduce
[ This may not help you much, if you don't use guix :( Maybe the logs below are enough]
Paste the following into a file `.scm` and try to build with `guix build -K -f .scm`:
```scheme
(use-modules
(gnu packages algebra)
(gnu packages check)
(gnu packages compression)
(gnu packages image)
(gnu packages llvm)
(gnu packages maths)
(gnu packages perl)
(gnu packages python)
(gnu packages xml)
(guix build-system cmake)
(guix git-download)
((guix licenses) #:prefix license:)
(guix packages))
(define-public itk
(package
(name "itk")
(version "5.3.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/InsightSoftwareConsortium/ITK")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1bx98lzafj83fxylm0qnxkn05rdlrvfc672f0n843hgis2wk0gfh"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
(list "-DBUILD_EXAMPLES=OFF"
"-DITK_USE_SYSTEM_LIBRARIES=ON"
"-DITK_USE_KWSTYLE=OFF")))
(native-inputs
(list clang
cppcheck
eigen
googletest
perl
python))
(inputs
(list expat
hdf5
libjpeg-turbo
libpng
libtiff
zlib))
(outputs (list "out" "debug"))
(synopsis "ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions")
(description "The Insight Toolkit (ITK) is an open-source, cross-platform toolkit for N-dimensional scientific image processing, segmentation, and registration. Segmentation is the process of identifying and classifying data found in a digitally sampled representation. Typically the sampled representation is an image acquired from such medical instrumentation as CT or MRI scanners. Registration is the task of aligning or developing correspondences between data. For example, in the medical environment, a CT scan may be aligned with a MRI scan in order to combine the information contained in both.")
(home-page "https://itk.org")
(license license:asl2.0)))
itk
```
### Expected behavior
I'd like the configure phase to succeed.
### Actual behavior
[full log](https://github.com/InsightSoftwareConsortium/ITK/files/10663348/67hcnp62iqm73nrkabgqn1snhq9g6a-itk-5.3.0.drv.gz)
```
-- Found GTest: /gnu/store/mbzav28sik3zr3kbw1jyh4qk3zmkh6xn-googletest-1.11.0/lib/cmake/GTest/GTestConfig.cmake (found version "1.11.0")
-- Found HDF5: /gnu/store/imz1fhpcg603a4ny7k9yla72d6y302aw-hdf5-1.10.7/lib/libhdf5_cpp.so;/gnu/store/imz1fhpcg603a4ny7k9yla72d6y302aw-hdf5-1.10.7/lib/libhdf5.so;/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libpthread.so;/gnu/store/8qv5kb2fgm4c3bf70zcg9l6hkf3qzpw9-zlib-1.2.11/lib/libz.so;/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libdl.so;/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libm.so;/gnu/store/imz1fhpcg603a4ny7k9yla72d6y302aw-hdf5-1.10.7/lib/libhdf5.so;/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libpthread.so;/gnu/store/8qv5kb2fgm4c3bf70zcg9l6hkf3qzpw9-zlib-1.2.11/lib/libz.so;/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libdl.so;/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libm.so (found version "1.10.7") found components: CXX C HL
-- Looking for mkstemp
-- Looking for mkstemp - found
-- Looking for tmpnam
-- Looking for tmpnam - found
-- Looking for tempnam
-- Looking for tempnam - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for popen
-- Looking for popen - found
-- Looking for fork
-- Looking for fork - found
-- Looking for vfork
-- Looking for vfork - found
-- Looking for fdopen
-- Looking for fdopen - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for getpwnam
-- Looking for getpwnam - found
-- Looking for select
-- Looking for select - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for system
-- Looking for system - found
-- Looking for rint
-- Looking for rint - found
-- Looking for copysign
-- Looking for copysign - found
-- Looking for round
-- Looking for round - found
-- Looking for fabsf
-- Looking for fabsf - found
-- Looking for srand48
-- Looking for srand48 - found
-- Looking for drand48
-- Looking for drand48 - found
-- Looking for sleep
-- Looking for sleep - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for include file sys/dir.h
-- Looking for include file sys/dir.h - found
-- Looking for include file sys/ndir.h
-- Looking for include file sys/ndir.h - not found
-- Looking for include file sys/wait.h
-- Looking for include file sys/wait.h - found
-- Looking for include file values.h
-- Looking for include file values.h - found
-- Looking for include file dirent.h
-- Looking for include file dirent.h - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - found
-- Looking for include file vfork.h
-- Looking for include file vfork.h - not found
-- Looking for include file pwd.h
-- Looking for include file pwd.h - found
-- Looking for include file sys/select.h
-- Looking for include file sys/select.h - found
-- Found Perl: /gnu/store/hy6abswwv4d89zp464fw52z65fkzr7h5-perl-5.34.0/bin/perl (found version "5.34.0")
-- Configuring done
CMake Error at CMake/ITKModuleTest.cmake:196 (add_executable):
Target "ITKCommonGTestDriver" links to target "GTest::GTest" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
Call Stack (most recent call first):
Modules/Core/Common/test/CMakeLists.txt:680 (CreateGoogleTestDriver)
CMake Error at CMake/ITKModuleTest.cmake:196 (add_executable):
Target "ITKCommonGTestDriver" links to target "GTest::Main" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
Call Stack (most recent call first):
Modules/Core/Common/test/CMakeLists.txt:680 (CreateGoogleTestDriver)
CMake Error at CMake/ITKModuleTest.cmake:196 (add_executable):
Target "ITKConnectedComponentsGTestDriver" links to target "GTest::GTest"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
Modules/Segmentation/ConnectedComponents/test/CMakeLists.txt:88 (CreateGoogleTestDriver)
CMake Error at CMake/ITKModuleTest.cmake:196 (add_executable):
Target "ITKConnectedComponentsGTestDriver" links to target "GTest::Main"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
Modules/Segmentation/ConnectedComponents/test/CMakeLists.txt:88 (CreateGoogleTestDriver)
-- Generating done
```
### Reproducibility
Everytime.
### Versions
v5.3.0
### Environment
I'm running GNU Guix, specifically:
```shell
$ guix describe
Generation 168 Feb 01 2023 13:00:36 (current)
guix 14323ed
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 14323edcc37d9efaae2491cf5f57ea0621412d7e
nonguix c694cf9
repository URL: https://gitlab.com/nonguix/nonguix
branch: master
commit: c694cf9211db3cc8673f0e73708d53b75d26518b
```
### Additional Information
It's of course possible to disable tests with `-DBUILD_TESTING=OFF`, but i'd rather like to run the tests :smile:
Contributor guide
Assessment
This issue has not been assessed yet.