public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/102389] New: [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491
@ 2021-09-17 19:12 pinskia at gcc dot gnu.org
  2021-09-17 19:13 ` [Bug bootstrap/102389] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17 19:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102389
           Summary: [12 Regression] --with-build-config=bootstrap-lto
                    bootstrap is broken due to r12-3491
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: build, lto
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

checking locale.h presence... libtool: link: nm  .libs/lto-plugin.o   |  |
/bin/sed 's/.* //' | sort | uniq > .libs/liblto_plugin.exp
./libtool: eval: line 1118: syntax error near unexpected token `|'
./libtool: eval: line 1118: `nm  .libs/lto-plugin.o   |  | /bin/sed 's/.* //' |
sort | uniq > .libs/liblto_plugin.exp'
Makefile:466: recipe for target 'liblto_plugin.la' failed
make[4]: *** [liblto_plugin.la] Error 2



----- CUT ----

After r12-3491-g9e58de3ce00, nm is used but libtool's configure breaks (it
looks like it was always broken, just we did not use that feature of libtool
until now):
configure:7427: checking command to parse nm output from 
/home/ubuntu/src/upstream-gcc-aarch64/gcc/objdir/./prev-gcc/xgcc
-B/home/ubuntu/src/upstream-gcc-aarch64/gcc/objdir/./prev-gcc/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/bin/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/bin/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/lib/ -isystem
/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/include -isystem
/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/sys-include   -fno-checking
object
configure:7545: 
/home/ubuntu/src/upstream-gcc-aarch64/gcc/objdir/./prev-gcc/xgcc
-B/home/ubuntu/src/upstream-gcc-aarch64/gcc/objdir/./prev-gcc/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/bin/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/bin/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/lib/ -isystem
/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/include -isystem
/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/sys-include   -fno-checking
-c -g -O2 -fno-checking -flto=jobserver -frandom-seed=1  conftest.c >&5
configure:7548: $? = 0
configure:7552: nm conftest.o \| sed -n -e 's/^.*[
]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \>
conftest.nm
configure:7555: $? = 0
configure:7609: 
/home/ubuntu/src/upstream-gcc-aarch64/gcc/objdir/./prev-gcc/xgcc
-B/home/ubuntu/src/upstream-gcc-aarch64/gcc/objdir/./prev-gcc/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/bin/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/bin/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/lib/ -isystem
/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/include -isystem
/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/sys-include   -fno-checking
-o conftest -g -O2 -fno-checking -flto=jobserver -frandom-seed=1 
-static-libstdc++ -static-libgcc  conftest.c conftstm.o >&5
conftest.c:6:12: error: variable 'nm_test_var' redeclared as function
    6 | extern int nm_test_var();
      |            ^
conftest.c:4:6: note: previously declared here
    4 |
      |      ^
lto1: fatal error: errors during merging of translation units
compilation terminated.
lto-wrapper: fatal error:
/home/ubuntu/src/upstream-gcc-aarch64/gcc/objdir/./prev-gcc/xgcc returned 1
exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
configure:7612: $? = 1
configure:7545: 
/home/ubuntu/src/upstream-gcc-aarch64/gcc/objdir/./prev-gcc/xgcc
-B/home/ubuntu/src/upstream-gcc-aarch64/gcc/objdir/./prev-gcc/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/bin/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/bin/
-B/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/lib/ -isystem
/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/include -isystem
/home/ubuntu/upstream-gcc/aarch64-unknown-linux-gnu/sys-include   -fno-checking
-c -g -O2 -fno-checking -flto=jobserver -frandom-seed=1  conftest.c >&5
configure:7548: $? = 0
configure:7552: nm conftest.o \| sed -n -e 's/^.*[
]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'
\> conftest.nm
configure:7555: $? = 0
cannot run sed -n -e 's/^.*[     ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][    
 ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'
configure:7647: result: failed

---- CUT ----
configure:7427: checking command to parse nm output from gcc object
configure:7545: gcc -c -g  conftest.c >&5
configure:7548: $? = 0
configure:7552: nm conftest.o \| sed -n -e 's/^.*[
]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \>
conftest.nm
configure:7555: $? = 0
configure:7609: gcc -o conftest -g  -static-libstdc++ -static-libgcc 
conftest.c conftstm.o >&5
configure:7612: $? = 0
configure:7650: result: ok

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

* [Bug bootstrap/102389] [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491
  2021-09-17 19:12 [Bug bootstrap/102389] New: [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491 pinskia at gcc dot gnu.org
@ 2021-09-17 19:13 ` pinskia at gcc dot gnu.org
  2021-09-17 19:16 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17 19:13 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug bootstrap/102389] [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491
  2021-09-17 19:12 [Bug bootstrap/102389] New: [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491 pinskia at gcc dot gnu.org
  2021-09-17 19:13 ` [Bug bootstrap/102389] " pinskia at gcc dot gnu.org
@ 2021-09-17 19:16 ` pinskia at gcc dot gnu.org
  2021-09-17 20:28 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-09-17
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine.  I have to see if using gcc-nm and exporting NM will fix this issue; it
might ...

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

* [Bug bootstrap/102389] [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491
  2021-09-17 19:12 [Bug bootstrap/102389] New: [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491 pinskia at gcc dot gnu.org
  2021-09-17 19:13 ` [Bug bootstrap/102389] " pinskia at gcc dot gnu.org
  2021-09-17 19:16 ` pinskia at gcc dot gnu.org
@ 2021-09-17 20:28 ` pinskia at gcc dot gnu.org
  2021-09-17 20:34 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Still fails:
conftest.c:6:12: error: variable 'nm_test_var' redeclared as function
    6 | extern int nm_test_var();
      |            ^
conftest.c:4:6: note: previously declared here
    4 |
      |      ^
lto1: fatal error: errors during merging of translation units
compilation terminated.

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

* [Bug bootstrap/102389] [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491
  2021-09-17 19:12 [Bug bootstrap/102389] New: [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491 pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-09-17 20:28 ` pinskia at gcc dot gnu.org
@ 2021-09-17 20:34 ` pinskia at gcc dot gnu.org
  2021-09-19 17:30 ` cvs-commit at gcc dot gnu.org
  2021-09-19 17:31 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17 20:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh according to https://sourceware.org/bugzilla/show_bug.cgi?id=25355, we need
to require binutils 2.35 or newer to do this now.

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

* [Bug bootstrap/102389] [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491
  2021-09-17 19:12 [Bug bootstrap/102389] New: [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491 pinskia at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-09-17 20:34 ` pinskia at gcc dot gnu.org
@ 2021-09-19 17:30 ` cvs-commit at gcc dot gnu.org
  2021-09-19 17:31 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-19 17:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:68aace4458364fee201889aaaedfce59beb972f2

commit r12-3666-g68aace4458364fee201889aaaedfce59beb972f2
Author: Andrew Pinski <apinski@marvell.com>
Date:   Sat Sep 18 01:08:17 2021 +0000

    Fix PR bootstrap/102389: --with-build-config=bootstrap-lto is broken

    So the problem here is that now the lto-plugin requires NM that works
    with LTO to work so we need to pass down NM just like we do for ranlib
    and ar.

    OK? Bootstrapped and tested with --with-build-config=bootstrap-lto on
aarch64-linux-gnu.
    Note you need to use binutils 2.35 or later too due to
ttps://sourceware.org/PR25355
    (I will submit another patch to improve the installation instructions too).

    config/ChangeLog:

            PR bootstrap/102389
            * bootstrap-lto-lean.mk: Handle NM like RANLIB AND AR.
            * bootstrap-lto.mk: Likewise.

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

* [Bug bootstrap/102389] [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491
  2021-09-17 19:12 [Bug bootstrap/102389] New: [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491 pinskia at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-09-19 17:30 ` cvs-commit at gcc dot gnu.org
@ 2021-09-19 17:31 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-19 17:31 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-09-19 17:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 19:12 [Bug bootstrap/102389] New: [12 Regression] --with-build-config=bootstrap-lto bootstrap is broken due to r12-3491 pinskia at gcc dot gnu.org
2021-09-17 19:13 ` [Bug bootstrap/102389] " pinskia at gcc dot gnu.org
2021-09-17 19:16 ` pinskia at gcc dot gnu.org
2021-09-17 20:28 ` pinskia at gcc dot gnu.org
2021-09-17 20:34 ` pinskia at gcc dot gnu.org
2021-09-19 17:30 ` cvs-commit at gcc dot gnu.org
2021-09-19 17:31 ` pinskia at gcc dot gnu.org

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