problem installing gcc
Gedare Bloom
gedare at rtems.org
Mon Jan 2 22:15:45 UTC 2012
On Sun, Jan 1, 2012 at 9:12 AM, Ziaulhaque Qazi
<ziaulhaque.qazi at sesame.org.jo> wrote:
>
> Hi All
>
> Being a beginner of RTEMS in a virtual machine running SL5 (scientific Linux 5) , I am trying to install rtems-4.10.2 for power pc as my target is mvme 2300 board.
>
> I could install the binary utilities but at the time I tried to install gcc, it failed. I tried many times but it failed always.
>
> First time, it was declaring the gmp and mpfr not compatible. I installed the latest packages of the two but still installing gcc failed. However this time the error report was changed and I found a number of messages reporting something about mpfr.
>
One thought is that you need the development versions of those
libraries to build gcc; something like gmp-devel or gmp-dev or similar
and the same for mpfr. If you search for gmp / mpfr you should find
them. Also I think you need to have libmpc-devel to compile current
gcc versions. You can also fetch the sources for gmp/mpfr/mpc and
place them in the root directory of your gcc (softlink with name "gmp"
"mpfr" or "mpc" to the source trees of each). Then building gcc with
it configured as just --with-mpfr and --with-gmp should compile those
libraries for you.
Or find suitable RPMs to use.
> I configure the gcc as follows:
>
> ../gcc-4.4.6/configure --target=powerpc-rtems4.1
> 0.2 --prefix=/usr/local/rtems/rtems-4.10.2 --disable-libstdcxx-pch --with-gmp= "
> /usr/local/include/gmp.h" --with-mpfr= "/usr/local/include/mpfr.h" --with-gnu-as
> --with-gnu-ld --verbose --with-newlib --with-system-zlib --disable-win32-regist
> ry --disable-nls --without-included-gettext --enable-version-specific-runtime-li
> bs --enable-threads --enable-newlib-io-c99-formats --enable-languages="c,c++"
>
>
> And I obtained following warnings during configuration:
>
> configure: WARNING: you should use --build, --host, --target
> configure: WARNING: invalid host type: /usr/local/include/gmp.h
> configure: WARNING: you should use --build, --host, --target
> configure: WARNING: invalid host type: /usr/local/include/mpfr.h
> checking build system type... /usr/local/include/gmp.h
> checking host system type... /usr/local/include/gmp.h
>
> Running the command "make -w all install" I got error messages after a long run of this cammand as below:
>
> gcc -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -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 rs6000-c.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 -lmpfr -lgmp
> libbackend.a(builtins.o): In function `fold_builtin_2':
> /usr/local/rtems/source/tools/build/gcc/../../gcc-4.4.6/gcc/builtins.c:10459: undefined reference to `mpfr_jn'
> /usr/local/rtems/source/tools/build/gcc/../../gcc-4.4.6/gcc/builtins.c:10473: undefined reference to `mpfr_remainder'
> /usr/local/rtems/source/tools/build/gcc/../../gcc-4.4.6/gcc/builtins.c:10465: undefined reference to `mpfr_yn'
> libbackend.a(builtins.o): In function `do_mpfr_lgamma_r':
> /usr/local/rtems/source/tools/build/gcc/../../gcc-4.4.6/gcc/builtins.c:13466: undefined reference to `mpfr_lgamma'
> libbackend.a(builtins.o): In function `do_mpfr_remquo':
> /usr/local/rtems/source/tools/build/gcc/../../gcc-4.4.6/gcc/builtins.c:13388: undefined reference to `mpfr_remquo'
> libbackend.a(builtins.o): In function `fold_builtin_1':
> /usr/local/rtems/source/tools/build/gcc/../../gcc-4.4.6/gcc/builtins.c:10332: undefined reference to `mpfr_y0'
> /usr/local/rtems/source/tools/build/gcc/../../gcc-4.4.6/gcc/builtins.c:10338: undefined reference to `mpfr_y1'
> /usr/local/rtems/source/tools/build/gcc/../../gcc-4.4.6/gcc/builtins.c:10320: undefined reference to `mpfr_j0'
> /usr/local/rtems/source/tools/build/gcc/../../gcc-4.4.6/gcc/builtins.c:10326: undefined reference to `mpfr_j1'
> collect2: ld returned 1 exit status
> make[2]: *** [cc1-dummy] Error 1
> make[2]: Leaving directory `/usr/local/rtems/source/tools/build/gcc'
> make[1]: *** [all-gcc] Error 2
> make[1]: Leaving directory `/usr/local/rtems/source/tools/build'
> make: *** [all] Error 2
> make: Leaving directory `/usr/local/rtems/source/tools/build'
> ]0;root at sesame-10-1-22-47:/usr/local/rtems/source/tools/build [root at sesame-10-1-22-47 build]# exit
> exit
>
> I am alsp attaching the complete script which I used to store the command and message history. I need guidance of seniors to let me out of this situation and help me building rtems for MVME 2300 family.
>
> With Best Regard
>
> Qazi Muhammad Zia-ul-Haque
> Control Engineer
> SESAME
> Phone: +962-5-3511348 Ext: 239
> Cell: +962-79-5295521
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>
More information about the users
mailing list