Bug 236900

Summary: lang/gcc8: BOOTSTRAP=off fails to build after r497254
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Andreas Tobler <andreast>
Status: Closed Unable to Reproduce    
Severity: Affects Only Me CC: dim, gerald, kib, marklmi26-fbsd, toolchain
Priority: --- Keywords: regression
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
error log (compressed) none

Description Jan Beich freebsd_committer freebsd_triage 2019-03-30 17:14:09 UTC
Created attachment 203258 [details]
error log (compressed)

c++: error: unsupported option '-print-multi-os-directory'
Comment 1 Gerald Pfeifer freebsd_committer freebsd_triage 2019-03-31 14:07:41 UTC
Does this mean we need to force bootstrapping GCC once multilibs are
involved, Andreas?

I'm a bit surprised this never came up around powerpc64, where we (thanks
to your nice work) have been doing multilib-ing more pervasively. Of course
the user base on powerpc64 is smaller, but still...

Or can any of you think of a different approach?
Comment 2 Konstantin Belousov freebsd_committer freebsd_triage 2019-03-31 14:30:14 UTC
I successfully built without bootstrap in 11.2 jail.
Comment 3 Andreas Tobler freebsd_committer freebsd_triage 2019-03-31 19:45:06 UTC
Ditto on -CURRENT
Comment 4 Mark Millard 2019-03-31 19:52:53 UTC
(In reply to Andreas Tobler from comment #3)

Looks like (system) clang rejects the option:

# cc -v -print-multi-os-directory
cc: error: unsupported option '-print-multi-os-directory'
FreeBSD clang version 8.0.0 (tags/RELEASE_800/final 356365) (based on LLVM 8.0.0)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

# c++ -v -print-multi-os-directory
c++: error: unsupported option '-print-multi-os-directory'
FreeBSD clang version 8.0.0 (tags/RELEASE_800/final 356365) (based on LLVM 8.0.0)
Target: powerpc64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

So it appears that a successful build would have had to use the option with
some gcc version instead of (system) clang.

So the question translates to: what contextual difference leads to use with
clang some times vs. gcc other times? Lack of a full bootstrap vs. using
a full bootstrap?

(Note: the powerpc64 context above is based on WITHOUT_LIB32= because of
my llvm-libunwind patch testing.)
Comment 5 Andreas Tobler freebsd_committer freebsd_triage 2019-03-31 21:39:01 UTC
The error mentioned in the description stems from a configure test, so we can ignore it. You'll find this error in configure stage during every gcc build, bootstrap/multilib or not.

The real failure would be visible if we run the gmake -N job with N=1 and have a look into the config.log of the failing part.
I bet it is the rtld which does not seem to be able to execute 32-bit bins. Due to whatever reason. On -CURRENT we had this situation for a very short time.
Between r345661 and r345734.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2019-04-03 10:54:53 UTC
(In reply to Andreas Tobler from comment #5)
> I bet it is the rtld which does not seem to be able to execute 32-bit bins.
> On -CURRENT we had this situation for a very short time. Between r345661 and r345734.

Ah, a kernel issue. That explains why all my amd64 jails were affected but not i386 jails. I was on r345732 but after updating to r345806 lang/gcc8 builds fine.