public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/105474] New: GCC fails to bootstrap with --disable-libstdcxx
@ 2022-05-04  8:50 creatorsmithmdt at gmail dot com
  2022-05-04  9:25 ` [Bug bootstrap/105474] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: creatorsmithmdt at gmail dot com @ 2022-05-04  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105474
           Summary: GCC fails to bootstrap with --disable-libstdcxx
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: creatorsmithmdt at gmail dot com
  Target Milestone: ---

On a Debian WSL2 environment (identified as x86_64-pc-linux-gnu and
5.10.102.1-microsoft-standard-WSL2), gcc fails bootstrapping when configured
like so: ../gcc/configure --disable-libstdcxx --enable-languages=c,c++. 

g++ -std=c++11   -g -O2   -DIN_GCC     -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
 -DHAVE_CONFIG_H  -DGENERATOR_FILE -static-libstdc++ -static-libgcc  -o
build/genchecksum \
    build/genchecksum.o .././libiberty/libiberty.a
mawk -f ../../gcc/gcc/opt-functions.awk -f ../../gcc/gcc/opt-read.awk \
       -f ../../gcc/gcc/optc-save-gen.awk \
       -v header_name="config.h system.h coretypes.h tm.h" < optionlist >
options-save.cc
/usr/bin/ld: .././libiberty/libiberty.a(hashtab.o): relocation R_X86_64_32S
against `.rodata' can not be used when making a PIE object; recompile with
-fPIE
/usr/bin/ld: .././libiberty/libiberty.a(xmalloc.o): relocation R_X86_64_32
against `.rodata.str1.1' can not be used when making a PIE object; recompile
with -fPIE
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:3013: build/genhooks] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/bin/ld: .././libiberty/libiberty.a(md5.o): relocation R_X86_64_32 against
`.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: .././libiberty/libiberty.a(xstrerror.o): relocation R_X86_64_32
against `.rodata.str1.1' can not be used when making a PIE object; recompile
with -fPIE
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:3013: build/genchecksum] Error 1
rm gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod
gcov.pod lto-dump.pod
make[3]: Leaving directory '/home/zopolis4/gccbuild/gcc'
make[2]: *** [Makefile:4954: all-stage2-gcc] Error 2
make[2]: Leaving directory '/home/zopolis4/gccbuild'
make[1]: *** [Makefile:24086: stage2-bubble] Error 2
make[1]: Leaving directory '/home/zopolis4/gccbuild'
make: *** [Makefile:1023: all] Error 2

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

* [Bug bootstrap/105474] GCC fails to bootstrap with --disable-libstdcxx
  2022-05-04  8:50 [Bug bootstrap/105474] New: GCC fails to bootstrap with --disable-libstdcxx creatorsmithmdt at gmail dot com
@ 2022-05-04  9:25 ` rguenth at gcc dot gnu.org
  2022-05-04  9:38 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-04  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Does it work when not bootstrapping (--disable-bootstrap)?  Because since GCC
is written in C++ now we'll need our own standard library when using the host
built GCC to build stage2+.

Now, the specific failure building stage2 genchecksum is odd - is this the
full command, really using the host g++, you quote?

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

* [Bug bootstrap/105474] GCC fails to bootstrap with --disable-libstdcxx
  2022-05-04  8:50 [Bug bootstrap/105474] New: GCC fails to bootstrap with --disable-libstdcxx creatorsmithmdt at gmail dot com
  2022-05-04  9:25 ` [Bug bootstrap/105474] " rguenth at gcc dot gnu.org
@ 2022-05-04  9:38 ` jakub at gcc dot gnu.org
  2022-12-04  6:31 ` creatorsmithmdt at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-04  9:38 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'd say this is a user error.  You can either bootstrap the compiler but then
you need libstdc++ because that is needed for C++ support which is needed
during the bootstrapping, or you don't and then can avoid building libstdc++.

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

* [Bug bootstrap/105474] GCC fails to bootstrap with --disable-libstdcxx
  2022-05-04  8:50 [Bug bootstrap/105474] New: GCC fails to bootstrap with --disable-libstdcxx creatorsmithmdt at gmail dot com
  2022-05-04  9:25 ` [Bug bootstrap/105474] " rguenth at gcc dot gnu.org
  2022-05-04  9:38 ` jakub at gcc dot gnu.org
@ 2022-12-04  6:31 ` creatorsmithmdt at gmail dot com
  2024-04-01  5:21 ` pinskia at gcc dot gnu.org
  2024-04-01 16:15 ` egallager at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: creatorsmithmdt at gmail dot com @ 2022-12-04  6:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Zopolis0 <creatorsmithmdt at gmail dot com> ---
If disabling the stdlib but not disabling bootstrapping causes bootstrapping to
break, the user should probably be notified of this before it breaks randomly.

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

* [Bug bootstrap/105474] GCC fails to bootstrap with --disable-libstdcxx
  2022-05-04  8:50 [Bug bootstrap/105474] New: GCC fails to bootstrap with --disable-libstdcxx creatorsmithmdt at gmail dot com
                   ` (2 preceding siblings ...)
  2022-12-04  6:31 ` creatorsmithmdt at gmail dot com
@ 2024-04-01  5:21 ` pinskia at gcc dot gnu.org
  2024-04-01 16:15 ` egallager at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-01  5:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2024-04-01

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Something like should provided an error while configuring so much earlier:
```
case "$enable_bootstrap:${noconfigdirs}" in
  yes:*target-libstdc++-v3*)
    AC_MSG_ERROR([cannot also disable libstdcxx if bootstrapping]) ;;
    ;;
esac

```

Let me test that out and submit it for GCC 15.

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

* [Bug bootstrap/105474] GCC fails to bootstrap with --disable-libstdcxx
  2022-05-04  8:50 [Bug bootstrap/105474] New: GCC fails to bootstrap with --disable-libstdcxx creatorsmithmdt at gmail dot com
                   ` (3 preceding siblings ...)
  2024-04-01  5:21 ` pinskia at gcc dot gnu.org
@ 2024-04-01 16:15 ` egallager at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: egallager at gcc dot gnu.org @ 2024-04-01 16:15 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Gallager <egallager at gcc dot gnu.org> changed:

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

--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> Something like should provided an error while configuring so much earlier:
> ```
> case "$enable_bootstrap:${noconfigdirs}" in
>   yes:*target-libstdc++-v3*)
>     AC_MSG_ERROR([cannot also disable libstdcxx if bootstrapping]) ;;
>     ;;
> esac
> 
> ```
> 
> Let me test that out and submit it for GCC 15.

Related: bug 102665

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

end of thread, other threads:[~2024-04-01 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04  8:50 [Bug bootstrap/105474] New: GCC fails to bootstrap with --disable-libstdcxx creatorsmithmdt at gmail dot com
2022-05-04  9:25 ` [Bug bootstrap/105474] " rguenth at gcc dot gnu.org
2022-05-04  9:38 ` jakub at gcc dot gnu.org
2022-12-04  6:31 ` creatorsmithmdt at gmail dot com
2024-04-01  5:21 ` pinskia at gcc dot gnu.org
2024-04-01 16:15 ` egallager 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).