Charles Jacobsen
2013-Jun-14 14:25 UTC
[LLVMdev] Building pass out of source with cmake: undefined symbol error
Hmmm, I just thought of something. Perhaps I need to set the MODULE cmake flag (via -DMODULE=ON)? I will try this today. (I remembered the LOADABLE_MODULE=1 flag in the makefile, and the if ( MODULE ) check in the AddLLVM cmake module.) ________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Charles Jacobsen [charlie.jacobsen at utah.edu] Sent: Friday, June 14, 2013 7:55 AM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] Building pass out of source with cmake: undefined symbol error After building the pass out of source with cmake, when I load it with opt, I get an undefined symbol error: _ZTIN4llvm12FunctionPassE undefined in the .so. (_ZTVN4llvm12FunctionPassE is also undefined -- a "U" when I run nm. This symbol -is- in all of the llvm libraries.) Platform: ubuntu 12.10 LTS, x86 64 gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Build: LLVM 3.2 (svn), tried debug and release Test suite builds and runs without error No other versions of llvm or clang are present I also tried building debug and release versions of the pass. No build errors or warnings when producing the pass .so. I don't see this symbol in any of the llvm libraries, so I have no idea how it is being introduced into the pass .so. Interestingly, when I build llvm in source with autotools, and build the pass in source with the provided makefile template, it works, and _ZTIN4llvm12FunctionPassE is not in the pass .so. (Also, _ZTVN4llvm12FunctionPassE is now "B" when I run nm.). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130614/245085da/attachment.html>
Charles Jacobsen
2013-Jun-14 17:34 UTC
[LLVMdev] Building pass out of source with cmake: undefined symbol error
Still no go. I'm going to experiment building out of source manually with the cmake build and autotools build. I should've mentioned that I'm attempting this with the hello world pass example. ________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Charles Jacobsen [charlie.jacobsen at utah.edu] Sent: Friday, June 14, 2013 8:25 AM To: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Building pass out of source with cmake: undefined symbol error Hmmm, I just thought of something. Perhaps I need to set the MODULE cmake flag (via -DMODULE=ON)? I will try this today. (I remembered the LOADABLE_MODULE=1 flag in the makefile, and the if ( MODULE ) check in the AddLLVM cmake module.) ________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Charles Jacobsen [charlie.jacobsen at utah.edu] Sent: Friday, June 14, 2013 7:55 AM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] Building pass out of source with cmake: undefined symbol error After building the pass out of source with cmake, when I load it with opt, I get an undefined symbol error: _ZTIN4llvm12FunctionPassE undefined in the .so. (_ZTVN4llvm12FunctionPassE is also undefined -- a "U" when I run nm. This symbol -is- in all of the llvm libraries.) Platform: ubuntu 12.10 LTS, x86 64 gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Build: LLVM 3.2 (svn), tried debug and release Test suite builds and runs without error No other versions of llvm or clang are present I also tried building debug and release versions of the pass. No build errors or warnings when producing the pass .so. I don't see this symbol in any of the llvm libraries, so I have no idea how it is being introduced into the pass .so. Interestingly, when I build llvm in source with autotools, and build the pass in source with the provided makefile template, it works, and _ZTIN4llvm12FunctionPassE is not in the pass .so. (Also, _ZTVN4llvm12FunctionPassE is now "B" when I run nm.). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130614/3df371d2/attachment.html>
Charles Jacobsen
2013-Jun-14 20:36 UTC
[LLVMdev] Building pass out of source with cmake: undefined symbol error
Ah! Think I figured it out -- it's rtti. When I build with -fno-rtti, the spurious symbol disappears. Blargh, that was complicated. I'm going to try an out-of-source cmake build now. So far this has been a soliloquy, hope it helps someone else. ________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Charles Jacobsen [charlie.jacobsen at utah.edu] Sent: Friday, June 14, 2013 11:34 AM To: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Building pass out of source with cmake: undefined symbol error Still no go. I'm going to experiment building out of source manually with the cmake build and autotools build. I should've mentioned that I'm attempting this with the hello world pass example. ________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Charles Jacobsen [charlie.jacobsen at utah.edu] Sent: Friday, June 14, 2013 8:25 AM To: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Building pass out of source with cmake: undefined symbol error Hmmm, I just thought of something. Perhaps I need to set the MODULE cmake flag (via -DMODULE=ON)? I will try this today. (I remembered the LOADABLE_MODULE=1 flag in the makefile, and the if ( MODULE ) check in the AddLLVM cmake module.) ________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Charles Jacobsen [charlie.jacobsen at utah.edu] Sent: Friday, June 14, 2013 7:55 AM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] Building pass out of source with cmake: undefined symbol error After building the pass out of source with cmake, when I load it with opt, I get an undefined symbol error: _ZTIN4llvm12FunctionPassE undefined in the .so. (_ZTVN4llvm12FunctionPassE is also undefined -- a "U" when I run nm. This symbol -is- in all of the llvm libraries.) Platform: ubuntu 12.10 LTS, x86 64 gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Build: LLVM 3.2 (svn), tried debug and release Test suite builds and runs without error No other versions of llvm or clang are present I also tried building debug and release versions of the pass. No build errors or warnings when producing the pass .so. I don't see this symbol in any of the llvm libraries, so I have no idea how it is being introduced into the pass .so. Interestingly, when I build llvm in source with autotools, and build the pass in source with the provided makefile template, it works, and _ZTIN4llvm12FunctionPassE is not in the pass .so. (Also, _ZTVN4llvm12FunctionPassE is now "B" when I run nm.). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130614/ee408e12/attachment.html>
Maybe Matching Threads
- [LLVMdev] Building pass out of source with cmake: undefined symbol error
- [LLVMdev] Building pass out of source with cmake: undefined symbol error
- [LLVMdev] Building pass out of source with cmake: undefined symbol error
- Problems with DOS printing from W2K on Samba
- [LLVMdev] Pass registered multiple times!