[gmx-developers] Re: libgmxana.so dependencies
Roland Schulz
roland at utk.edu
Mon Oct 5 10:51:58 CEST 2009
Hi,
I found a solution:
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
index 0b03eb1..ffd8d88 100644
--- a/src/tools/Makefile.am
+++ b/src/tools/Makefile.am
@@ -6,8 +6,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
-DGMXLIBDIR=\"$(datadir)/top\"
lib_LTLIBRARIES = libgmxana at LIBSUFFIX@.la
-libgmxana at LIBSUFFIX@_la_LIBADD =
-libgmxana at LIBSUFFIX@_la_DEPENDENCIES =
+libgmxana at LIBSUFFIX@_la_LIBADD = ../gmxlib/libgmx at LIBSUFFIX@.la
../mdlib/libmd at LIBSUFFIX@.la
+libgmxana at LIBSUFFIX@_la_DEPENDENCIES = ../gmxlib/libgmx at LIBSUFFIX@.la
../mdlib/libmd at LIBSUFFIX@.la
libgmxana at LIBSUFFIX@_la_LDFLAGS = -version-info
@SHARED_VERSION_INFO@
Is it correct to add it to both LIBADD and DEPENDENCIES? Any reason not to
commit this?
Roland
On Mon, Oct 5, 2009 at 1:59 AM, Roland Schulz <roland at utk.edu> wrote:
> Hi,
>
> I try to load libgmxana.so with dlopen but I get:
> undefined symbol: interaction_function
>
> The reason seems to be that while libgmx has the dependency on libmd,
> libgmxana does not "know" its dependency:
> [rschulz at rschulz-laptop lib]$ ldd libgmxana.so |grep libgmx
> [rschulz at rschulz-laptop lib]$ ldd libmd_mpi.so |grep libgmx
> libgmx_mpi.so.5 => /home/rschulz/usr/gromacs/lib/libgmx_mpi.so.5
> (0x00007fafdb255000)
>
> Why is this that libgmxana does not know it dependency?
>
> A short example program to show the error:
> #include <dlfcn.h>
> #include <stdio.h>
> int main() {
> char* error;
> dlopen("libgmxana_mpi.so",RTLD_LAZY|RTLD_GLOBAL);
> if ((error = dlerror())) {
> printf("%s\n",error);
> }
> return 0;
> }
>
> Roland
>
> --
> ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
> 865-241-1537, ORNL PO BOX 2008 MS6309
>
--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20091005/42872543/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list