Bug 100345 - gcc 11.1 build "make -n install" fails linking gcov undefined reference to std::__throw_bad_array_new_length()
Summary: gcc 11.1 build "make -n install" fails linking gcov undefined reference to st...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 11.1.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-29 22:36 UTC by Mark Hittinger
Modified: 2022-11-30 21:23 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2021-04-29 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hittinger 2021-04-29 22:36:41 UTC
Attempting to build gcc-11.1 "make" succeeds but "make -n install" fails when it attempts to link gcov with an undefined symbol 

std::__throw_bad_array_new_length()

I believe that the build is using the system default libstdc++.a rather than the gcc-11 built version.

Modifying gcc-11.1.0-obj/gcc/Makefile to link gcov with

"-L ../x86_64-pc-linux-gnu/libstdc++-v3/src/.libs"

succeeds.
Comment 1 Jonathan Wakely 2021-04-29 23:12:20 UTC
Please provide your configure command and details of the build environment.
Comment 2 Mark Hittinger 2021-04-29 23:19:45 UTC
../gcc-11.1.0/configure \
   --prefix=/usr/local/gcc1110 \
   --disable-multilib \
   --enable-languages=c,c++,fortran

x64 fedora using binutils-2.36 and gcc 10.2
Comment 3 Andrew Pinski 2021-04-30 00:33:01 UTC
For some reason it is relinking gcov. This normally does not happen.
Comment 4 Andrew Pinski 2021-04-30 00:35:01 UTC
You are going to have to provide the whole build log to figure out why this is happening.

Are you using a network mounted drive?  If so do they have the time syncronized between them.
Comment 5 Richard Biener 2021-04-30 06:55:41 UTC
Why do you use -n?  That might disrupt things.
Comment 6 DocMAX 2021-05-24 09:56:34 UTC
check: https://github.com/xenia-project/xenia/issues/1819
Comment 7 Jonathan Wakely 2021-05-24 11:33:07 UTC
(In reply to DocMAX from comment #6)
> check: https://github.com/xenia-project/xenia/issues/1819

I don't think this is related, I think you're just linking wrong.
Comment 8 Andrew Pinski 2022-11-30 21:23:42 UTC
You can't use "make -n install" If you want to do an install to a different directory you can use DESTDIR to do that as documented at https://gcc.gnu.org/install/finalinstall.html .