llvm-gcc Error:Incompatible plugin - llvm

I am new to llvm.When I try to compile c programs using llvm-gcc i get following error:
$ llvm-gcc test.c
Incompatible plugin version
cc1: error: Fail to initialize plugin /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/plugin/dragonegg.so
I am using ubuntu-11.04,and llvm-gcc-4.5
Please help.
Thanks

That means your dragonegg install is broken; compile your own, and/or complain to Ubuntu.

You can use dpkg-buildpackage to build your own llvm-gcc-4.5 and dragonegg debs. Another thing you may need to remember is changing the version in the debian/changelog file.

Related

OCaml compiler build failure

I checkout the latest OCaml source code and try to build on my OS X 10.10 machine
with gcc 4.9.2. I use the following command as suggested here.
$ ./configure && make world
Build gets no error but when I tried the compiler I just build by doing $ ./ocamlc, I get the following error:
Fatal error: unknown C primitive `caml_add_debug_info'
I believe this happens when you use the old bytecode interpreter to run the new compiler. Make sure you're using the new bytecode interpreter (ocamlrun).

error: invalid argument '-std=gnu99' not allowed with 'C++/ObjC++'

I am trying to compile C library called DevIL on OSX Maverick with Clang.I ran configure file then 'make' .I am getting the following error:
error: invalid argument '-std=gnu99' not allowed with 'C++/ObjC++'
Does it mean I am trying to compile C code with C++ compiler?How can I tell Clang to compile it as C lib?
My standard answer to such problems is to use MacPorts. Once MacPorts is installed, it's as simple as:
$ sudo port install libdevil

why am i seeing this libzdb configure error?

I am attempting to install libzdb on my macbook however I see the following error message when running the configure:
configure:13334: error: setjmp is required
the setjmp.h file resides within /usr/include and is specified within my "$PATH" as
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/include
Can someone please advise as to how i can rectify this issue?
thanks in advance
I've stumbled across this error while building one of my own programs when I wanted to use setjmp() and longjmp(). For some reason, the toolchain that resides in / on OS X is flawed, and the <setjmp.h> header file is missing the declarations and data types.
To fix it, I had to download Xcode (damn!) and tell the compiler to look for the headers in the freshly installed MacOSX10.7.sdk (or 8) folder:
clang -Wall -o foo foo.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
ok finally figured it out. For those who have seen messages like this be warned that the configure logs can be misleading. It turned out the binary built fine, however it was failing during runtime because a few mysql libraries could not be found. using the following command *export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/* would fix the problem

GNU Radio version

How do I find out the version of GNU Radio that I have installed?
I would like the use their messaging libraries, but they are available on newer versions of gnuradio only and for some reason I'm getting a compilation error when I try to use the following code:
message_port_register_out(pmt::mp("out_message"));
I get the following error on compilation:
error: ‘message_port_register_out’ was not declared in this scope
It's supposed to be part of the gr_basic_block, which all blocks inherit from, but it's not compiling.
You can get the version number using python.
from gnuradio import gr
gr.version()
If you installed the complete package - not only the library - in a terminal window:
$ gnuradio-companion --version
GNU Radio Companion 3.7.2.1
or
$ gnuradio-config-info --version
3.7.2.1
According to the docs, message_port_register_out is a member of gr_basic_block. Based on the compilation error you have posted and the code snippet, I'd assume you need an instance to work with. It's hard to tell without more context however.

How to set gcc 4.3 default specs file?

When using gcc version 4.3.2, I see how to generate specs using:
$ /usr/local/gcc-4.3.2/bin/gcc -v
Using built-in specs
Now changing to the same directory as libgcc:
cd /usr/local/gcc-4.3.2/lib/gcc/x86_64-unknown-linux-gnu/4.3.2
/usr/local/gcc-4.3.2/bin/gcc -dumpspecs > specs
I have a populated specs file that I can modify. However, once that is done I still see that:
$ /usr/local/gcc-4.3.2/bin/gcc -v
Using built-in specs
How do I tell gcc to use that specs file by default rather than forcing me to pass a -specs parameter every compile? I would like it to match another system I have where I get the following:
$ /usr/local/gcc-4.3.2/bin/gcc -v
Reading specs from /usr/local/gcc-4.3.2/lib/gcc/i686-pc-linux-gnu/4.3.2/specs</code>
As you can see, the major difference between the two systems is that the existing setup is 32-bit and I am now trying to match that on a 64-bit system. The version of Linux is otherwise the same and I am compiling the same version of gcc. (With both systems gcc 4.3.2 is the second gcc installation, with 4.1.2 being used to compile 4.3.2)
As hinted at by the strace suggestion by Johannes Schaub - litb, it was a problem with where the compiler was looking for the file. As it turns out, the non-working installation had an environment variable set in the .bashrc that was causing the confusion.
The correct location for the specs file is indeed the same directory that libgcc is in. Just be sure you're looking there.
I used this command line:
/usr/bin/set-gcc-default-3.sh i686-pc-mingw32
but you'll probably want:
/usr/bin/set-gcc-default-4.sh i686-pc-linux-gnu
(Note the -4 instead of -3)
This is built using the "alternatives" stuff, please see
/usr/sbin/alternatives.exe --help
And also see pages such as http://linux.about.com/library/cmd/blcmdl8_alternatives.htm
You rebuild gcc with your specs file as part of the build!
A simpler solution is to create an alias:
alias gcc_Gary gcc -specs /<folder With Specs File>/newSpecsFile