Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM ERROR: trying to redefine an CPI interface function #1

Open
pjlantz opened this issue Mar 3, 2015 · 1 comment
Open

LLVM ERROR: trying to redefine an CPI interface function #1

pjlantz opened this issue Mar 3, 2015 · 1 comment

Comments

@pjlantz
Copy link

pjlantz commented Mar 3, 2015

I'm using the tarball from your webpage and I get the following errors when compiling the basic.c test code.

clang -flto -fcps -O0 -v test.c
clang version 3.3.1
Target: i386-pc-linux-gnu
Thread model: posix
"/usr/local/bin/clang-3.3" -cc1 -triple i386-pc-linux-gnu -emit-llvm-bc -disable-free -main-file-name test.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu pentium4 -v -resource-dir /usr/local/bin/../lib/clang/3.3.1 -internal-isystem /usr/local/include -internal-isystem /usr/local/bin/../lib/clang/3.3.1/include -internal-externc-isystem /usr/include/i386-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -fdebug-compilation-dir /home/peppe -ferror-limit 19 -fmessage-length 106 -fcps -fcpi-at-lto -stack-protector 3 -mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o /tmp/test-ViCZ1a.o -x c test.c
clang -cc1 version 3.3.1 based upon LLVM 3.3.1 default target i386-pc-linux-gnu
ignoring nonexistent directory "/include"

include "..." search starts here:

include <...> search starts here:

/usr/local/include
/usr/local/bin/../lib/clang/3.3.1/include
/usr/include/i386-linux-gnu
/usr/include
End of search list.
"/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o a.out /usr/lib/gcc/i686-linux-gnu/4.9/../../../i386-linux-gnu/crt1.o /usr/lib/gcc/i686-linux-gnu/4.9/../../../i386-linux-gnu/crti.o /usr/lib/gcc/i686-linux-gnu/4.9/crtbegin.o -L/usr/lib/gcc/i686-linux-gnu/4.9 -L/usr/lib/gcc/i686-linux-gnu/4.9/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.9/../../../../lib32 -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib32 -L/usr/lib/gcc/i686-linux-gnu/4.9/../../.. -L/lib -L/usr/lib -plugin /usr/local/bin/../lib/LLVMgold.so -plugin-opt=mcpu=pentium4 /tmp/test-ViCZ1a.o /usr/local/bin/../lib/clang/3.3.1/lib/linux/libclang_rt.cps-i386.a -ldl /usr/local/bin/../lib/clang/3.3.1/lib/linux/libclang_rt.safestack-i386.a -ldl -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-linux-gnu/4.9/crtend.o /usr/lib/gcc/i686-linux-gnu/4.9/../../../i386-linux-gnu/crtn.o
void (i8**, i8_, <2 x i32>)_ bitcast (void (i8**, i8_, i64)_ @__llvm__cpi_set_bounds to void (i8*, i8, <2 x i32>)*)
LLVM ERROR: trying to redefine an CPI interface function
clang-3.3: error: linker command failed with exit code 1 (use -v to see invocation)

@xjtuwxg
Copy link

xjtuwxg commented Apr 1, 2015

I also got this issue when running their test program:

~/cpi/build-cmake/bin/clang -flto -fcps -O0 -c -emit-llvm basic.c -o basic.bc
~/cpi/build-cmake/bin/llvm-dis basic.bc
~/cpi/build-cmake/bin/clang -flto -fcps -O0 -c -emit-llvm arg_fct.c -o arg_fct.bc
~/cpi/build-cmake/bin/llvm-dis arg_fct.bc
~/cpi/build-cmake/bin/clang++ -flto -fcps -O0 -std=c++11 -c -emit-llvm vtable.cc -o vtable.bc
~/cpi/build-cmake/bin/llvm-dis vtable.bc
~/cpi/build-cmake/bin/clang -flto -fcps -O0 basic.c -o basic
void (i8**, i8_, <2 x i32>)_ bitcast (void (i8**, i8_, i64)_ @__llvm__cpi_set_bounds to void (i8*, i8, <2 x i32>))
LLVM ERROR: trying to redefine an CPI interface function
clang-3.3: error: linker command failed with exit code 1 (use -v to see invocation)
make: *
* [basic] Error 1
rm basic.bc vtable.bc arg_fct.bc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants