Compiling NWChem 6.6 (ubuntu 14.04)


Click here for full thread
Gets Around
Hi, NwChem developers.

Some old issue returns
http://nwchemgit.github.io/Special_AWCforum/st/id1348/Incomplete_EXTRA_LIBS_for_LI...

in Ubuntu python-config --libs returns:
-lpthread -ldl -lutil -lm -lpython2.7
without -lz for some reason.

therefore linking fails.

For this reason in NWChem 6.5 source -lz added to python-config --libs returns
https://github.com/jeffhammond/nwchem/blob/master/src/config/makefile.h#L2005



P.S.

To make situation a bit clearer I want to add two links:
https://docs.python.org/2/extending/embedding.html#compiling-and-linking-under-unix-like-s...
https://bugs.python.org/issue15590

Quote:username

to link an embedded interpreter, SYSLIBS should be used,
which might not be complete.
However in this case MODLIBS is missing.


run python
>>> import sysconfig
>>> sysconfig.get_config_var('LIBS')
'-lpthread -ldl  -lutil'
>>> sysconfig.get_config_var('SYSLIBS')
'-lm'
>>> sysconfig.get_config_var('MODLIBS')
'-L/usr/lib -lz'


python-config --libs returns same as sysconfig.get_config_var('LIBS') and sysconfig.get_config_var('SYSLIBS') but sysconfig.get_config_var('MODLIBS') output is obviously missing.


with respect
Vladimir