public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
@ 2020-10-22  6:38 tkoenig at gcc dot gnu.org
  2020-10-22  6:40 ` [Bug bootstrap/97527] " tkoenig at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-22  6:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97527
           Summary: OpenBSD bootstrap fails with error: C++ preprocessor
                    "/lib/cpp" fails sanity check
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

Created attachment 49418
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49418&action=edit
config.log from the gcc subdirectory

Bootstrap on OpenBSD fails with a strange error: 

/home/tkoenig/trunk-bin/./prev-gcc/xg++ -B/home/tkoenig/trunk-bin/./prev-gcc/
-B/home/tkoenig/x86_64-unknown-openbsd6.8/bin/ -nostdinc++
-B/home/tkoenig/trunk-bin/prev-x86_64-unknown-openbsd6.8/libstdc++-v3/src/.libs
-B/home/tkoenig/trunk-bin/prev-x86_64-unknown-openbsd6.8/libstdc++-v3/libsupc++/.libs

-I/home/tkoenig/trunk-bin/prev-x86_64-unknown-openbsd6.8/libstdc++-v3/include/x86_64-unknown-openbsd6.8
 -I/home/tkoenig/trunk-bin/prev-x86_64-unknown-openbsd6.8/libstdc++-v3/include 
-I/home/tkoenig/trunk/libstdc++-v3/libsupc++
-L/home/tkoenig/trunk-bin/prev-x86_64-unknown-openbsd6.8/libstdc++-v3/src/.libs
-L/home/tkoenig/trunk-bin/prev-x86_64-unknown-openbsd6.8/libstdc++-v3/libsupc++/.libs
 -fno-PIE -c   -g -O2 -fchecking=1 -DIN_GCC     -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -fno-common -Wno-unused -DHAVE_CONFIG_H -I. -I.
-I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include
-I../../trunk/gcc/../libcpp/include -I/home/tkoenig/trunk-bin/./gmp
-I/home/tkoenig/trunk/gmp -I/home/tkoenig/trunk-bin/./mpfr/src
-I/home/tkoenig/trunk/mpfr/src -I/home/tkoenig/trunk/mpc/src 
-I../../trunk/gcc/../libdecnumber -I../../trunk/gcc/../libdecnumber/dpd
-I../libdecnumber -I../../trunk/gcc/../libbacktrace
-I/home/tkoenig/trunk-bin/./isl/include -I/home/tkoenig/trunk/isl/include  -o
gimple-match.o -MT gimple-match.o -MMD -MP -MF ./.deps/gimple-match.TPo
gimple-match.c

/home/tkoenig/x86_64-unknown-openbsd6.8/bin/as: out of memory allocating 8
bytes after a total of 0 bytes

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

* [Bug bootstrap/97527] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
@ 2020-10-22  6:40 ` tkoenig at gcc dot gnu.org
  2020-10-22  6:41 ` tkoenig at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-22  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 49419
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49419&action=edit
Preprocessed source of gimple-match.ii (compressed)

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

* [Bug bootstrap/97527] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
  2020-10-22  6:40 ` [Bug bootstrap/97527] " tkoenig at gcc dot gnu.org
@ 2020-10-22  6:41 ` tkoenig at gcc dot gnu.org
  2020-10-22  6:41 ` tkoenig at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-22  6:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 49420
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49420&action=edit
Resulting assember file (which is incomplete)

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

* [Bug bootstrap/97527] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
  2020-10-22  6:40 ` [Bug bootstrap/97527] " tkoenig at gcc dot gnu.org
  2020-10-22  6:41 ` tkoenig at gcc dot gnu.org
@ 2020-10-22  6:41 ` tkoenig at gcc dot gnu.org
  2020-10-22  6:44 ` [Bug bootstrap/97527] OpenBSD bootstrap fails with out of memory allocating 8 bytes after a total of 0 bytes tkoenig at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-22  6:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 49421
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49421&action=edit
config.log from the main build directory

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

* [Bug bootstrap/97527] OpenBSD bootstrap fails with  out of memory allocating 8 bytes after a total of 0 bytes
  2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-10-22  6:41 ` tkoenig at gcc dot gnu.org
@ 2020-10-22  6:44 ` tkoenig at gcc dot gnu.org
  2020-10-22  6:48 ` tkoenig at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-22  6:44 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-unknown-openbsd6.8

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Boostrapping compiler is

gcc220$ egcc -v
Using built-in specs.
COLLECT_GCC=egcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-openbsd6.8/8.4.0/lto-wrapper
Target: x86_64-unknown-openbsd6.8
Configured with: /usr/obj/ports/gcc-8.4.0/gcc-8.4.0/configure
--with-stage1-ldflags=-L/usr/obj/ports/gcc-8.4.0/bootstrap/lib --verbose
--program-transform-name='s,^,e,' --disable-nls --with-system-zlib
--disable-libmudflap --disable-libgomp --disable-libssp --disable-tls
--with-gnu-ld --with-gnu-as --enable-threads=posix --enable-wchar_t
--with-gmp=/usr/local --enable-languages=c,c++,fortran,objc,ada
--disable-libstdcxx-pch --enable-default-ssp --enable-default-pie --without-isl
--enable-cpp --prefix=/usr/local --sysconfdir=/etc --mandir=/usr/local/man
--infodir=/usr/local/info --localstatedir=/var --disable-silent-rules
--disable-gtk-doc
Thread model: posix
gcc version 8.4.0 (GCC) 
gcc220$ eg++ -v
Using built-in specs.
COLLECT_GCC=eg++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-openbsd6.8/8.4.0/lto-wrapper
Target: x86_64-unknown-openbsd6.8
Configured with: /usr/obj/ports/gcc-8.4.0/gcc-8.4.0/configure
--with-stage1-ldflags=-L/usr/obj/ports/gcc-8.4.0/bootstrap/lib --verbose
--program-transform-name='s,^,e,' --disable-nls --with-system-zlib
--disable-libmudflap --disable-libgomp --disable-libssp --disable-tls
--with-gnu-ld --with-gnu-as --enable-threads=posix --enable-wchar_t
--with-gmp=/usr/local --enable-languages=c,c++,fortran,objc,ada
--disable-libstdcxx-pch --enable-default-ssp --enable-default-pie --without-isl
--enable-cpp --prefix=/usr/local --sysconfdir=/etc --mandir=/usr/local/man
--infodir=/usr/local/info --localstatedir=/var --disable-silent-rules
--disable-gtk-doc
Thread model: posix
gcc version 8.4.0 (GCC) 

Assember is

gcc220$ as --version
GNU assembler (GNU Binutils) 2.35
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-unknown-openbsd6.8'.

(self-compiled)

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

* [Bug bootstrap/97527] OpenBSD bootstrap fails with  out of memory allocating 8 bytes after a total of 0 bytes
  2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-10-22  6:44 ` [Bug bootstrap/97527] OpenBSD bootstrap fails with out of memory allocating 8 bytes after a total of 0 bytes tkoenig at gcc dot gnu.org
@ 2020-10-22  6:48 ` tkoenig at gcc dot gnu.org
  2020-10-22  6:50 ` tkoenig at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-22  6:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 49422
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49422&action=edit
Generated gimple-match.c

All the temporary files were generated by manually adding -save-temps
to the Makefile in the gcc subdirectory, then re-compiling.

The error is repeatable.

Here's the output of vmstat while the machine is not compiling:

gcc220$ vmstat
 procs    memory       page                    disk traps          cpu
 r   s   avm     fre  flt  re  pi  po  fr  sr sd0  int   sys   cs us sy id
 1  60   35M   2616M 6785   0   0   0   0   0   2   87  5296  432  8  2 90

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

* [Bug bootstrap/97527] OpenBSD bootstrap fails with  out of memory allocating 8 bytes after a total of 0 bytes
  2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-10-22  6:48 ` tkoenig at gcc dot gnu.org
@ 2020-10-22  6:50 ` tkoenig at gcc dot gnu.org
  2020-10-22  7:24 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-22  6:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
The machine is gcc220.fsffrance.org ; if anybody has an account there
and wants to peek into /home/tkoenig to look into more details, be my
guest.

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

* [Bug bootstrap/97527] OpenBSD bootstrap fails with  out of memory allocating 8 bytes after a total of 0 bytes
  2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-10-22  6:50 ` tkoenig at gcc dot gnu.org
@ 2020-10-22  7:24 ` rguenth at gcc dot gnu.org
  2020-10-22 10:29 ` tkoenig at gcc dot gnu.org
  2020-10-22 12:10 ` tkoenig at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-22  7:24 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-10-22

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
So it's the assembler that runs OOM - can you instead attach the assembler
file (-save-temps should produce it) and try if manually invoking the
assembler reproduces the bug?

What's the version of 'as'?  It looks like self-compiled?

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

* [Bug bootstrap/97527] OpenBSD bootstrap fails with  out of memory allocating 8 bytes after a total of 0 bytes
  2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-10-22  7:24 ` rguenth at gcc dot gnu.org
@ 2020-10-22 10:29 ` tkoenig at gcc dot gnu.org
  2020-10-22 12:10 ` tkoenig at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-22 10:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
The *.s file generated with -save-temps is attached, but it
is truncated for a reason that I do not understand.

The binutils is indeed self-compiled from source (because the LLVM
linker cannot handle gcc compilation), using the system compiler, clang.
I'll recompile this with gcc 8.4 (which is installed in /usr/local/bin
as egcc) and see what happens then.

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

* [Bug bootstrap/97527] OpenBSD bootstrap fails with  out of memory allocating 8 bytes after a total of 0 bytes
  2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2020-10-22 10:29 ` tkoenig at gcc dot gnu.org
@ 2020-10-22 12:10 ` tkoenig at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-22 12:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 49423
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49423&action=edit
config.log from libgomp using binutils compiled with gcc 8.4.0

Using the binutils compiled with gcc 8.4 now leads to an error in
libgomp configure, apparently because of some collision with LTO
symbols (???)

gmake[4]: Leaving directory
'/home/tkoenig/trunk-bin/x86_64-unknown-openbsd6.8/libgcc'
gmake[3]: Leaving directory
'/home/tkoenig/trunk-bin/x86_64-unknown-openbsd6.8/libgcc'
Checking multilib configuration for libgomp...
Configuring stage 1 in x86_64-unknown-openbsd6.8/libgomp
configure: loading cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for --enable-generated-files-in-srcdir... no
checking build system type... x86_64-unknown-openbsd6.8
checking host system type... x86_64-unknown-openbsd6.8
checking target system type... x86_64-unknown-openbsd6.8
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether gmake sets $(MAKE)... yes
checking whether gmake supports nested variables... yes
checking for x86_64-unknown-openbsd6.8-gcc...
/home/tkoenig/trunk-bin/./gcc/xgcc -B/home/tkoenig/trunk-bin/./gcc/
-B/home/tkoenig/x86_64-unknown-openbsd6.8/bin/
-B/home/tkoenig/x86_64-unknown-openbsd6.8/lib/ -isystem
/home/tkoenig/x86_64-unknown-openbsd6.8/include -isystem
/home/tkoenig/x86_64-unknown-openbsd6.8/sys-include   -fno-checking
checking whether the C compiler works... no
configure: error: in
`/home/tkoenig/trunk-bin/x86_64-unknown-openbsd6.8/libgomp':
configure: error: C compiler cannot create executables
See `config.log' for more details
gmake[2]: *** [Makefile:24794: configure-stage1-target-libgomp] Error 77
gmake[2]: Leaving directory '/home/tkoenig/trunk-bin'
gmake[1]: *** [Makefile:27002: stage1-bubble] Error 2
gmake[1]: Leaving directory '/home/tkoenig/trunk-bin'
gmake: *** [Makefile:1004: all] Error 2

The suspicious part is

configure:3910: checking whether the C compiler works
configure:3932: /home/tkoenig/trunk-bin/./gcc/xgcc
-B/home/tkoenig/trunk-bin/./gcc/ -B/home/tkoenig/x86_64-unknown-openbsd6.8/bin/
-B/home/tkoenig/x86_64-unknown-openbsd6.8/lib/ -isystem
/home/tkoenig/x86_64-unknown-openbsd6.8/include -isystem
/home/tkoenig/x86_64-unknown-openbsd6.8/sys-include   -fno-checking -g -O2  
conftest.c  >&5
Wrong dl symbols!
/home/tkoenig/x86_64-unknown-openbsd6.8/bin/ld:
/home/tkoenig/trunk-bin/./gcc/liblto_plugin.so: error loading plugin: Wrong dl
symbols!

collect2: error: ld returned 1 exit status
configure:3936: $? = 1
configure:3974: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU Offloading and Multi Processing Runtime Library"
| #define PACKAGE_TARNAME "libgomp"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU Offloading and Multi Processing Runtime Library
1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgomp/"
| #define PACKAGE "libgomp"
| #define VERSION "1.0"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3979: error: in
`/home/tkoenig/trunk-bin/x86_64-unknown-openbsd6.8/libgomp':
configure:3981: error: C compiler cannot create executables
See `config.log' for more details

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

end of thread, other threads:[~2020-10-22 12:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22  6:38 [Bug bootstrap/97527] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
2020-10-22  6:40 ` [Bug bootstrap/97527] " tkoenig at gcc dot gnu.org
2020-10-22  6:41 ` tkoenig at gcc dot gnu.org
2020-10-22  6:41 ` tkoenig at gcc dot gnu.org
2020-10-22  6:44 ` [Bug bootstrap/97527] OpenBSD bootstrap fails with out of memory allocating 8 bytes after a total of 0 bytes tkoenig at gcc dot gnu.org
2020-10-22  6:48 ` tkoenig at gcc dot gnu.org
2020-10-22  6:50 ` tkoenig at gcc dot gnu.org
2020-10-22  7:24 ` rguenth at gcc dot gnu.org
2020-10-22 10:29 ` tkoenig at gcc dot gnu.org
2020-10-22 12:10 ` tkoenig 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).