Here is a patch which cleans up a bunch of issues with the current IMP config and runtime setup. The only change that people are likely to see up front is that on a mac with macports installed in /opt/local you need to add "include=/opt/local" to your scons command line or your config.py.
First, the normal dependencies (boost and cgal) no longer take a path as the value, instead the configure just searches for them in the provided include and link paths. Modeller might be too much of a mess to move to a normal installation, but embed probably should at some point (once someone writes an install script for it).
Second, the patch fixes a bunch of places where the internal paths were Appended rather than Prepended, resulting in external headers/ libs being used instead of internal ones. Internal paths should always be searched before external ones. This change includes imppy.sh, so, in theory, once should be able to use modeller on diva again with IMP, but I have not tested this. We also need to be very careful that the library search paths (both link time and dynamic) are always in the same order.
Third, the CGAL check checks for linking since it needs some special compiler arguments sometimes. The link check uses Scons.SConf which is not used elsewhere. Since it is been part of scons for several years now (and is part of the 1.0 release of SCons), it seems a bit silly not to use it.
Fourth, it adds a way of adding compilation and link arguments to make it easier to handle eccentric setups (such as pre-release versions of CGAL).
Fifth, it make the python libraries only link against the corresponding C++ libraries as that is all that is needed (since the C+ + library will pull in the external dependencies) and Mac OS complains about linking against something twice.
Finally, the patch adds the external lib search paths to the linked library rpaths on linux (and removes them from imppy.sh on all patforms). There are several reasons to do this - first the LD_LIBRARY_PATH used in the imppy.sh overrides the internal library search paths for other peoples libraries and can result in linking problems if there are multiple libraries on your system with the same name. For example, on my mac there are a large number of libJPEG.dylibs. Adding /opt/local/lib to the LD_LIBRARY_PATH causes the one located there to be used in preference to any found on the internal search paths of the platform SDK libraries and results in link failures. - second, it makes it more likely that IMP is linked against the same libraries at run time and compile time since the two sets of search paths are the same. Various of us have run into nasty problems with this. - on macos the full paths to properly built libraries are embedded in the library upon linking so we don't need LD_LIBRARY_PATH analogs except for getting python started.
Another note, the build/lib directory is not added as an rpath since that would change once the libraries are installed (and once they are installed, things that link against the installed libraries are responsible to make sure that imp).
I would like to be able to add to the path from the command line but can't figure out how to do it early enough that SWIG is found using the new path.
participants (1)
-
Daniel Russel