[LLVMdev] Symbol not found in opt when using own pass

James Stanier j.stanier at sussex.ac.uk
Tue Apr 7 06:57:58 PDT 2009


Hi everyone,

I have a terrible feeling I'm doing something really silly here, but I can't
seem to solve the problem after a day of trying now. I'm currently writing
my own pass which I am running by loading it into the opt tool. Everything I
had written in the pass so far had worked, until I started declaring an
#include of some extra header files which I had written myself (they are
objects for modeling a graph I am constructing):

#include "VSDGNode.h"
#include "VSDGPlace.h"
#include "VSDGTransition.h"
using namespace vsdg;

In my function for constructing my graph, I declare an object:

   VSDGTransition t;

however, at run-time, the pass fails with the following error:

dyld: lazy symbol binding failed: Symbol not found:
__ZN4vsdg14VSDGTransitionC1Ev
  Referenced from:
/Users/js231/svn-check/js231/code/llvm-2.5/Release/lib/VSDGConstruct.0.0.0.dylib
  Expected in: flat namespace

dyld: Symbol not found: __ZN4vsdg14VSDGTransitionC1Ev
  Referenced from:
/Users/js231/svn-check/js231/code/llvm-2.5/Release/lib/VSDGConstruct.0.0.0.dylib
  Expected in: flat namespace

// Memory dump omitted...

Segmentation fault

Which seems to suggest that in the .dylib file the symbol cannot be found.
However, actually looking at the .dylib file it appears to be in there. Is
there some kind of linking problem with my pass, or is there something very
stupid that I am or am not doing? I can provide any more information if
needed, I just didn't want to make the post unreadable if it was an obvious
answer.

Thanks very much, as ever.

James
-- 
View this message in context: http://www.nabble.com/Symbol-not-found-in-opt-when-using-own-pass-tp22929616p22929616.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list