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

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

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

Created attachment 49318
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49318&action=edit
config.log from failed attempt

On gcc302.fsffrance.org, with

../trunk/configure --prefix=$HOME --enable-languages=c,c++,fortran,lto

and invoked with "gmake"

Last output:

checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/tkoenig/trunk-bin/gmp':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
gmake[2]: *** [Makefile:5484: configure-stage1-gmp] Error 1
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

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

* [Bug fortran/97308] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-06 16:48 [Bug fortran/97308] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
@ 2020-10-06 16:55 ` schwab@linux-m68k.org
  2020-10-06 17:06 ` tkoenig at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2020-10-06 16:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
You need to attach the config.log file in `/home/tkoenig/trunk-bin/gmp'.

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

* [Bug fortran/97308] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-06 16:48 [Bug fortran/97308] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
  2020-10-06 16:55 ` [Bug fortran/97308] " schwab@linux-m68k.org
@ 2020-10-06 17:06 ` tkoenig at gcc dot gnu.org
  2020-10-06 17:41 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-06 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 49319
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49319&action=edit
config.log from gmp subdirectory

Here it is.

For what it is worth, I now tried bootstrapping with CC=cc and CXX=c++,
and things seem to be working (so far).

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

* [Bug fortran/97308] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-06 16:48 [Bug fortran/97308] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
  2020-10-06 16:55 ` [Bug fortran/97308] " schwab@linux-m68k.org
  2020-10-06 17:06 ` tkoenig at gcc dot gnu.org
@ 2020-10-06 17:41 ` redi at gcc dot gnu.org
  2020-10-06 19:23 ` tkoenig at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-10-06 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The /lib/cpp error is a bit misleading, because that's the last thing it tries
to find as a C++ compiler, after exhausting g++ -std=c++11 and various other
options that fail with:

configure:19863: g++ -std=c++11 -E  conftest.cpp
cc1plus: error: unrecognized command line option "-std=c++11"

As stated in the install docs, you need a C++11 compiler, and the system GCC on
OpenBSD probably doesn't recognise the -std=c++11 option. This is not a bug.

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

* [Bug fortran/97308] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-06 16:48 [Bug fortran/97308] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-10-06 17:41 ` redi at gcc dot gnu.org
@ 2020-10-06 19:23 ` tkoenig at gcc dot gnu.org
  2020-10-06 19:36 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-06 19:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 49320
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49320&action=edit
config.log from failing libgomp

OK, so that one isn't a bug.

I hope you don't mind if I put in the next failure after
bootstrapping with the system compiler, clang 8 (setting CC to
cc and CXX to c++):

gmake[4]: Leaving directory
'/home/tkoenig/trunk-clang/x86_64-unknown-openbsd6.7/libgcc'
gmake[3]: Leaving directory
'/home/tkoenig/trunk-clang/x86_64-unknown-openbsd6.7/libgcc'
mkdir x86_64-unknown-openbsd6.7/libgomp
Checking multilib configuration for libgomp...
Configuring stage 1 in x86_64-unknown-openbsd6.7/libgomp
configure: creating 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.7
checking host system type... x86_64-unknown-openbsd6.7
checking target system type... x86_64-unknown-openbsd6.7
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... awk
checking whether gmake sets $(MAKE)... yes
checking whether gmake supports nested variables... yes
checking for x86_64-unknown-openbsd6.7-gcc...
/home/tkoenig/trunk-clang/./gcc/xgcc -B/home/tkoenig/trunk-clang/./gcc/
-B/home/tkoenig/x86_64-unknown-openbsd6.7/bin/
-B/home/tkoenig/x86_64-unknown-openbsd6.7/lib/ -isystem
/home/tkoenig/x86_64-unknown-openbsd6.7/include -system
/home/tkoenig/x86_64-unknown-openbsd6.7/sys-include   -fno-checking
checking whether the C compiler works... no
configure: error: in
`/home/tkoenig/trunk-clang/x86_64-unknown-openbsd6.7/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-clang'
gmake[1]: *** [Makefile:27002: stage1-bubble] Error 2
gmake[1]: Leaving directory '/home/tkoenig/trunk-clang'
gmake: *** [Makefile:1004: all] Error 2
obsd$

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

* [Bug fortran/97308] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-06 16:48 [Bug fortran/97308] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-10-06 19:23 ` tkoenig at gcc dot gnu.org
@ 2020-10-06 19:36 ` redi at gcc dot gnu.org
  2020-10-06 20:02 ` tkoenig at gcc dot gnu.org
  2020-10-07  5:12 ` [Bug bootstrap/97308] " tkoenig at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2020-10-06 19:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
ld: error: unable to find library -lc

Huh, not sure what causes that one.

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

* [Bug fortran/97308] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-06 16:48 [Bug fortran/97308] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-10-06 19:36 ` redi at gcc dot gnu.org
@ 2020-10-06 20:02 ` tkoenig at gcc dot gnu.org
  2020-10-07  5:12 ` [Bug bootstrap/97308] " tkoenig at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-06 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=97304

--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
The failing config.log from libgomp contains

ld: error: unable to find library -lc

so this might be closely related to / a duplicate of
PR 97304, which has the identical error message for
a different BSD version with clang.

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

* [Bug bootstrap/97308] OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check
  2020-10-06 16:48 [Bug fortran/97308] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-10-06 20:02 ` tkoenig at gcc dot gnu.org
@ 2020-10-07  5:12 ` tkoenig at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-07  5:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|fortran                     |bootstrap

--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Not really a Fortran bug, I probably clicked on that out of habit.

Regarding the original issue:

I still think it is a bug to unconditionally use a gcc when that is too old,
when a new version of clang is available which should work in principle
(modulo the -lc issue).

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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 16:48 [Bug fortran/97308] New: OpenBSD bootstrap fails with error: C++ preprocessor "/lib/cpp" fails sanity check tkoenig at gcc dot gnu.org
2020-10-06 16:55 ` [Bug fortran/97308] " schwab@linux-m68k.org
2020-10-06 17:06 ` tkoenig at gcc dot gnu.org
2020-10-06 17:41 ` redi at gcc dot gnu.org
2020-10-06 19:23 ` tkoenig at gcc dot gnu.org
2020-10-06 19:36 ` redi at gcc dot gnu.org
2020-10-06 20:02 ` tkoenig at gcc dot gnu.org
2020-10-07  5:12 ` [Bug bootstrap/97308] " 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).