Public bug reported:

llvm-g++ gives errors when linking shared library:

foo.cc:
   int twice(int a){return 2*a;}

llvm-g++ -o foo.os -c -fPIC foo.cc
llvm-g++ -o libfoo.so -shared foo.os
/usr/bin/ld: /usr/lib/llvm/gcc-4.2/lib/gcc/x86_64-linux-gnu/4.2.1/crtbeginS.o: 
relocation R_X86_64_PC32 against undefined symbol `__cxa_finalize@@GLIBC_2.2.5' 
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

The error suggests adding -fPIC which is the case already.

Any hints?

** Affects: llvm-gcc-4.2 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
llvm-g++ fails to links shared lib on amd64
https://bugs.launchpad.net/bugs/251457
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to