public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* build failure of old GCC: .../libstdc++.so.6: version `GLIBCXX_3.4.30' not found
@ 2022-07-04 11:57 Vincent Lefevre
  2022-07-04 12:13 ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Lefevre @ 2022-07-04 11:57 UTC (permalink / raw)
  To: gcc-help

On a Debian/unstable machine, I'm trying to build old GCC, such as
one based on 0cc79337ad265aabccab63882a810f9dc509a9d0 (2021-04-20).
I'm using

  ../gcc-trunk/configure --prefix=$HOME/opt/gcc-trunk \
                         --enable-multiarch \
                         --enable-languages=c \
                         --program-suffix=-test

but "make" gives the following error:

/usr/bin/msgfmt: /home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.71)

while

cventin:~> /usr/bin/msgfmt --version
msgfmt (GNU gettext-tools) 0.21
[...]

gives no errors (and there is no issue when building GCC based on
d2a898666609452ef79a14feae1cadc3538e4b45 (current master) anyway).

What should I do?

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

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

* Re: build failure of old GCC: .../libstdc++.so.6: version `GLIBCXX_3.4.30' not found
  2022-07-04 11:57 build failure of old GCC: .../libstdc++.so.6: version `GLIBCXX_3.4.30' not found Vincent Lefevre
@ 2022-07-04 12:13 ` Jonathan Wakely
  2022-07-04 12:33   ` Vincent Lefevre
  2022-07-04 12:54   ` Vincent Lefevre
  0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Wakely @ 2022-07-04 12:13 UTC (permalink / raw)
  To: gcc-help

On Mon, 4 Jul 2022 at 12:58, Vincent Lefevre <vincent+gcc@vinc17.org> wrote:
>
> On a Debian/unstable machine, I'm trying to build old GCC, such as
> one based on 0cc79337ad265aabccab63882a810f9dc509a9d0 (2021-04-20).
> I'm using
>
>   ../gcc-trunk/configure --prefix=$HOME/opt/gcc-trunk \
>                          --enable-multiarch \
>                          --enable-languages=c \
>                          --program-suffix=-test
>
> but "make" gives the following error:
>
> /usr/bin/msgfmt: /home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.71)

Something is setting LD_LIBRARY_PATH so that the newly-built
libstdc++.so is being used.

Where in the build does it fail? I don't think LD_LIBRARY_PATH should
be set until running the testsuites.

> while
>
> cventin:~> /usr/bin/msgfmt --version
> msgfmt (GNU gettext-tools) 0.21
> [...]
>
> gives no errors (and there is no issue when building GCC based on
> d2a898666609452ef79a14feae1cadc3538e4b45 (current master) anyway).
>
> What should I do?

As a temporary workaround, you could try:

mkdir /tmp/bin
cat > /tmp/bin/msgfmt <<EOT
#!/bin/sh
unset LD_LIBRARY_PATH
/usr/bin/msgfmt "$@"
EOT

and then set PATH=/tmp/bin:$PATH before running make.

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

* Re: build failure of old GCC: .../libstdc++.so.6: version `GLIBCXX_3.4.30' not found
  2022-07-04 12:13 ` Jonathan Wakely
@ 2022-07-04 12:33   ` Vincent Lefevre
  2022-07-04 12:50     ` Jonathan Wakely
  2022-07-04 12:54   ` Vincent Lefevre
  1 sibling, 1 reply; 6+ messages in thread
From: Vincent Lefevre @ 2022-07-04 12:33 UTC (permalink / raw)
  To: gcc-help

On 2022-07-04 13:13:58 +0100, Jonathan Wakely via Gcc-help wrote:
> On Mon, 4 Jul 2022 at 12:58, Vincent Lefevre <vincent+gcc@vinc17.org> wrote:
> >
> > On a Debian/unstable machine, I'm trying to build old GCC, such as
> > one based on 0cc79337ad265aabccab63882a810f9dc509a9d0 (2021-04-20).
> > I'm using
> >
> >   ../gcc-trunk/configure --prefix=$HOME/opt/gcc-trunk \
> >                          --enable-multiarch \
> >                          --enable-languages=c \
> >                          --program-suffix=-test
> >
> > but "make" gives the following error:
> >
> > /usr/bin/msgfmt: /home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.71)
> 
> Something is setting LD_LIBRARY_PATH so that the newly-built
> libstdc++.so is being used.

Is the the same bug (or a similar one) as this one?

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

(though the error doesn't occur at the same place).

> Where in the build does it fail? I don't think LD_LIBRARY_PATH should
> be set until running the testsuites.

[...]
make[5]: Entering directory '/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/po'
msgfmt -o de.mo ../../../../gcc-trunk/libstdc++-v3/po/de.po
[...]

If I run "make" from this directory, I don't get any error.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

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

* Re: build failure of old GCC: .../libstdc++.so.6: version `GLIBCXX_3.4.30' not found
  2022-07-04 12:33   ` Vincent Lefevre
@ 2022-07-04 12:50     ` Jonathan Wakely
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2022-07-04 12:50 UTC (permalink / raw)
  To: gcc-help

On Mon, 4 Jul 2022 at 13:34, Vincent Lefevre <vincent+gcc@vinc17.org> wrote:
>
> On 2022-07-04 13:13:58 +0100, Jonathan Wakely via Gcc-help wrote:
> > On Mon, 4 Jul 2022 at 12:58, Vincent Lefevre <vincent+gcc@vinc17.org> wrote:
> > >
> > > On a Debian/unstable machine, I'm trying to build old GCC, such as
> > > one based on 0cc79337ad265aabccab63882a810f9dc509a9d0 (2021-04-20).
> > > I'm using
> > >
> > >   ../gcc-trunk/configure --prefix=$HOME/opt/gcc-trunk \
> > >                          --enable-multiarch \
> > >                          --enable-languages=c \
> > >                          --program-suffix=-test
> > >
> > > but "make" gives the following error:
> > >
> > > /usr/bin/msgfmt: /home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.71)
> >
> > Something is setting LD_LIBRARY_PATH so that the newly-built
> > libstdc++.so is being used.
>
> Is the the same bug (or a similar one) as this one?
>
>   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105688

Yes, it could be.

>
> (though the error doesn't occur at the same place).
>
> > Where in the build does it fail? I don't think LD_LIBRARY_PATH should
> > be set until running the testsuites.
>
> [...]
> make[5]: Entering directory '/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/po'
> msgfmt -o de.mo ../../../../gcc-trunk/libstdc++-v3/po/de.po
> [...]
>
> If I run "make" from this directory, I don't get any error.

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

* Re: build failure of old GCC: .../libstdc++.so.6: version `GLIBCXX_3.4.30' not found
  2022-07-04 12:13 ` Jonathan Wakely
  2022-07-04 12:33   ` Vincent Lefevre
@ 2022-07-04 12:54   ` Vincent Lefevre
  2022-07-18 16:34     ` Jonathan Wakely
  1 sibling, 1 reply; 6+ messages in thread
From: Vincent Lefevre @ 2022-07-04 12:54 UTC (permalink / raw)
  To: gcc-help

On 2022-07-04 13:13:58 +0100, Jonathan Wakely via Gcc-help wrote:
> On Mon, 4 Jul 2022 at 12:58, Vincent Lefevre <vincent+gcc@vinc17.org> wrote:
> >
> > On a Debian/unstable machine, I'm trying to build old GCC, such as
> > one based on 0cc79337ad265aabccab63882a810f9dc509a9d0 (2021-04-20).
> > I'm using
> >
> >   ../gcc-trunk/configure --prefix=$HOME/opt/gcc-trunk \
> >                          --enable-multiarch \
> >                          --enable-languages=c \
> >                          --program-suffix=-test
> >
> > but "make" gives the following error:
> >
> > /usr/bin/msgfmt: /home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.71)

With a54ce8865a885bca5ab9c4aa6ec725cd13c09901, this is:

/usr/bin/msgfmt: symbol lookup error: /usr/lib/x86_64-linux-gnu/libicuuc.so.71: undefined symbol: _ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE, version GLIBCXX_3.4.30

> Something is setting LD_LIBRARY_PATH so that the newly-built
> libstdc++.so is being used.

Indeed, using a wrapper with "printenv LD_LIBRARY_PATH" for msgfmt,
I get:

LD_LIBRARY_PATH: /home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libsanitizer/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libvtv/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libssp/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libgomp/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libitm/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libatomic/.libs:/home/vlefevre/software/gcc-build/./gcc:/home/vlefevre/software/gcc-build/./prev-gcc

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

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

* Re: build failure of old GCC: .../libstdc++.so.6: version `GLIBCXX_3.4.30' not found
  2022-07-04 12:54   ` Vincent Lefevre
@ 2022-07-18 16:34     ` Jonathan Wakely
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2022-07-18 16:34 UTC (permalink / raw)
  To: gcc-help

On Mon, 4 Jul 2022 at 13:54, Vincent Lefevre wrote:
>
> On 2022-07-04 13:13:58 +0100, Jonathan Wakely via Gcc-help wrote:
> > On Mon, 4 Jul 2022 at 12:58, Vincent Lefevre <vincent+gcc@vinc17.org> wrote:
> > >
> > > On a Debian/unstable machine, I'm trying to build old GCC, such as
> > > one based on 0cc79337ad265aabccab63882a810f9dc509a9d0 (2021-04-20).
> > > I'm using
> > >
> > >   ../gcc-trunk/configure --prefix=$HOME/opt/gcc-trunk \
> > >                          --enable-multiarch \
> > >                          --enable-languages=c \
> > >                          --program-suffix=-test
> > >
> > > but "make" gives the following error:
> > >
> > > /usr/bin/msgfmt: /home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.71)
>
> With a54ce8865a885bca5ab9c4aa6ec725cd13c09901, this is:
>
> /usr/bin/msgfmt: symbol lookup error: /usr/lib/x86_64-linux-gnu/libicuuc.so.71: undefined symbol: _ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE, version GLIBCXX_3.4.30
>
> > Something is setting LD_LIBRARY_PATH so that the newly-built
> > libstdc++.so is being used.
>
> Indeed, using a wrapper with "printenv LD_LIBRARY_PATH" for msgfmt,
> I get:
>
> LD_LIBRARY_PATH: /home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libsanitizer/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libvtv/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libssp/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libgomp/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libitm/.libs:/home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libatomic/.libs:/home/vlefevre/software/gcc-build/./gcc:/home/vlefevre/software/gcc-build/./prev-gcc

I think this patch from Alpine should fix it:

https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/gcc/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch

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

end of thread, other threads:[~2022-07-18 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 11:57 build failure of old GCC: .../libstdc++.so.6: version `GLIBCXX_3.4.30' not found Vincent Lefevre
2022-07-04 12:13 ` Jonathan Wakely
2022-07-04 12:33   ` Vincent Lefevre
2022-07-04 12:50     ` Jonathan Wakely
2022-07-04 12:54   ` Vincent Lefevre
2022-07-18 16:34     ` Jonathan Wakely

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).