relocation R_X86_64_PC32 against symbol `_ZTVN4llvm11raw_ostreamE@@LLVM_7' can not be used
See original GitHub issueHi, trying to build llvmlite 0.27.1rc1 this build break came up:
++ -shared -I/usr/lib/llvm-7/include -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -flto assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp object_file.cpp -o libllvmlite.so -Wl,-z,relro -L/usr/lib/llvm-7/lib -flto -Wl,--exclude-libs=ALL -lLLVM-7
transforms.cpp:10:32: warning: 'unwrap' violates the C++ One Definition Rule [-Wodr]
inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) {
^
executionengine.cpp:53:27: note: return value type mismatch
inline TargetMachine *unwrap(LLVMTargetMachineRef P) {
^
/usr/lib/llvm-7/include/llvm/Target/TargetMachine.h:59:7: note: type name 'llvm::TargetMachine' should match type name 'llvm::PassManagerBuilder'
class TargetMachine {
^
/usr/lib/llvm-7/include/llvm/Transforms/IPO/PassManagerBuilder.h:59:7: note: the incompatible type is defined here
class PassManagerBuilder {
^
executionengine.cpp:53:27: note: 'unwrap' was previously declared here
inline TargetMachine *unwrap(LLVMTargetMachineRef P) {
^
executionengine.cpp:53:27: note: code may be misoptimized unless -fno-strict-aliasing is used
/usr/bin/ld: /tmp/ccmWo70g.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `_ZTVN4llvm11raw_ostreamE@@LLVM_7' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile.linux:22: libllvmlite.so] Error 1
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
error: lib.a: relocation R_X86_64_PC32 against symbol ...
a: relocation R_X86_64_PC32 against symbol `...' can not be used when making a shared object; recompile with -fPIC [duplicate] · Ask Question.
Read more >ERROR:: Relocation R_X86_64_PC32 against symbol ...
ERROR:: Relocation R_X86_64_PC32 against symbol `_ZN6GlobalD1Ev' can not be used when making a shared object. #12.
Read more >relocation R_X86_64_32S against `.rodata' can not be used ...
relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; ... /usr/local/lib/libgflags.a: could not read symbols: Bad value.
Read more >Final Order Changing Parenting Plan: No Objection to Moving ...
I want the court to permit the move and to enter my proposed parenting plan. What forms do I use? Form. Title. Download....
Read more >UrbanBound: Employee Relocation Management Software
Give employees the relocation support they need with UrbanBound. Our relocation management software provides a better relocation experience and controls ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

One workaround to do this is to compile llvmlite by forcing the usage of
-fPIC:You might not see this on Ubuntu machines because -fPIC and -pie are set by default (https://wiki.ubuntu.com/SecurityTeam/PIE).
I guess this needs to be fixed in llvmlite’s setup.py somehow!
I am getting a similar error again using
llvmdevfrom the numba channel: