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

ccmake error #12

Open
sellberg opened this issue Aug 7, 2017 · 5 comments
Open

ccmake error #12

sellberg opened this issue Aug 7, 2017 · 5 comments

Comments

@sellberg
Copy link
Collaborator

sellberg commented Aug 7, 2017

I tried to install libspimage on a new computer but got an error I haven’t seen before (I have used cmake 3.2.3 before, now I installed cmake 3.9.0 from brew). It seems to be related to some new CMake policy related to RPATH:

https://cmake.org/cmake/help/v3.9/policy/CMP0068.html

Have you seen this before? I tried to set the INSTALL_NAME_DIR explicitly in the RPATH part (see starred ** rows below) of /libspimage/CMakeLists.txt, but no luck so far.

Any idea how to solve it?

Cheers,
Jonas

# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

IF(APPLE)
  # There's a problem with install_name_tool which cannot
  # handle duplicate rpaths, so we'll take the calculated risk
  # of not including rpaths in the build on macosx
  SET(CMAKE_SKIP_BUILD_RPATH  TRUE)
  **SET(INSTALL_NAME_DIR  "")**
ELSE(APPLE)
  SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
ENDIF(APPLE)

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib${LIBRARY_SUFFIX}" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
  SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIBRARY_SUFFIX}")
  **SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIBRARY_SUFFIX}")**
ENDIF("${isSystemDir}" STREQUAL "-1")

When pressing g in ccmake:

CMake Warning (dev):
   Policy CMP0068 is not set: RPATH settings on macOS do not affect
   install_name.  Run "cmake --help-policy CMP0068" for policy details.  Use
   the cmake_policy command to set the policy and suppress this warning.

   For compatibility with older versions of CMake, the install_name fields for
   the following targets are still affected by RPATH settings:

    _spimage_pybackend
    spimage

 This warning is for project developers.  Use -Wno-dev to suppress it.

When compiling library with make:

src/CMakeFiles/_spimage_pybackend.dir/flags.make:10: *** multiple target patterns. Stop.
make[1]: *** [src/CMakeFiles/_spimage_pybackend.dir/all] Error 2
make: *** [all] Error 2

@FilipeMaia
Copy link
Collaborator

I think the warning is probably unrelated to the error. Did you try to remove the build directory and try again?

@FilipeMaia
Copy link
Collaborator

I tested with cmake 3.9.1 without problems.

@sellberg
Copy link
Collaborator Author

Thanks for testing it, yes I've removed the directory and tried several times.

I'll go through the configurations and the dependencies again to check I haven't missed anything. I noticed my installation of CUDA does not appear to pick up the graphic card correctly, but I don't think it is related to the make error.

@FilipeMaia
Copy link
Collaborator

Can you turn on CMAKE_VERBOSE_MAKEFILE and paste the error output?

@daurer
Copy link
Collaborator

daurer commented Jan 4, 2018

@sellberg Did you manage to fix this? I recently got the same error, which was caused by a syntax error in an underlying python script (part of the libspimage build). The problem became clear when looking at the src/CMakeFiles/_spimage_pybackend.dir/flags.make file...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants