Re: Compiling gcc 4.5.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When I try to configure without --enable-build-with-cxx I get a different error on make...

gcc  -g -fkeep-inline-functions -DIN_GCC   -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 -fno-common  -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 i386-c.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o \
  dummy-checksum.o main.o tree-browser.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -lcloog  -lppl_c -lppl -lgmpxx -lmpc -lmpfr -lgmp -rdynamic -ldl  -L../zlib -lz 
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libppl_c.so: undefined reference to `std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)@GLIBCXX_3.4.15'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libppl_c.so: undefined reference to `std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)@GLIBCXX_3.4.15'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libppl_c.so: undefined reference to `std::__detail::_List_node_base::_M_unhook()@GLIBCXX_3.4.15'
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libppl_c.so: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)@GLIBCXX_3.4.15'
collect2: ld returned 1 exit status
make[3]: *** [cc1-dummy] Error 1
rm gcc.pod
make[3]: Leaving directory `/opt/gcc4.5.3/BUILD/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/opt/gcc4.5.3/BUILD'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/opt/gcc4.5.3/BUILD'
make: *** [all] Error 2

I actually successfully compiled 4.5.3 and installed in /usr/local/ without any special flags, but naively removed the build directory, not realizing that it was required by the installed binaries.  Doh.  Now I am just trying to do an isolated install in /opt, but I have not been able to successfully compile since my first attempt.  I also have gcc 3.4 installed via the compat packages available in the fedora repos.

Dan

On Oct 15, 2011, at 2:42 pm, Jonathan Wakely wrote:

> On 15 October 2011 22:24, Daniel Fulton wrote:
>> I'm trying to install gcc 4.5.3 (alongside the default 4.6.x) on my desktop running Fedora 15.
>> 
>> I've tried different configure settings, but most recently:
>> ../gcc-4.5.3/configure CC=gcc CXX=g++ --prefix=/opt/gcc4.5.3/gcc453 --program-suffix=4.5.3 --disable-multilibs --disable-shared --enable-threads=posix --enable-build-with-cxx
>> 
>> When I try to make gcc I get the following error:
>> 
>> make -j 4 bootstrap
> 
> "make bootstrap" hasn't been the way to build gcc for many years, just
> "make" will do.
> 
>> g++  -I../../gcc-4.5.3/libcpp -I. -I../../gcc-4.5.3/libcpp/../include -I../../gcc-4.5.3/libcpp/include  -g -W -Wall -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -I../../gcc-4.5.3/libcpp -I. -I../../gcc-4.5.3/libcpp/../include -I../../gcc-4.5.3/libcpp/include  -c -o directives-only.o -MT directives-only.o -MMD -MP -MF .deps/directives-only.Tpo ../../gcc-4.5.3/libcpp/directives-only.c
>> yes
>> In file included from ../../gcc-4.5.3/libcpp/system.h:341:0,
>>                 from ../../gcc-4.5.3/libcpp/charset.c:22:
>> ../../gcc-4.5.3/libcpp/../include/libiberty.h:106:36: error: new declaration ‘char* basename(const char*)’
>> /usr/include/string.h:603:28: error: ambiguates old declaration ‘const char* basename(const char*)’
>> In file included from ../../gcc-4.5.3/libcpp/system.h:341:0,
>>                 from ../../gcc-4.5.3/libcpp/directives.c:24:
>> ../../gcc-4.5.3/libcpp/../include/libiberty.h:106:36: error: new declaration ‘char* basename(const char*)’
>> /usr/include/string.h:603:28: error: ambiguates old declaration ‘const char* basename(const char*)’
>> checking whether getopt is declared... In file included from ../../gcc-4.5.3/libcpp/system.h:341:0,
>>                 from ../../gcc-4.5.3/libcpp/directives-only.c:21:
>> ../../gcc-4.5.3/libcpp/../include/libiberty.h:106:36: error: new declaration ‘char* basename(const char*)’
>> /usr/include/string.h:603:28: error: ambiguates old declaration ‘const char* basename(const char*)’
>> make[3]: *** [directives-only.o] Error 1
>> make[3]: *** Waiting for unfinished jobs....
>> make[3]: *** [directives.o] Error 1
>> make[3]: *** [charset.o] Error 1
>> make[3]: Leaving directory `/opt/gcc4.5.3/BUILD/libcpp'
>> make[2]: *** [all-stage1-libcpp] Error 2
>> make[2]: *** Waiting for unfinished jobs....
>> 
>> Is there a fix for this?
> 
> Have you tried not using --enable-build-with-cxx ?




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux