[LLVMdev] bugpoint (and possibly others) need to be compiled with -rdynamic

Stephen Checkoway s at pahtak.org
Tue Aug 21 10:39:35 PDT 2012


Attached is a patch that fixes it for the cmake build. I'm not positive this is the right place to put it and I really have no idea where the check should go when using the autotools.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-rdynamic.patch
Type: application/octet-stream
Size: 663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120821/be3a9bbf/attachment.obj>
-------------- next part --------------


On Aug 21, 2012, at 1:01 PM, Stephen Checkoway wrote:

> While running the llvm tests, I get several error messages like these:
> 
> [1/1] Running the LLVM regression tests
> FAILED: cd /home/steve/llvm-build/test && /usr/local/bin/python /home/steve/llvm/utils/lit/lit.py --param build_config=. --param build_mode=Release -sv --param 
> llvm_site_config=/home/steve/llvm-build/test/lit.site.cfg --param llvm_unit_site_config=/home/steve/llvm-build/test/Unit/lit.site.cfg /home/steve/llvm-build/tes
> t
> -- Testing: 6378 tests, 4 threads --
> Testing: 0 
> FAIL: LLVM :: BugPoint/metadata.ll (351 of 6378)
> ******************** TEST 'LLVM :: BugPoint/metadata.ll' FAILED ********************
> Script:
> --
> /home/steve/llvm-build/bin/./bugpoint -load /home/steve/llvm-build/lib/./BugpointPasses.so /usr/home/steve/llvm/test/BugPoint/metadata.ll -output-prefix /usr/ho
> me/steve/llvm-build/test/BugPoint/Output/metadata.ll.tmp -bugpoint-crashcalls -silence-passes > /dev/null
> /home/steve/llvm-build/bin/./llvm-dis /usr/home/steve/llvm-build/test/BugPoint/Output/metadata.ll.tmp-reduced-simplified.bc -o - | /home/steve/llvm-build/bin/./
> FileCheck /usr/home/steve/llvm/test/BugPoint/metadata.ll
> --
> Exit Code: 1
> Command Output (stderr):
> --
> Error opening '/home/steve/llvm-build/lib/./BugpointPasses.so': /home/steve/llvm-build/lib/./BugpointPasses.so: Undefined symbol "_ZNK4llvm4Pass11getPassNameEv"
>  -load request ignored.
> bugpoint: Unknown command line argument '-bugpoint-crashcalls'.  Try: '/home/steve/llvm-build/bin/./bugpoint -help'
> bugpoint: Did you mean '-simplify-libcalls'?
> --
> 
> bugpoint defines the symbol:
> [sysnet80:~/llvm-build/bin] steve$ nm bugpoint |grep _ZNK4llvm4Pass11getPassNameEv
> 00000000007c0420 T _ZNK4llvm4Pass11getPassNameEv
> 
> Here's a smaller example showing the particular issue <http://pastebin.com/6fGHEy0q>. If you add -rdynamic when compiling a.c, it works correctly:
> Linux:
> [hilbert:/tmp] steve$ clang -fPIC -rdynamic a.c -ldl
> [hilbert:/tmp] steve$ ./a.out
> 
> FreeBSD:
> [sysnet80:/tmp] steve$ clang -fPIC -rdynamic a.c
> [sysnet80:/tmp] steve$ ./a.out
> 
> -- 
> Stephen Checkoway
> 
> 
> 
> 
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 

-- 
Stephen Checkoway







More information about the llvm-dev mailing list