This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling gcc 4.5.3


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]