Hi Kenneth,
thanks for the quick reply! My comments inline below:
> >I am trying to build GCC 4.5 on my Ubuntu 15.04 laptop but cannot get it
> >to compile. As far as I got, there are two distinct errors, which
> >probably affect other old versions of GCC and other recent distros as well.
>
> Why, oh why, would you need a GCC that old on a recent system?
To compile code that was known to compile correctly with GCC 4.5 and is
no longer accepted by GCC 4.9. (Later on, I found about `-fpermissive`
but I still think that `.eb` files should either work or be removed from
the repo if they cannot be built any more ;-))
> >Maybe the `EB_GCC` easyblock could be patched to add `MAKEINFO=missing`
> >in the initial steps, and only build documentation in the last step,
> >when it's actually useful? (and build dependencies are honored)
>
> That sounds reasonable, but would that actually fix your problem?
Well, *this* should fix the problem:
1. have older GCC `.eb` files list texinfo < 5.0 as a dependency::
builddependencies = [
('texinfo', '4.13', '', True),
]
2. have `EB_GCC` supply `MAKEINFO=missing` in all stages when the
build-dependencies are ignored.
If you don't have 1. then build will fail on all distributions that have
texinfo >= 5.0.0; but 2. is needed because `builddependencies` are
ignored in early GCC build stages.
> >(2) Still, compilation of `libgcc` fails with some error I cannot
> >explain.
> >
> >After working around the makeinfo issue, the build process fails with
> >this error::
> >
> > # multilibs.
> > /dev/shm/GCC/4.5.3/dummy-dummy/gcc-4.5.3/obj/./gcc/xgcc
> > -B/dev/shm/GCC/4.5.3/dummy-dummy/gcc-4.5.3/obj/./gcc/
> > -B/home/rmurri/.local/easybuild/software/GCC/4.5.3/x86_64-unknown-linux-gnu/bin/
> >
> > -B/home/rmurri/.local/easybuild/software/GCC/4.5.3/x86_64-unknown-linux-gnu/lib/
> > -isystem
> > /home/rmurri/.local/easybuild/software/GCC/4.5.3/x86_64-unknown-linux-gnu/include
> > -isystem
> > /home/rmurri/.local/easybuild/software/GCC/4.5.3/x86_64-unknown-linux-gnu/sys-include
> > -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual
> > -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem
> > ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
> > -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../.././gcc -I../../../libgcc
> > -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include
> > -I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS
> > -DUSE_TLS -o _ashldi3.o -MT _ashldi3.o -MD -MP -MF _ashldi3.dep -DL_ashldi3
> > -c ../../../libgcc/../gcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
> > In file included from /usr/include/stdio.h:27:0,
> > from ../../../libgcc/../gcc/tsystem.h:87,
> > from ../../../libgcc/../gcc/libgcc2.c:29:
> > /usr/include/features.h:364:25: fatal error: sys/cdefs.h: No such file
> > or directory
> > compilation terminated.
> > Makefile:370: recipe for target '_ashldi3.o' failed
> > ...
> > Makefile:21002: recipe for target 'bootstrap' failed
> > make: *** [bootstrap] Error 2
> > (at
> > easybuild/local/lib/python2.7/site-packages/easybuild/tools/run.py:360 in
> > parse_cmd_output)
> >
> >I cannot understand this error, as the `sys/cdefs.h` file is regularly
> >present in `/usr/include`::
> >
> > $ locate sys/cdefs.h
> > /usr/include/bsd/sys/cdefs.h
> > /usr/include/x86_64-linux-gnu/sys/cdefs.h
> >
> >Any suggestions?
>
> Maybe sys/cdefs.h moved, and GCC 4.5 isn't aware of that yet?
Well, `sys/cdefs.h` is included by `/usr/include/features.h` which is
*not* part of GCC. So it looks more like a missing component in the std
include path for `xgcc`.
> Have you tried something like: CPATH=/usr/include/x86_64-linux-gnu:$CPATH eb
> GCC-4.5.3.eb ?
Thanks for the suggestion! Unfortunately, it did not work -- same error.
Ciao,
R
--
Riccardo Murri
http://www.s3it.uzh.ch/about/team/#Riccardo.Murri
S3IT: Services and Support for Science IT
University of Zurich
Winterthurerstrasse 190, CH-8057 Zürich (Switzerland)
Tel: +41 44 635 4297
Fax: +41 44 635 6888