[petsc-dev] Undefined symbol in SLEPc dylib (Haskell bindings, OSX)

Jose E. Roman jroman at dsic.upv.es
Thu Jun 9 06:20:31 CDT 2016


I have no idea why this symbol is not resolved. I have never had a similar problem. 

Anyway, if it helps, I have pushed a commit to maint where all occurrences of this symbol are removed, since they are not necessary anyway.
https://bitbucket.org/slepc/slepc/commits/b3c04e8

Jose



> El 9 jun 2016, a las 13:06, Matthew Knepley <knepley at gmail.com> escribió:
> 
> On Thu, Jun 9, 2016 at 12:01 PM, Marco Zocca <zocca.marco at gmail.com> wrote:
> All the KSPConv* symbols are defined (`nm -u ...` shows the blank string):
> 
> $ nm ${PETSC_DIR}/${PETSC_ARCH}/lib/libpetsc.3.7.2.dylib | grep KSPConv
> 
> 000000000110a652 T _KSPConvergedDefault
> 0000000001109703 T _KSPConvergedDefaultCreate
> 000000000110b934 T _KSPConvergedDefaultDestroy
> 0000000001109a96 T _KSPConvergedDefaultSetUIRNorm
> 000000000110a074 T _KSPConvergedDefaultSetUMIRNorm
> 000000000106533d T _KSPConvergedLSQR
> 0000000001743280 D _KSPConvergedReasons
> 
> Then that symbol should be resolved by this library. It looks like you have a problem in your link line.
> 
>    Matt
>  
> 000000000173d300 s _KSPConvergedReasons_Shifted
> 000000000110920d T _KSPConvergedSkip
> 0000000001224e94 t _SNES_TR_KSPConverged_Destroy
> 00000000012248f6 t _SNES_TR_KSPConverged_Private
> 
> 
> 
> >>
> >> I encounter this bug when accessing the PETSc and SLEPc dynamic
> >> library under OSX:
> >>
> >> user specified .o/.so/.DLL could not be loaded
> >> (dlopen($SLEPC_DIR/arch-darwin-c-debug/lib/libslepc.dylib, 5): Symbol
> >> not found: _KSPConvergedReasons
> >>   Referenced from: $SLEPC_DIR/arch-darwin-c-debug/lib/libslepc.dylib
> >>   Expected in: flat namespace
> >>  in $SLEPC_DIR/arch-darwin-c-debug/lib/libslepc.dylib)
> >>
> >> Surely, enough, `nm -u` shows _KSPConvergedReasons as an undefined
> >> symbol (see below).
> >> I don't understand the reason of this behaviour since I first compile
> >> with all the relevant PETSc and SLEPc headers and link against both
> >> .dylibs.
> >>
> >> Thank you in advance for any pointers,
> >> Marco
> >>
> >> -------
> >> $ nm -u libslepc.3.7.1.dylib | grep KSP
> >
> >
> > What do you get for
> >
> >   nm -u libpetsc.3.7.1.dylib | grep KSPConv
> >
> >      Matt
> >
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener




More information about the petsc-dev mailing list