[cfe-users] LLVM ERROR: A @@ version cannot be undefined when linking with lto

Ming Zhao mingzhao at gmail.com
Tue Mar 18 21:54:13 PDT 2014


The object files were compiled by clang++ with -flto

The link command used by clang(sort of):

 "/usr/lrte/bin/x86_64-lrte-linux-gnu-ld" -v --sysroot=/ -z relro
--hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -o
/dev/shm/mzhao/build/home/mzhao/g/main/opt/gen-obj/net/base/sctp-socket_test
//usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o
//usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o
//usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o
-L//usr/lib/gcc/x86_64-linux-gnu/4.8
-L//usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu
-L//lib/x86_64-linux-gnu -L//lib/../lib64 -L//usr/lib/x86_64-linux-gnu
-L//usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -L//lib -L//usr/lib
-plugin /usr/lrte/bin/../lib/LLVMgold.so -plugin-opt=mcpu=x86-64 *.o
-lstdc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc
//usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o
//usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o

Then it gave message:

LLVM ERROR: A @@ version cannot be undefined

How can I debug this problem?

The linker version is: GNU gold (GNU Binutils 2.24) 1.11

Clang version is 3.4

Thanks!



More information about the cfe-users mailing list