[LLVMdev] llvm-g++ does not work!

Duncan Sands baldrick at free.fr
Tue Oct 2 11:54:06 PDT 2012


Hi Reza,

> I am using PinaVM which is a prototype of a SystemC front-end based on "LLVM".
> The only version that it works with is 2.8. Also to test PinaVM, we need
> llvm-g++ (I think clang does not work). However, when I want to run an example,
> i get the following error, which i think is related to llvm-g++:

this is not llvm-g++, this is the dragonegg plugin which someone (not the LLVM
project) is distributing as "llvm-gcc", an endless source of confusion.

> reza at RezaUbuntu:~/pinavm-pinavm/systemc-examples/jerome-chain$ make promela
> llvm-g++ -fno-inline-functions -I../../external/systemc-2.2.0/src/
> -I../../external/TLM-2009-07-15/include/tlm -I../../external/basic -emit-llvm -c
> main.cpp -o main.bc

First off, dragonegg doesn't know -emit-llvm, use -fplugin-arg-dragonegg-emit-ir
or -flto instead.  Secondly, to stop the LLVM IR produced being passed to the
system assembler, use -S rather than -c (in which case the output would better
be named main.ll).  In all this gives:

llvm-g++ -fno-inline-functions -I../../external/systemc-2.2.0/src/ 
-I../../external/TLM-2009-07-15/include/tlm -I../../external/basic -flto -S 
main.cpp -o main.ll

> Potential incompatible plugin version. GCC: 4.5.3. Expected: 4.5.4

What's more, the GCC and dragonegg versions don't match.  This is a bad idea.
Where did you get "llvm-gcc" from?  You should ask them to fix this.

Ciao, Duncan.

> Defines 'dragonegg_disable_version_check' as env variable to remove this warning
> Please note that unexpected errors might occur.
> llvm-link main.bc -o main.linked.bc
> llvm-link: main.bc:1:1: error: expected top-level entity
> ELF??4(VS???????????????????????
> ^
> llvm-link: error loading file 'main.bc'
> make: *** [main.linked.bc] Error 1
>
>
> It shows the main.bc is not a bitcode file. Most likely the llvm-g++ is broken.
> Would you please let me know your opinion about it, and tell me how i can fix it?
>
> Thank you,
> Reza
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list