{"action":"created","issue":{"url":"https://api.github.com/repos/cpi-llvm/llvm/issues/1","labels_url":"https://api.github.com/repos/cpi-llvm/llvm/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/cpi-llvm/llvm/issues/1/comments","events_url":"https://api.github.com/repos/cpi-llvm/llvm/issues/1/events","html_url":"https://github.com/cpi-llvm/llvm/issues/1","id":59621613,"number":1,"title":"LLVM ERROR: trying to redefine an CPI interface function","user":{"login":"pjlantz","id":197917,"avatar_url":"https://avatars.githubusercontent.com/u/197917?v=3","gravatar_id":"","url":"https://api.github.com/users/pjlantz","html_url":"https://github.com/pjlantz","followers_url":"https://api.github.com/users/pjlantz/followers","following_url":"https://api.github.com/users/pjlantz/following{/other_user}","gists_url":"https://api.github.com/users/pjlantz/gists{/gist_id}","starred_url":"https://api.github.com/users/pjlantz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjlantz/subscriptions","organizations_url":"https://api.github.com/users/pjlantz/orgs","repos_url":"https://api.github.com/users/pjlantz/repos","events_url":"https://api.github.com/users/pjlantz/events{/privacy}","received_events_url":"https://api.github.com/users/pjlantz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-03T10:21:06Z","updated_at":"2015-04-01T01:17:37Z","closed_at":null,"body":"I'm using the tarball from your webpage and I get the following errors when compiling the basic.c test code. \r\n\r\n> clang -flto -fcps -O0 -v test.c\r\nclang version 3.3.1 \r\nTarget: i386-pc-linux-gnu\r\nThread model: posix\r\n \"/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\r\nclang -cc1 version 3.3.1 based upon LLVM 3.3.1 default target i386-pc-linux-gnu\r\nignoring nonexistent directory \"/include\"\r\n#include \"...\" search starts here:\r\n#include <...> search starts here:\r\n /usr/local/include\r\n /usr/local/bin/../lib/clang/3.3.1/include\r\n /usr/include/i386-linux-gnu\r\n /usr/include\r\nEnd of search list.\r\n \"/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\r\nvoid (i8**, i8*, <2 x i32>)* bitcast (void (i8**, i8*, i64)* @__llvm__cpi_set_bounds to void (i8**, i8*, <2 x i32>)*)\r\nLLVM ERROR: trying to redefine an CPI interface function\r\nclang-3.3: error: linker command failed with exit code 1 (use -v to see invocation)"},"comment":{"url":"https://api.github.com/repos/cpi-llvm/llvm/issues/comments/88301977","html_url":"https://github.com/cpi-llvm/llvm/issues/1#issuecomment-88301977","issue_url":"https://api.github.com/repos/cpi-llvm/llvm/issues/1","id":88301977,"user":{"login":"xjtuwxg","id":2418907,"avatar_url":"https://avatars.githubusercontent.com/u/2418907?v=3","gravatar_id":"","url":"https://api.github.com/users/xjtuwxg","html_url":"https://github.com/xjtuwxg","followers_url":"https://api.github.com/users/xjtuwxg/followers","following_url":"https://api.github.com/users/xjtuwxg/following{/other_user}","gists_url":"https://api.github.com/users/xjtuwxg/gists{/gist_id}","starred_url":"https://api.github.com/users/xjtuwxg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjtuwxg/subscriptions","organizations_url":"https://api.github.com/users/xjtuwxg/orgs","repos_url":"https://api.github.com/users/xjtuwxg/repos","events_url":"https://api.github.com/users/xjtuwxg/events{/privacy}","received_events_url":"https://api.github.com/users/xjtuwxg/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T01:17:37Z","updated_at":"2015-04-01T01:17:37Z","body":"I also got this issue when running their test program:\r\n\r\n~/cpi/build-cmake/bin/clang -flto -fcps -O0 -c -emit-llvm basic.c -o basic.bc\r\n~/cpi/build-cmake/bin/llvm-dis basic.bc\r\n~/cpi/build-cmake/bin/clang -flto -fcps -O0 -c -emit-llvm arg_fct.c -o arg_fct.bc\r\n~/cpi/build-cmake/bin/llvm-dis arg_fct.bc\r\n~/cpi/build-cmake/bin/clang++ -flto -fcps -O0 -std=c++11 -c -emit-llvm vtable.cc -o vtable.bc\r\n~/cpi/build-cmake/bin/llvm-dis vtable.bc\r\n~/cpi/build-cmake/bin/clang -flto -fcps -O0 basic.c -o basic\r\nvoid (i8**, i8*, <2 x i32>)* bitcast (void (i8**, i8*, i64)* @__llvm__cpi_set_bounds to void (i8**, i8*, <2 x i32>)*)\r\nLLVM ERROR: trying to redefine an CPI interface function\r\nclang-3.3: error: linker command failed with exit code 1 (use -v to see invocation)\r\nmake: *** [basic] Error 1\r\nrm basic.bc vtable.bc arg_fct.bc\r\n"}}