Hello, I just built a virgin ToT (r98634) for release on vanilla Snow Leopard. It seems that the Hello pass doesn't want to load because of undefined symbols: builddir% ../llvm/configure --prefix=$(PWD)/../installdir --enable-optimized builddir% make builddir% make install && cd ../installdir installdir% bin/opt -load lib/libLLVMHello.dylib Error opening 'lib/libLLVMHello.dylib': dlopen(lib/libLLVMHello.dylib, 9): Symbol not found: __ZN4llvm12FunctionPass11runOnModuleERNS_6ModuleE Referenced from: /blah/installdir/lib/libLLVMHello.dylib Expected in: flat namespace in /blah/installdir/lib/libLLVMHello.dylib -load request ignored. This error doesn't occur in debug mode (same build as above, but with --disable-optimized): installdir% bin/opt -load lib/libLLVMHello.dylib -help | grep hello -hello - Hello World Pass -hello2 - Hello World Pass (with getAnalysisUsage implemented) I noticed that lib/Transforms/Hello/Makefile has an empty USEDLIBS variable, but that may be a red herring because it works in debug mode. I'm hoping someone who knows the build system better than I (i.e., at all) can provide some insight into what's happening. -ben
Hi all, I recently experienced the same issue as below with LLVM 2.8 on Mac OS 10.5.8. I can load the pass with the debug version of opt, but not the optimized version. Does anyone know what the problem is or have any suggestions for debugging this? My install went fine except for some failures during make check (Unexpected Failures: 92). All failures were in one of the following: LLVM::FrontendC++ LLVM::FrontendC LLVM::FrontendObjC++ LLVM::FrontendObjC LLVM::Transforms Thanks, Scott On Tue, Mar 16, 2010 at 9:24 AM, Ben Ransford <ransford at cs.umass.edu> wrote:> Hello, > > I just built a virgin ToT (r98634) for release on vanilla Snow > Leopard. It seems that the Hello pass doesn't want to load because of > undefined symbols: > > builddir% ../llvm/configure --prefix=$(PWD)/../installdir --enable-optimized > builddir% make > builddir% make install && cd ../installdir > installdir% bin/opt -load lib/libLLVMHello.dylib > Error opening 'lib/libLLVMHello.dylib': dlopen(lib/libLLVMHello.dylib, > 9): Symbol not found: > __ZN4llvm12FunctionPass11runOnModuleERNS_6ModuleE > Referenced from: /blah/installdir/lib/libLLVMHello.dylib > Expected in: flat namespace > in /blah/installdir/lib/libLLVMHello.dylib > -load request ignored. > > This error doesn't occur in debug mode (same build as above, but with > --disable-optimized): > > installdir% bin/opt -load lib/libLLVMHello.dylib -help | grep hello > -hello - Hello World Pass > -hello2 - Hello World Pass > (with getAnalysisUsage implemented) > > I noticed that lib/Transforms/Hello/Makefile has an empty USEDLIBS > variable, but that may be a red herring because it works in debug > mode. I'm hoping someone who knows the build system better than I > (i.e., at all) can provide some insight into what's happening. > > -ben > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
On Dec 2, 2010, at 2:37 PM, Scott Ricketts wrote:> My install went fine except for some failures during make check > (Unexpected Failures: 92). All failures were in one of the following: > > LLVM::FrontendC++ > LLVM::FrontendC > LLVM::FrontendObjC++ > LLVM::FrontendObjCThese are actually testing llvm-gcc, not llvm. If you build and install llvm-gcc, and tell llvm where it is, they should work.> LLVM::TransformsThese should not fail and indicate some kind of problem.
On Thu, Dec 2, 2010 at 5:37 PM, Scott Ricketts <sricketts at maxentric.com> wrote:> I recently experienced the same issue as below with LLVM 2.8 on Mac OS > 10.5.8. I can load the pass with the debug version of opt, but not the > optimized version.Same thing happens for me on ToT (Release+Asserts) under 10.6.5, with "gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)": % opt -load lib/libLLVMHello.dylib Error opening 'lib/libLLVMHello.dylib': dlopen(lib/libLLVMHello.dylib, 9): Symbol not found: __ZN4llvm12FunctionPass14doFinalizationERNS_6ModuleE Referenced from: /opt/llvm/lib/libLLVMHello.dylib Expected in: flat namespace in /opt/llvm/lib/libLLVMHello.dylib -load request ignored. But 'make check' is clean for me. I started a possibly related thread a couple of weeks ago: http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-November/036289.html ... in which I griped about --enable-optimized breaking dynamically loadable pass libraries. I haven't found a solution yet. -ben