all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thiago Jung Bauermann via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 49935@debbugs.gnu.org
Subject: bug#49935: gcc-4.8 fails to build with recent GCC versions
Date: Sat, 07 Aug 2021 20:07:32 -0300	[thread overview]
Message-ID: <3505131.mCAMElSiHm@popigai> (raw)

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







             reply	other threads:[~2021-08-07 23:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 23:07 Thiago Jung Bauermann via Bug reports for GNU Guix [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3505131.mCAMElSiHm@popigai \
    --to=bug-guix@gnu.org \
    --cc=49935@debbugs.gnu.org \
    --cc=bauermann@kolabnow.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.