← Back to team overview

dolfin team mailing list archive

Re: More link problems

 

On Wed, Mar 12, 2008 at 11:48:19AM +0100, Johan Hake wrote:
> On Tuesday 11 March 2008 17:47:09 Matthew Knepley wrote:
> > On Tue, Mar 11, 2008 at 11:40 AM, Anders Logg <logg@xxxxxxxxx> wrote:
> > > Compiling and running C++ applications against DOLFIN now works fine
> > >
> > >  for me, but it breaks in Python:
> > >  >>> from dolfin import *
> > >
> > >  Traceback (most recent call last):
> > >   File "<stdin>", line 1, in <module>
> > >   File
> > >   "/home/logg/local/lib/python2.5/site-packages/dolfin/__init__.py",
> > >   line 4, in <module>
> > >     from assemble import *
> > >   File
> > >   "/home/logg/local/lib/python2.5/site-packages/dolfin/assemble.py",
> > >   line 17, in <module>
> > >     from dolfin import *
> > >   File
> > >   "/home/logg/local/lib/python2.5/site-packages/dolfin/dolfin.py",
> > >   line 7, in <module>
> > >     import _dolfin
> > >  ImportError: libpetscsnes.so: cannot open shared object file: No such
> > > file or directory
> > >
> > >  # pkg-config --libs dolfin
> > >  -Wl,-rpath,/usr/local/lib/petsc/lib/linux-gnu-cxx-debug -pthread
> > >  -Wl,--export-dynamic -L/home/logg/local/lib -L/usr/lib/atlas
> > >  -L/usr/local/lib/petsc/lib/linux-gnu-cxx-debug -ldolfin -lblas
> > >  -llapack -lumfpack -lamd -lpetscsnes -lpetscmat -lpetscvec -lpetscts
> > >  -lpetsc -lpetscdm -lpetscksp -lgts -lxml2 -lgthread-2.0 -lrt
> > >  -lgmodule-2.0 -ldl -lglib-2.0
> > >
> > >  Any ideas?
> > >
> > >  I guess the path to PETSc libraries was built into libdolfin.so in
> > >  some way before, but not anymore?
> >
> > Either you put -Wl,-rpath options in along with the -L options, or
> > you do some incantation with ldconfig (not my preferred option).
> 
> This is possible whith scons, but Åsmund actively descided to not use it for 
> simula-scons. He has experienced some problems with darwin. Maybe Åsmund can 
> elaborate?
> 
> Johan

But how does it help to put in the -Wl,-rpath options to pkg-config
--libs when importing the DOLFIN Python module into Python? As far as
I know, Python does not call pkg-config, or should these options be
present when compiling the SWIG-generated wrapper?

Does PyDOLFIN work for anyone else with the new build system?

-- 
Anders


Follow ups

References