1/1

|
Error compiling latest SVN gnu tool-chain
by ma_gm on Sep 24, 2010 |
ma_gm
Posts: 8 Joined: Jun 1, 2008 Last seen: Nov 9, 2012 |
||
|
I'm hitting this error while trying to compile the latest SVN gnu toolchain
~/openRISC_tools/SVN_LATEST/gnu-src > ./bld.sh --prefix /home/tools/obj/Linux --or1ksim /home/tools/obj/Linux/ --no-newlib ... gcc -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I../../srcw/gcc -I../../srcw/gcc/. -I../../srcw/gcc/../include -I../../srcw/gcc/../libcpp/include -I../../srcw/gcc/../libdecnumber -I../../srcw/gcc/../libdecnumber/dpd -I../libdecnumber ../../srcw/gcc/attribs.c -o attribs.o In file included from ../../srcw/gcc/rtl.h:28, from ../../srcw/gcc/attribs.c:30: ../../srcw/gcc/real.h:28:17: error: mpc.h: No such file or directory In file included from ../../srcw/gcc/rtl.h:28, from ../../srcw/gcc/attribs.c:30: ../../srcw/gcc/real.h:29: error: expected declaration specifiers or �...� before �mpc_ptr� ../../srcw/gcc/real.h:29: error: expected declaration specifiers or �...� before �mpc_srcptr� ../../srcw/gcc/real.h:29: error: expected declaration specifiers or �...� before �mpc_srcptr� ../../srcw/gcc/real.h:29: error: expected declaration specifiers or �...� before �mpc_rnd_t� ../../srcw/gcc/real.h:29: warning: function declaration isn�t a prototype make[1]: *** [attribs.o] Error 1 make[1]: Leaving directory `/home/miguel/openRISC_tools/SVN_LATEST/gnu-src/bld-or32/gcc' make: *** [all-gcc] Error 2 make (GCC) failed. Basically mpc.h header is not found. Any idea where is it supposed to live? Some system information > uname -a Linux ubuntu 2.6.28-19-generic #62-Ubuntu SMP Wed Jul 28 01:56:51 UTC 2010 i686 GNU/Linux > gcc --version gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3 ... Just installed or1ksim under /home/tools/obj/Linux area and gmp-4.3.2 and mpfr-2.3.3 prior to this build under /usr/local (make check was clean for both of them) Any help is appreciated Thanks |
|||
|
RE: Error compiling latest SVN gnu tool-chain
by julius on Sep 25, 2010 |
julius
Posts: 363 Joined: Jul 1, 2008 Last seen: May 17, 2021 |
||
|
Have you installed the mpc library?
See the section on what to install before attempting to build the 1.0rc1 version of the toolchain for information on installing this library. By the way, you may wish to instead build and use the 1.0rc1 version of the toolchain, rather than the latest revision in the working repository as it may have sections that are a work-in-progress and not be fully functional. See the guide on building the version 1.0rc1 toolchain here: http://opencores.org/openrisc,gnu_toolchain#1.0rc1install |
|||
|
RE: Error compiling latest SVN gnu tool-chain
by ma_gm on Sep 27, 2010 |
ma_gm
Posts: 8 Joined: Jun 1, 2008 Last seen: Nov 9, 2012 |
||
|
Thanks Julius
I had missed installing MPC. Nevertheless I'm still facing problems: - When I tried the pre-compiled version with apt-get as suggested in the installation guide didn't work (sudo apt-get install libmpc-dev libmpc2) libmpc-dev installed fine but libmpc2 wasn't found. Browsing with synaptics I could find only libmpc0. With libmpc0 after retrying the compilation I got some mpc problems again (this time later in the compilation process). Do I need to add any location to the list of repositories to get libmpc2 ? I also tried installing from the source (mpc-0.8.1.tar.gz). After that I'm now getting a related linker error ... gcc -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-ppoutput.o c-cppbuiltin.o c-objc-common.o c-dump.o c-pch.o c-parser.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o \ dummy-checksum.o main.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lmpc -lmpfr -lgmp -rdynamic -ldl -L../zlib -lz libbackend.a(builtins.o): In function `fold_builtin_1': /home/ma_gm/openRISC_tools/SVN_LATEST/gnu-src/bld-or32/gcc/../../srcw/gcc/builtins.c:9790: undefined reference to `mpc_atanh' /home/ma_gm/openRISC_tools/SVN_LATEST/gnu-src/bld-or32/gcc/../../srcw/gcc/builtins.c:9772: undefined reference to `mpc_atan' /home/ma_gm/openRISC_tools/SVN_LATEST/gnu-src/bld-or32/gcc/../../srcw/gcc/builtins.c:9778: undefined reference to `mpc_asinh' /home/ma_gm/openRISC_tools/SVN_LATEST/gnu-src/bld-or32/gcc/../../srcw/gcc/builtins.c:9760: undefined reference to `mpc_asin' /home/ma_gm/openRISC_tools/SVN_LATEST/gnu-src/bld-or32/gcc/../../srcw/gcc/builtins.c:9784: undefined reference to `mpc_acosh' /home/ma_gm/openRISC_tools/SVN_LATEST/gnu-src/bld-or32/gcc/../../srcw/gcc/builtins.c:9766: undefined reference to `mpc_acos' libbackend.a(builtins.o): In function `fold_builtin_2': /home/ma_gm/openRISC_tools/SVN_LATEST/gnu-src/bld-or32/gcc/../../srcw/gcc/builtins.c:10114: undefined reference to `mpc_pow' collect2: ld returned 1 exit status make[1]: *** [cc1-dummy] Error 1 make[2]: Leaving directory `/home/ma_gm/openRISC_tools/SVN_LATEST/gnu-src/bld-or32/gcc' make: *** [all-gcc] Error 2 make (GCC) failed. I installed MPC in the default location (no prefix given so /usr/lib) so I would expect the system to find it. I will try the automated script next ... Thanks |
|||
|
RE: Error compiling latest SVN gnu tool-chain
by julius on Sep 27, 2010 |
julius
Posts: 363 Joined: Jul 1, 2008 Last seen: May 17, 2021 |
||
|
Is there a "make check" for the mpc library to ensure that it's working, if not installed, OK?
I suggest trying the automated build script, it doesn't use the unified build method used in the gnu-src/ path in the repository, although you may run into the same issues. Also, which Ubuntu version are you on? It's not immediately obvious from your previous posts. Thanks |
|||
|
RE: Error compiling latest SVN gnu tool-chain
by ma_gm on Sep 27, 2010 |
ma_gm
Posts: 8 Joined: Jun 1, 2008 Last seen: Nov 9, 2012 |
||
|
I'm running Ubuntu 9.04
MPC make check -> 4 of 57 tests failed No linking problem though. Not sure how important these failures are. Thanks |
|||
|
RE: Error compiling latest SVN gnu tool-chain
by julius on Sep 27, 2010 |
julius
Posts: 363 Joined: Jul 1, 2008 Last seen: May 17, 2021 |
||
|
I'm running Ubuntu 9.04
I've heard 9.04 isn't too friendly. I don't believe we aim to support it with our Launchpad.net packages, rather 9.10 and of course 10.04 which is a long term support (LTS) release. I personally run 32-bit Ubuntu 9.10 on an x86 machine, and it's fine. If it's possible I would recommend coming up to 9.10, or even the latest, 10.10, which is out pretty soon I guess. |
|||
|
RE: Error compiling latest SVN gnu tool-chain
by ma_gm on Sep 27, 2010 |
ma_gm
Posts: 8 Joined: Jun 1, 2008 Last seen: Nov 9, 2012 |
||
|
Yes, I was also thinking an upgrade is in order ;)
In any case I see the problem I was hitting. When I installed libmpc0 with synaptics and later on from the source I didn't uninstall libmpc0 somehow assuming it was overridden by the later. Looks like libmpc0 (installed under /usr/lib) was found before my new one (by default installed under /usr/local/lib) so after un-installing libmpc0 the compile went through. "make check" for mpc was using the locally compiled version of the lib not the installed one so it didn't catch this Thanks |
|||
|
RE: Error compiling latest SVN gnu tool-chain
by jeremybennett on Sep 27, 2010 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
|
Hi ma-gm It is the MPC dev package you need, since this installs the mpc.h header. I am surprised it is not working: 9.04 is not that old a build of Ubuntu, and as far as I am aware GCC 4.5.1 works on it (this should not be an OpenRISC specific issue). If you use Ubuntu's software install program, rather than apt-get and look for MPC packages, does it show the MPC dev package as being installed? ATB Jeremy
-- |
|||
|
RE: Error compiling latest SVN gnu tool-chain
by ma_gm on Sep 27, 2010 |
ma_gm
Posts: 8 Joined: Jun 1, 2008 Last seen: Nov 9, 2012 |
||
|
Hi Jeremy
Somehow lib PCM dev wasn't enough. Only after I installed from the source and uninstalled libpcm0 it started working It is ok for me now Thanks for the help |
|||
|
RE: Error compiling latest SVN gnu tool-chain
by jeremybennett on Sep 28, 2010 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
|
Hi ma_gm I think my post crossed with your last one. Looks like you had a clash of headers in the include path. Glad the problem is sorted now. ATB Jeremy |
|||
1/1

