Project

General

Profile

Feature #1957

Add support for building against external lmfit

Added by Dominik Mierzejewski over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build system
Target version:
Difficulty:
uncategorized
Close

Description

Please add support for building against system version of the lmfit library. lmfit upstream merged your modifications in 6.0 and it's present at least in Fedora 23 and later.

Associated revisions

Revision 9748639d (diff)
Added by Mark Abraham over 3 years ago

Allow use of external lmfit package

For packaging GROMACS for software distributions, we need to permit
maintainers to use external system libraries, rather than the versions
we bundle for convenience for general GROMACS users.

This patch implements the CMake option GMX_EXTERNAL_LMFIT. It
implements FindLmfit.cmake, which relies heavily on pkg-config, which
is supported by lmfit and widely available in the intended use case
(ie distribution maintainers), but can be worked around if lmfit is
available and pkg-config is not and somehow an external lmfit is
needed.

lmfit management now needs to happen at a higher point in the GROMACS
build system, so I have refactored the source code files that use
lmfit functionality. The former gmx_lmcurve.cpp in src/external was in
fact GROMACS code that calls the lmmin routine from lmfit and declares
a suitable callback, so it should never have been in
src/external. Moved it (and its header) to
src/gromacs/correlationfunctions.

Reverted the introduction of gmx_ prefixes in an earlier commit - that
approach permits a third party to link to their own lmfit without
symbol clashes, but doesn't resolve the distribution problem. If both
clients of lmfit can use the same external version, then the problem
is solved, and if each need a different version then there are various
further options. Updated the README accordingly, and noted various
other differences from stock lmfit 6.1.

Added file-level Doxygen for some files. Added mention to install
guide.

The implementation is quiet upon repeat cmake runs, and makes only
advanced or internal cache variables.

Fixes #1957

Change-Id: Ib05eee796c6cf13ea90d456cb9b54b166bfda717

History

#1 Updated by Mark Abraham over 3 years ago

I imagine that's not too hard. We might be able to adapt https://github.com/bek0s/gbkfit/blob/master/cmake/modules/Findlmfit.cmake for the purpose.

#2 Updated by Erik Lindahl over 3 years ago

  • Assignee set to David van der Spoel
  • Target version set to 2016

#3 Updated by David van der Spoel over 3 years ago

Dominik, what do you mean our changes were merged in 6.0?

#4 Updated by Mark Abraham over 3 years ago

David van der Spoel wrote:

Dominik, what do you mean our changes were merged in 6.0?

Into lmfit's version 6.0 e.g. http://apps.jcns.fz-juelich.de/redmine/projects/lmfit/repository

#5 Updated by Mark Abraham over 3 years ago

I can look into this, now that the principle is established for TinyXML2 in https://gerrit.gromacs.org/5862

#6 Updated by Dominik Mierzejewski over 3 years ago

Mark Abraham wrote:

David van der Spoel wrote:

Dominik, what do you mean our changes were merged in 6.0?

Into lmfit's version 6.0 e.g. http://apps.jcns.fz-juelich.de/redmine/projects/lmfit/repository

Specifically, in revision 137e8f00 (http://apps.jcns.fz-juelich.de/redmine/projects/lmfit/repository/revisions/137e8f001bc77b2d04dcf0658d30aed162294cfe).

lmfit-6.0 was released 6 months ago.

#7 Updated by Gerrit Code Review Bot over 3 years ago

Gerrit received a related patchset '1' for Issue #1957.
Uploader: Mark Abraham ()
Change-Id: Ib05eee796c6cf13ea90d456cb9b54b166bfda717
Gerrit URL: https://gerrit.gromacs.org/5930

#8 Updated by Mark Abraham over 3 years ago

  • Status changed from New to Fix uploaded
  • Assignee changed from David van der Spoel to Mark Abraham

#9 Updated by Mark Abraham over 3 years ago

  • Status changed from Fix uploaded to Resolved

#10 Updated by Mark Abraham over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF