Linking against slepc doesn't encode correct link path

Bug #1158208 reported by Lawrence Mitchell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libadjoint
New
Undecided
Unassigned

Bug Description

I have a system installed slepc (3.2) linked against a system installed petsc (3.2). However, I use my own version of petsc 3.3 and corresponding slepc. Although the libadjoint Makefile correctly obeys my SLEPC_DIR setting at compile and link time, at runtime, the library picks up the system installed slepc instead (although the user-installed petsc). This leads to all sorts of horrible problems. I think the Makefile should encode the library search path into libadjoint at runtime (as is done for the petsc link).

Perhaps something like this (this is almost certainly not the correct voodoo for macos):
Cheers,
Lawrence

lmitche4@e4300lm:~/docs/src/fenics/libadjoint b libadjoint d
$ bzr diff
=== modified file 'Makefile'
--- Makefile 2013-03-02 14:58:55 +0000
+++ Makefile 2013-03-20 18:13:23 +0000
@@ -44,7 +44,7 @@
 # Identify if SLEPc is installed
 ifneq (,$(SLEPC_DIR))
        SLEPC_CPPFLAGS := -I$(SLEPC_DIR)/include -I$(SLEPC_DIR)/$(PETSC_ARCH)/include -DHAVE_SLEPC
- SLEPC_LDFLAGS := -L$(SLEPC_DIR)/$(PETSC_ARCH)/lib -lslepc
+ SLEPC_LDFLAGS := -Wl,-rpath,$(SLEPC_DIR)/$(PETSC_ARCH)/lib -L$(SLEPC_DIR)/$(PETSC_ARCH)/lib -lslepc
 else
        SLEPC_CPPFLAGS :=
        SLEPC_LDFLAGS :=

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.