all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#49935: gcc-4.8 fails to build with recent GCC versions
@ 2021-08-07 23:07 Thiago Jung Bauermann via Bug reports for GNU Guix
  2021-08-07 23:23 ` bug#49935: [PATCH] gnu: gcc-4.8: Fix build with GCC 6 and later Thiago Jung Bauermann via Bug reports for GNU Guix
  2024-01-19  8:33 ` bug#49935: gcc-4.8 fails to build with recent GCC versions Thomas Schwinge
  0 siblings, 2 replies; 3+ messages in thread
From: Thiago Jung Bauermann via Bug reports for GNU Guix @ 2021-08-07 23:07 UTC (permalink / raw)
  To: 49935

Hello,

According to the CI results, gcc-4.8 hasn’t built successfuly in a while:

https://ci.guix.gnu.org/search?query=gcc-4.8

I was able to fix the current build failure:

--8<---------------cut here---------------start------------->8---
In file included from ../../gcc-4.8.5/gcc/cp/except.c:1008:0:
cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’:
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here
--8<---------------cut here---------------end--------------->8---

by backporting a patch from GCC 4.9 (which I will send in the next email),
but then I hit another failure:

--8<---------------cut here---------------start------------->8---
In file included from /tmp/guix-build-gcc-4.8.5.drv-0/build/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/cstdlib:72:0,
                 from ../../../../gcc-4.8.5/libstdc++-v3/libsupc++/del_op.cc:38:
/gnu/store/358n1m2c8fbn6nr1mib4racjh7wfqfmy-gcc-10.3.0/include/c++/stdlib.h:38:12: error: ‘std::abort’ has not been declared
 using std::abort;
            ^
/gnu/store/358n1m2c8fbn6nr1mib4racjh7wfqfmy-gcc-10.3.0/include/c++/stdlib.h:39:12: error: ‘std::atexit’ has not been declared
 using std::atexit;
            ^
/gnu/store/358n1m2c8fbn6nr1mib4racjh7wfqfmy-gcc-10.3.0/include/c++/stdlib.h:40:12: error: ‘std::exit’ has not been declared
 using std::exit;
            ^
/gnu/store/358n1m2c8fbn6nr1mib4racjh7wfqfmy-gcc-10.3.0/include/c++/stdlib.h:51:12: error: ‘std::div_t’ has not been declared
 using std::div_t;
            ^
/gnu/store/358n1m2c8fbn6nr1mib4racjh7wfqfmy-gcc-10.3.0/include/c++/stdlib.h:52:12: error: ‘std::ldiv_t’ has not been declared
 using std::ldiv_t;
            ^
    ⋮
--8<---------------cut here---------------end--------------->8---

and so on, for several `std::` functions. Unlike the other old GCC build
failures I’ve investigated recently, I couldn’t find anyone else hitting
this specific problem. So we would have to create our own patch to fix it.

This message from Jakub Jelinek about a similar error in some unspecified
package:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/Q2U4JFUB5RL7DU2XJZ4BDTRE4PVULOMG/

makes me think that there’s something in GCC 4.8’s libstdc++ (probably
in libsupc++) doing something wrong with <stdlib.h> which trips GCC 6
and later.

However, I don’t think it’s worth making GCC 4.8 build again. It’s not
supported upstream anymore and if it’s needed in some bootstrap path,
it’s better to move it to ‘(gnu packages commencement)’ instead. In that
case, instead of fixing this build issue it’s likely better to just build
it with a GCC older than version 6.

Is it needed for bootstrap though? The definition of ‘%bootstrap-gcc’
suggests that it’s needed at least for armhf-linux but since aarch64-linux,
powerpc64le-linux and even i586-hurd use GCC 5.5, I suspect it would also
work for armhf-linux as well.

Therefore, my suggestion is to simply remove gcc-4.8.

-- 
Thanks,
Thiago







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-19 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 23:07 bug#49935: gcc-4.8 fails to build with recent GCC versions Thiago Jung Bauermann via Bug reports for GNU Guix
2021-08-07 23:23 ` bug#49935: [PATCH] gnu: gcc-4.8: Fix build with GCC 6 and later Thiago Jung Bauermann via Bug reports for GNU Guix
2024-01-19  8:33 ` bug#49935: gcc-4.8 fails to build with recent GCC versions Thomas Schwinge

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.