Hi, I'm having problems while using a custom pass with opt. The pass compiles and links just fine but, when I try to use it with opt: opt -load LLVMmyPass.so -my-flag -f aes.bc -o aes_bb.bc opt refuses to load it with the following error: Error opening 'LLVMmyPass.so': LLVMmyPass.so: undefined symbol: _ZN4llvm9DebugFlagE -load request ignored. and then complains that the flag "-my-flag" cannot be found. A quick look at google makes me think that the missing symbol belongs to libLLVMSupport.a, which should be already linked to opt, shouldn't it? Somebody suggested me that perhaps LLVM and my pass were compiled with different options (one in Release and another in Debug, for instance) but I double-checked and both are in Debug mode. Can anyone spot the problem here? Thanks ahead! -- Pablo Barrio Dpto. Ing. Electrónica - E.T.S.I. Telecomunicación Despacho C-203 Avda. Complutense s/n, 28040 Madrid Tlf. 915495700 ext. 4234 @: pbarrio at die.upm.es
Just in case someone reads this one, the problem is solved. For my pass, the whole LLVM had to be compiled with assertions enabled. On 05/30/2011 06:24 PM, Pablo Barrio wrote:> Hi, > > I'm having problems while using a custom pass with opt. The pass > compiles and links just fine but, when I try to use it with opt: > > opt -load LLVMmyPass.so -my-flag -f aes.bc -o aes_bb.bc > > opt refuses to load it with the following error: > > Error opening 'LLVMmyPass.so': LLVMmyPass.so: undefined symbol: > _ZN4llvm9DebugFlagE > -load request ignored. > > and then complains that the flag "-my-flag" cannot be found. A quick > look at google makes me think that the missing symbol belongs to > libLLVMSupport.a, which should be already linked to opt, shouldn't it? > Somebody suggested me that perhaps LLVM and my pass were compiled with > different options (one in Release and another in Debug, for instance) > but I double-checked and both are in Debug mode. > > Can anyone spot the problem here? Thanks ahead! >-- Pablo Barrio Dpto. Ing. Electrónica - E.T.S.I. Telecomunicación Despacho C-203 Avda. Complutense s/n, 28040 Madrid Tlf. 915495700 ext. 4234 @: pbarrio at die.upm.es
Apparently Analagous Threads
- [LLVMdev] Problem building the LLVM sample project
- [LLVMdev] Exception handling with the LLVM makefile system
- [LLVMdev] Exception handling with the LLVM makefile system
- [LLVMdev] Exception handling with the LLVM makefile system
- [LLVMdev] Problem building the LLVM sample project