public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
@ 2022-07-12 17:53 tkoenig at gcc dot gnu.org
  2022-07-12 18:02 ` [Bug target/106271] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2022-07-12 17:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106271
           Summary: Bootstrap on RISC-V on Ubuntu 22.04 LTS:
                    bits/libc-header-start.h: No such file or directory
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

I thought I would give the new gcc92 machine a spin and tried
bootstrapping gcc on it.

Configure was done with

../Gcc/configure --disable-multilib --prefix=$HOME
--enable-languages=c,c++,fortran

and the last few lines of output were

/home/tkoenig/trunk-bin/./gcc/xgcc -B/home/tkoenig/trunk-bin/./gcc/
-B/home/tkoenig/riscv64-unknown-linux-gnu/bin/
-B/home/tkoenig/riscv64-unknown-linux-gnu/lib/ -isystem
/home/tkoenig/riscv64-unknown-linux-gnu/include -isystem
/home/tkoenig/riscv64-unknown-linux-gnu/sys-include   -fno-checking -g -O2 -O2 
-g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
-isystem ./include  -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector  -fPIC -I. -I. -I../.././gcc -I../../../Gcc/libgcc
-I../../../Gcc/libgcc/. -I../../../Gcc/libgcc/../gcc
-I../../../Gcc/libgcc/../include  -DHAVE_CC_TLS   -o _ashrdi3.o -MT _ashrdi3.o
-MD -MP -MF _ashrdi3.dep -DL_ashrdi3 -c ../../../Gcc/libgcc/libgcc2.c
-fvisibility=hidden -DHIDE_EXPORTS
In file included from ../../../Gcc/libgcc/../gcc/tsystem.h:87,
                 from ../../../Gcc/libgcc/libgcc2.c:27:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file
or directory
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../Gcc/libgcc/../gcc/tsystem.h:87,
                 from ../../../Gcc/libgcc/libgcc2.c:27:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file
or directory
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
compilation terminated.
In file included from ../../../Gcc/libgcc/../gcc/tsystem.h:87,
                 from ../../../Gcc/libgcc/libgcc2.c:27:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file
or directory
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:501: _negdi2.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:501: _lshrdi3.o] Error 1
make[3]: *** [Makefile:501: _ashldi3.o] Error 1
In file included from ../../../Gcc/libgcc/../gcc/tsystem.h:87,
                 from ../../../Gcc/libgcc/libgcc2.c:27:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file
or directory
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:501: _ashrdi3.o] Error 1

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
@ 2022-07-12 18:02 ` pinskia at gcc dot gnu.org
  2022-07-12 20:55 ` tkoenig at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-07-12 18:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-07-12

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect configure is not detecting multi-arch correctly or --disable-multilib
interacting with multi-arch support which causes things to be broken.
OR multi-arch support is not in the riscv backend yet.

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
  2022-07-12 18:02 ` [Bug target/106271] " pinskia at gcc dot gnu.org
@ 2022-07-12 20:55 ` tkoenig at gcc dot gnu.org
  2023-05-31 15:12 ` tschwinge at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2022-07-12 20:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> I suspect configure is not detecting multi-arch correctly or
> --disable-multilib interacting with multi-arch support which causes things
> to be broken.
> OR multi-arch support is not in the riscv backend yet.

I get the same result without --disable-multilib.

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
  2022-07-12 18:02 ` [Bug target/106271] " pinskia at gcc dot gnu.org
  2022-07-12 20:55 ` tkoenig at gcc dot gnu.org
@ 2023-05-31 15:12 ` tschwinge at gcc dot gnu.org
  2023-05-31 15:17 ` tschwinge at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2023-05-31 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tschwinge at gcc dot gnu.org

--- Comment #3 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Gah, I ran into the same issue on gcc92.

I 'configure'd '--with-arch=rv64imafdc --with-abi=lp64d --enable-multilib'.

(In reply to Andrew Pinski from comment #1)
> OR multi-arch support is not in the riscv backend yet.

That seems to be the case indeed; at least I'm not seeing any 'if_multiarch'
etc. in 'gcc/config/riscv/'.


    $ find /usr/include/ -name libc-header-start.h
    /usr/include/riscv64-linux-gnu/bits/libc-header-start.h

Also, do potentially further distribution packages have to be installed, for
additional multilibs?  Like I have on an Ubuntu x86_64 GN/Linux system:

    $ find /usr/include/ -name libc-header-start.h
    /usr/include/i386-linux-gnu/bits/libc-header-start.h
    /usr/include/x86_64-linux-gnu/bits/libc-header-start.h
    $ dpkg -S /usr/include/i386-linux-gnu/bits/libc-header-start.h
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h
    libc6-dev:i386: /usr/include/i386-linux-gnu/bits/libc-header-start.h
    libc6-dev:amd64: /usr/include/x86_64-linux-gnu/bits/libc-header-start.h

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-05-31 15:12 ` tschwinge at gcc dot gnu.org
@ 2023-05-31 15:17 ` tschwinge at gcc dot gnu.org
  2023-05-31 15:42 ` tschwinge at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2023-05-31 15:17 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doko at gcc dot gnu.org

--- Comment #4 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
..., and then I wondered: but how, then, are Debian/Ubuntu building GCC?

Per <https://packages.debian.org/experimental/gcc-13>,
<http://deb.debian.org/debian/pool/main/g/gcc-13/gcc-13_13.1.0-3.debian.tar.xz>,
there is a 'debian/patches/gcc-multiarch.diff' file, which contains "Remaining
multiarch patches, not yet submitted upstream", which (amongst others)
includes:

    --- a/src/gcc/config/riscv/t-linux
    +++ b/src/gcc/config/riscv/t-linux
    @@ -1,3 +1,5 @@
     # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
     MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst
rv64%,lib64,$(MULTILIB_DIRNAMES)))
     MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
    +
    +MULTIARCH_DIRNAME := $(call if_multiarch,$(firstword $(subst -,
,$(target)))-linux-gnu)

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-05-31 15:17 ` tschwinge at gcc dot gnu.org
@ 2023-05-31 15:42 ` tschwinge at gcc dot gnu.org
  2023-08-30  8:16 ` tschwinge at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2023-05-31 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
With the latter hunk applied (plus manual 'rm gcc/s-mlib gcc/multilib.h' to
regenerate the latter file), I find that this apparently does only address the
'--disable-multilib' case, but not my '--enable-multilib'?

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-05-31 15:42 ` tschwinge at gcc dot gnu.org
@ 2023-08-30  8:16 ` tschwinge at gcc dot gnu.org
  2023-08-30 11:15 ` tkoenig at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2023-08-30  8:16 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at gcc dot gnu.org,
                   |                            |palmer at gcc dot gnu.org,
                   |                            |rzinsly at ventanamicro dot com

--- Comment #6 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
I noticed recent commit r14-3387-g47f95bc4be4eb14730ab3eaaaf8f6e71fda47690
"RISC-V: Add multiarch support on riscv-linux-gnu" -- but can't tell off-hand
whether that fixed all the issues here?

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-08-30  8:16 ` tschwinge at gcc dot gnu.org
@ 2023-08-30 11:15 ` tkoenig at gcc dot gnu.org
  2023-10-07 20:10 ` law at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2023-08-30 11:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Thomas Schwinge from comment #6)
> I noticed recent commit r14-3387-g47f95bc4be4eb14730ab3eaaaf8f6e71fda47690
> "RISC-V: Add multiarch support on riscv-linux-gnu" -- but can't tell
> off-hand whether that fixed all the issues here?

As soon as gcc92 is back up, we can test...

https://lists.tetaneutral.net/pipermail/cfarm-users/2023-August/000975.html

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-08-30 11:15 ` tkoenig at gcc dot gnu.org
@ 2023-10-07 20:10 ` law at gcc dot gnu.org
  2023-10-12  6:12 ` doko at gcc dot gnu.org
  2023-10-13 20:41 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: law at gcc dot gnu.org @ 2023-10-07 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

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

--- Comment #8 from Jeffrey A. Law <law at gcc dot gnu.org> ---
I wasn't aware of this BZ when I made the commit referenced in c#6.  But yes,
the whole point of that commit was to fix this problem.

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-10-07 20:10 ` law at gcc dot gnu.org
@ 2023-10-12  6:12 ` doko at gcc dot gnu.org
  2023-10-13 20:41 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: doko at gcc dot gnu.org @ 2023-10-12  6:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Matthias Klose <doko at gcc dot gnu.org> ---
yes, that's one which could be also backported. Let me submit the other bits
upstream as well.

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

* [Bug target/106271] Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory
  2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-10-12  6:12 ` doko at gcc dot gnu.org
@ 2023-10-13 20:41 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-13 20:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

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

end of thread, other threads:[~2023-10-13 20:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 17:53 [Bug target/106271] New: Bootstrap on RISC-V on Ubuntu 22.04 LTS: bits/libc-header-start.h: No such file or directory tkoenig at gcc dot gnu.org
2022-07-12 18:02 ` [Bug target/106271] " pinskia at gcc dot gnu.org
2022-07-12 20:55 ` tkoenig at gcc dot gnu.org
2023-05-31 15:12 ` tschwinge at gcc dot gnu.org
2023-05-31 15:17 ` tschwinge at gcc dot gnu.org
2023-05-31 15:42 ` tschwinge at gcc dot gnu.org
2023-08-30  8:16 ` tschwinge at gcc dot gnu.org
2023-08-30 11:15 ` tkoenig at gcc dot gnu.org
2023-10-07 20:10 ` law at gcc dot gnu.org
2023-10-12  6:12 ` doko at gcc dot gnu.org
2023-10-13 20:41 ` 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).