Project

General

Profile

Bug #3085

gromacs-toolchain.cmake file does not work on OS X

Added by Eric Irrgang 3 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
build system
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

The generated toolchains file, now installed to share/cmake/gromacs/gromacs-toolchain.cmake in the GROMACS installation, is insufficient to reproduce the GROMACS build environment on Mac OS X. (This means that requiring the file for the gmxapi setup.py breaks the gmxapi Python package installation.) To reproduce, it is only necessary to try to use the file to configure GROMACS again.

To reproduce:

cmake path/to/gromacs-repo -DCMAKE_INSTALL_PREFIX=$HOME/gromacs
make install
cmake path/to/gromacs-repo -D -DCMAKE_TOOLCHAIN_FILE=$HOME/gromacs/share/cmake/gromacs/gromacs-toolchain.cmake

Result:

CMake Error at src/api/cpp/CMakeLists.txt:52 (add_library):
Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being
set. This could be because you are using a Mac OS X version less than 10.5
or because CMake's platform configuration is corrupt.

Associated revisions

Revision 522ef8ca (diff)
Added by Eric Irrgang 3 months ago

Do not use gromacs-toolchain in darwin gmxapi builds.

Add workaround for toolchain issue on OS X.

Refs #3085

Change-Id: I96a8242b14c86abd4926b6abf5a401c37953b9bc

Revision 8f6c7f8a (diff)
Added by Eric Irrgang about 1 month ago

Improve uniformity of OS X CMake configuration.

  • Update the toolchains file to work with OS X.
  • Use uniform OS X deployment target and architecture.
  • Use CMake toolchain for OS X Python package installations.

Fixes #3085

Change-Id: Ic919740c873fd6021c3291b6da014e7325655418

Revision 0701a648 (diff)
Added by Eric Irrgang about 1 month ago

Allow validation of the generated CMake toolchain file.

Refs #3085

Change-Id: Ie909256f4656bfd119273a21791f708ba68c5e8a

History

#1 Updated by Mark Abraham 3 months ago

Yes. Presumably, since the toolchain file implies cross-compiling, CMake doesn't do the automatic environment detection that it normally would. Usually, setting CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_ARCHITECTURES are sufficient to configure the dynamic linking stuff correctly.

While I think we need the toolchain file for true cross-compilation scenarios (Cray HPC systems, etc), it may be that this isn't the right tool for getting the GROMACS-compatible compilers. If we want to stick with CMake machinery rather than a more generic scriptlet or configuration file, we could consider providing a stripped down CMakeCache file to bootstrap from with "-C"

#2 Updated by Paul Bauer 3 months ago

  • Status changed from New to Resolved

I think this has been resolved?

#3 Updated by Mark Abraham 3 months ago

  • Status changed from Resolved to Blocked, need info

I don't think anybody has worked on this.

@Eric does it still repro?

#4 Updated by Mark Abraham 3 months ago

  • Target version changed from 2020-beta1 to 2020-beta2

#5 Updated by Eric Irrgang 3 months ago

Mark Abraham wrote:

I don't think anybody has worked on this.

@Eric does it still repro?

I rebased https://gerrit.gromacs.org/c/gromacs/+/13123 locally onto master and confirmed that the problem is still the same.

Change-Id: I96a8242b14c86abd4926b6abf5a401c37953b9bc was just a workaround.

#6 Updated by Eric Irrgang 2 months ago

  • Status changed from Blocked, need info to Fix uploaded

#7 Updated by Eric Irrgang about 1 month ago

  • Status changed from Fix uploaded to Resolved

#8 Updated by Paul Bauer about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF