evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
227 stars 95 forks source link

CentOS 3.10 x64 wrong library path #83

Closed nabbelbabbel closed 7 years ago

nabbelbabbel commented 7 years ago

Hi,

we are distributing a QC package using libint, for that reason we provide a tar ball with generated libint source, that is generated by

make export

When using this source to compile libint the generated binaries are exported into the correct location given via the prefix, however the naming of the generated folders seems off. On Ubuntu and OpenSuse the shared library files (both shared and static) are installed to

'prefix'/lib64

on a x64 architecture on CentOS (3.10.0-514.26.1.el7.x86_64) the files end up in

'prefix'/lib

because all of this is automated via CMake in our case, this beaks the compilation. For completeness: the way we determine if there is a 'lib' or 'lib64' folder to be expected in CMake is:

get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) if("${LIB64}" STREQUAL "TRUE") ... endif()

The question now is, if this is a bug or we are just missing some detail on how we can predetermine where the libraries will end up.

Cheers. Jan

evaleev commented 7 years ago

Jan, would you mind attaching the configure script of the exported library? configure script of the released exported libs I generated all set libdir to ${exec_prefix}/lib ... I don't see any reference to lib64.

evaleev commented 7 years ago

My best guess at the moment is that on the systems where libint libs install to prefix/lib64 the defaults are overridden as explained here: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Site-Defaults.html#Site-Defaults

This is not a libint issue, this is an autotools feature. I recommend that to install to predictable location (e.g. /usr/local/lib64) you should configure libint with --libdir=/usr/local/lib64 .

nabbelbabbel commented 7 years ago

--libdir= does the trick. I guess I did not expect autotools to have this 'feature' that results in weird names of the folder depending on the distribution. After looking into the configure file however I can see that there is a similar problem noted for Fedora in the comments of the configure script its comments:

line 16006: Ideally, we could use ldconfig to report all directores which are searched for libraries, however this is still not possible. Aside from not being certain /sbin/ldconfig is available, command 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, even though it is searched at run-time. Try to do the best guess by appending ld.so.conf contents (and includes) to the search path.

So I guess there is no way around the proposed fix anyway. There is no other mention of lib64 in the configure file though, so if you still want that configure file just reply and ill post it here. I guess this can be considered closed then, thanks for the effort.