[gmx-developers] shared libraries - unresolved symbols issue

Daniel Seeliger dseelig at gwdg.de
Wed Nov 12 15:46:02 CET 2008


Hi,

I use the gromacs libmd and libgmx with python. The --enable-shared option 
didn't work for me, too but if I compile gromacs with:

./configure
make -j x CFLAGS=-fPIC

I can use the libs in python.
D.


On Wednesday 12 November 2008 15:33:58 Martin Höfling wrote:
> Am Mittwoch 12 November 2008 15:05:56 schrieb David van der Spoel:
> > No, this is due to crosslinking between libraries. It may help to list
> > one or both of the two twice:
> > -lmd -lgmx -lmd -lgmx
>
> Well, this is the problem. Via ctypes, I can only load one library at a
> time. Linking in a c problem works for me withouth specifying the md and
> gmx twice here.
>
> Creating a dummy library - linking vs both and loading this first via
> ctypes works: I created an "empty" testlib.so, linked vs md and gmx and
> loaded this one first:
>
> In [1]: import ctypes
> In [2]: tlib=ctypes.cdll.LoadLibrary("/usr/local/lib/testlib.so")
> In [3]: libmd=ctypes.cdll.LoadLibrary("libmd.so")
> In [4]: libgmx=ctypes.cdll.LoadLibrary("libgmx.so")
>
> Wouldn't be the proper solution to link the gromacs shared libraries vs.
> each other? Maybe by adding -lmd and -lgmx to the LDFLAGS section in
> Makefile.in?
>
> Best
>         Martin
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.



-- 
Dr. Daniel Seeliger
Computational Biomolecular Dynamics Group
Max-Planck-Institute for Biophysical Chemistry	
Am Fassberg 11
37077 Goettingen, Germany
Tel: +49 551 201 2310
Fax: +49 551 201 2302
email: dseelig at gwdg.de
www.mpibpc.mpg.de/groups/de_groot/dseelig/index.html



More information about the gromacs.org_gmx-developers mailing list