CaPTk
CaPTk copied to clipboard
Build fails during cmake due to Hausdorff binary
Describe the bug Building from source, following instructions in 5_
-- Trying to find DCMTK expecting DCMTKConfig.cmake - ok
-- Downloading pre-compiled hausdorff
-- [download 0% complete]
...
-- [download 100% complete]
-- Extracting pre-compiled hausdorff
CMake Error at src/applications/CMakeLists.txt:247 (CONFIGURE_FILE):
Syntax error in cmake code at
/cbica/home/bergman/comp_space/CaPTk/CaPTk/src/applications/CMakeLists.txt:247
when parsing string
The "strings" that follow in the errors from cmake are binary data.
It looks like the content of the binary file is being used in CMakeLists.txt, not the filename:
243 IF( NOT EXISTS "${FILE_TO_EXTRACT}" )
244
245 # copy from LFS folder
246 IF( EXISTS ${LFS_FILE_TO_CHECK} )
247 CONFIGURE_FILE( ${LFS_FILE_TO_CHECK} ${FILE_TO_EXTRACT} )
248 ENDIF()
Just did a clean CMake config and it succeeded without issue:
(base) patis@/cbica/home/patis/projects/captk_myFork/bin>$ cmake ..
[SNIP!]
-- Trying to find DCMTK expecting DCMTKConfig.cmake
-- Trying to find DCMTK expecting DCMTKConfig.cmake - ok
-- Downloading pre-compiled hausdorff
-- [download 0% complete]
[SNIP!]
-- [download 100% complete]
-- Extracting pre-compiled hausdorff
-- Configuring done
-- Generating done
-- Build files have been written to: ~patis/projects/captk_myFork/bin
Paging @CBICA/devteam to see if anyone can replicate this.
I can replicate the issue Mark is experiencing from a completely clean build. CONFIGURE_FILE is attempting to parse over the binary data. To prevent this you can add COPYONLY to the call on line 247:
CONFIGURE_FILE( ${LFS_FILE_TO_CHECK} ${FILE_TO_EXTRACT} COPYONLY )
Putting this here just in case anyone else wants to attempt this while I figure out the other errors I'm getting with the build on the cluster.
BTW, the latest errors are along the lines of the below repeated for a bunch of different targets. All can't find Eigen.
CMake Error at cmake_modules/CaPTk_macros.cmake:19 (ADD_EXECUTABLE): Target "BreastTexturePipeline" links to target "Eigen3::Eigen" 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): src/applications/BreastTexturePipeline/CMakeLists.txt:21 (CAPTK_ADD_EXECUTABLE)
EDIT: Configure succeeds, this happens during generation step.
Even I can replicate the error. Here's a screenshot of configure step.
Clicking on 'Configure' again without changing anything, the errors go away and the 'configure' step succeeds.
Clicking 'Generate' then gives Eigen errors as for @AlexanderGetka-cbica
Maybe this is relevant? Seems like a weird conflict between how Eigen's CMake configuration works and the particular eigen package installed.
Seems very relevant - same error. Looking deeper into the superbuild, specifically at OpenCV, it looks like it is picking up Eigen3_DIR from '/usr/share/eigen3'
This issue with Eigen not being picked up properly was there when I tried to build with older superbuilds on the cluster too.
This issue with Eigen not being picked up properly was there when I tried to build with older superbuilds on the cluster too.
Yes, I remember.
In the message dated: Tue, 28 Jul 2020 12:45:14 -0700, The pithy ruminations from PhucNgo1711 on [[External] Re: [CBICA/CaPTk] Build fails during cmake due to Hausdorff binary (#1144)] were: => This issue with Eigen not being picked up properly was there when I tried to build with older superbuilds on the cluster too.
Yes, and I wasn't able to find the cause.
Mark
=> => -- => You are receiving this because you authored the thread. => Reply to this email directly or view it on GitHub: => https://github.com/CBICA/CaPTk/issues/1144#issuecomment-665240090
--
Mark Bergman voice: 215-746-4061
[email protected] fax: 215-614-0266
http://www.med.upenn.edu/cbica/
IT Technical Director, Center for Biomedical Image Computing and Analytics
Department of Radiology University of Pennsylvania