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

Build fails during cmake due to Hausdorff binary #1144

Open
MarkBergman-cbica opened this issue Jun 22, 2020 · 9 comments
Open

Build fails during cmake due to Hausdorff binary #1144

MarkBergman-cbica opened this issue Jun 22, 2020 · 9 comments
Assignees

Comments

@MarkBergman-cbica
Copy link
Collaborator

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()
@sarthakpati sarthakpati self-assigned this Jun 22, 2020
@sarthakpati
Copy link
Contributor

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.

sarthakpati added a commit to sarthakpati/CaPTk that referenced this issue Jun 23, 2020
@AlexanderGetka-cbica
Copy link
Contributor

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.

@AlexanderGetka-cbica
Copy link
Contributor

AlexanderGetka-cbica commented Jul 28, 2020

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.

@ashishsingh18
Copy link
Collaborator

Even I can replicate the error. Here's a screenshot of configure step.

image

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
image

@AlexanderGetka-cbica
Copy link
Contributor

Maybe this is relevant? Seems like a weird conflict between how Eigen's CMake configuration works and the particular eigen package installed.

@ashishsingh18
Copy link
Collaborator

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'

image

@PhucNgo1711
Copy link
Contributor

This issue with Eigen not being picked up properly was there when I tried to build with older superbuilds on the cluster too.

@ashishsingh18
Copy link
Collaborator

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.

@MarkBergman-cbica
Copy link
Collaborator Author

MarkBergman-cbica commented Jul 28, 2020 via email

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

5 participants