public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/105688] GCC breaks build process if bootstrapping a downgraded GCC (was "GCC 11.3 doesn't build with the GNU gold linker (version 2.37-27.fc36) 1.16: libstdc++.so.6: version `GLIBCXX_3.4.30' not found")
Date: Wed, 24 Jan 2024 19:14:10 +0000	[thread overview]
Message-ID: <bug-105688-4-e5UKi8wcz2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105688-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105688

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=41818
                 CC|                            |jason at gcc dot gnu.org

--- Comment #46 from Jason Merrill <jason at gcc dot gnu.org> ---
The problematic line in the toplevel Makefile is

        $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \

The patch for PR22340 moved this from POSTSTAGE1_HOST_EXPORTS to HOST_EXPORTS,
but didn't mention that in its ChangeLog.   Which extended this issue to stage1
builds as well.

The rationale for doing this at all seems to be in order to make a just-built
tool find the just-built shared libraries that it links agains, but this also
affects pre-built tools that link against other versions of the same libraries.

And it doesn't justify adding target libraries in stage1.

For bfd/opcodes, it would seem better to set LD_LIBRARY_PATH in exec-tool.in so
that it only affects those tools specifically.  But if the new gcc links
against shared libmpc and such, that won't work, since if we set
LD_LIBRARY_PATH for gcc it's also set for the other tools it calls.

A fix for various system binutils might be to use exec-tool.in to splice out
the build directory from LD_LIBRARY_PATH.  But again, that won't help with my
system gcc.

I'm not sure what the best approach is for stage2+, where you might need to
load the previous libstdc++ for just-built tools.  I guess the splicing in
exec-tool.in would cover that as well, and in that case we don't need to worry
about system gcc.

For the moment I think I'm just going to propose reverting that bit of the
PR22340 fix.

  parent reply	other threads:[~2024-01-24 19:14 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-22 10:02 [Bug c/105688] New: Cannot build GCC 11.3 on Fedora 36 aros at gmx dot com
2022-05-22 10:52 ` [Bug c/105688] " aros at gmx dot com
2022-05-22 11:04 ` aros at gmx dot com
2022-05-22 12:57 ` pinskia at gcc dot gnu.org
2022-05-22 12:59 ` aros at gmx dot com
2022-05-22 13:00 ` aros at gmx dot com
2022-05-23  7:24 ` rguenth at gcc dot gnu.org
2022-05-23  7:31 ` pinskia at gcc dot gnu.org
2022-05-23  7:32 ` [Bug bootstrap/105688] " pinskia at gcc dot gnu.org
2022-05-23  7:35 ` pinskia at gcc dot gnu.org
2022-05-23  7:37 ` aros at gmx dot com
2022-05-23 14:13 ` aros at gmx dot com
2022-05-23 15:27 ` amonakov at gcc dot gnu.org
2022-05-23 18:36 ` pinskia at gcc dot gnu.org
2022-05-23 23:35 ` aros at gmx dot com
2022-05-23 23:48 ` pinskia at gcc dot gnu.org
2022-05-23 23:51 ` pinskia at gcc dot gnu.org
2022-05-23 23:52 ` sam at gentoo dot org
2022-05-24  9:07 ` aros at gmx dot com
2022-05-24  9:10 ` aros at gmx dot com
2022-05-24  9:11 ` pinskia at gcc dot gnu.org
2022-07-04 15:02 ` vincent-gcc at vinc17 dot net
2022-07-04 16:20 ` redi at gcc dot gnu.org
2022-07-04 16:23 ` redi at gcc dot gnu.org
2022-07-04 16:24 ` sam at gentoo dot org
2022-07-04 16:26 ` aros at gmx dot com
2022-07-05  8:53 ` vincent-gcc at vinc17 dot net
2022-07-05 16:08 ` redi at gcc dot gnu.org
2022-07-05 17:40 ` aros at gmx dot com
2022-07-05 18:04 ` [Bug bootstrap/105688] GCC 11.3 doesn't build with the GNU gold linker (version 2.37-27.fc36) 1.16: libstdc++.so.6: version `GLIBCXX_3.4.30' not found aros at gmx dot com
2022-07-05 18:27 ` aros at gmx dot com
2022-07-05 18:30 ` aros at gmx dot com
2022-07-06  1:48 ` pinskia at gcc dot gnu.org
2022-07-06  2:48 ` vincent-gcc at vinc17 dot net
2022-07-06  2:54 ` pinskia at gcc dot gnu.org
2022-07-06  2:59 ` vincent-gcc at vinc17 dot net
2022-07-06  3:06 ` vincent-gcc at vinc17 dot net
2022-07-06  3:14 ` pinskia at gcc dot gnu.org
2022-07-06  7:08 ` redi at gcc dot gnu.org
2022-07-06  9:43 ` vincent-gcc at vinc17 dot net
2022-07-06 10:52 ` aros at gmx dot com
2022-07-06 12:17 ` redi at gcc dot gnu.org
2022-07-06 15:29 ` aros at gmx dot com
2022-07-20 15:12 ` redi at gcc dot gnu.org
2023-04-24 19:46 ` arsen at gcc dot gnu.org
2023-04-24 19:55 ` arsen at gcc dot gnu.org
2024-01-24 10:28 ` [Bug bootstrap/105688] GCC breaks build process if bootstrapping a downgraded GCC (was "GCC 11.3 doesn't build with the GNU gold linker (version 2.37-27.fc36) 1.16: libstdc++.so.6: version `GLIBCXX_3.4.30' not found") redi at gcc dot gnu.org
2024-01-24 19:14 ` jason at gcc dot gnu.org [this message]
2024-01-24 22:37 ` jason at gcc dot gnu.org

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=bug-105688-4-e5UKi8wcz2@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).