On Sun, Apr 13, 2008 at 08:28:34PM +0100, Garth N. Wells wrote:
Matthew Knepley wrote:
I have said this more than 13 times.
Nice that you're counting ;).
That link procedure is Wrong Wrong Wrong.
I have also given the right ways to do it:
1) 'make getlinklibs' prints the correct link line
2) 'include ${PETSC_DIR}/conf/variables' in the makefile and use
${PETSC_TS_LIB}
It's been there:
http://fenics.org/hg/dolfin?cs=716a643cf63b
but was later removed:
http://fenics.org/hg/dolfin?cs=5f87c119a79d
3) Load the pickled configure information and read it into Python.
There is an example
in $PETSC_DIR/bin/configVars.py
Why in the hell is this still screwed up? Of course you need to link
all the 3rd party
libraries.
There is a reason why we don't want to link to third-party libraries
which PETSc depends on. The reason has been discussed at length on this
list; we don't want to be tied into the libraries (and versions of
libraries) which PETSc downloads and uses, and possibly modifies. Any
suggestions on how deal nicely with this issue are welcome.
Don't we always need to ask a library which has other dependencies
which those dependencies are and add them when building an application
against DOLFIN (and PETSc)?
In dolfin.pc, we have
Requires: numpy-1 boost ufc-1 umfpack python-2 petsc gts scotch libxml-2.0
which means pkg-config will lookup petsc.pc to find the dependencies
for PETSc. Then petsc.pc should list its requirements etc, or list
them in the Libs field. (Since PETSc mostly downloads/builds its own
stuff, it's more appropriate to just list the dependencies in the Libs
field.)
It seems to me we need to add everything PETSc needs in the Libs field
in petsc.pc (by looking at PETSC_TS_LIB). If we stick it in at the
end, it shouldn't mess anything else up, since other dependencies will
be found first.