Bug 241029 - Mk/Uses/compiler.mk fails to add GCC dependency on 11.2 MIPS64 with USES=compiler:c11
Summary: Mk/Uses/compiler.mk fails to add GCC dependency on 11.2 MIPS64 with USES=comp...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: mips Any
: --- Affects Some People
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-03 08:58 UTC by Matthias Andree
Modified: 2022-09-07 15:30 UTC (History)
6 users (show)

See Also:
mandree: maintainer-feedback? (portmgr)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Andree freebsd_committer freebsd_triage 2019-10-03 08:58:05 UTC
Greetings,

we have a port mail/fetchmail, which - as of r513653 - uses "USES+=compiler:c11". This makes  Mk/Uses/compiler.mk choose GCC, but this .mk script fails to add the compiler as a requisite, breaking clean-room builds as follows:

[00:20:56] ===>  Applying FreeBSD patches for fetchmail-6.4.1
[00:20:56] ===========================================================================
=>> Status   mail/fetchmail | fetchmail-6.4.1: build-depends
[00:20:56] =======================<phase: build-depends  >============================
[00:21:00] ===>   fetchmail-6.4.1 depends on executable: gmake - not found
[00:21:00] ===>   Installing existing package /packages/All/gmake-4.2.1_3.txz
[00:21:01] [112mips64-svn] Installing gmake-4.2.1_3...
[00:21:01] [112mips64-svn] `-- Installing gettext-runtime-0.20.1...
[00:21:01] [112mips64-svn] |   `-- Installing indexinfo-0.3.1...
[00:21:01] [112mips64-svn] |   `-- Extracting indexinfo-0.3.1: .... done
[00:21:01] [112mips64-svn] `-- Extracting gettext-runtime-0.20.1: .......... done
[00:21:05] [112mips64-svn] Extracting gmake-4.2.1_3: .......... done
[00:21:06] ===>   fetchmail-6.4.1 depends on executable: gmake - found
[00:21:06] ===>   Returning to build of fetchmail-6.4.1
[00:21:07] ===>   fetchmail-6.4.1 depends on executable: msgfmt - not found
[00:21:07] ===>   Installing existing package /packages/All/gettext-tools-0.20.1_1.txz
[00:21:08] [112mips64-svn] Installing gettext-tools-0.20.1_1...
[00:21:08] [112mips64-svn] `-- Installing libtextstyle-0.20.1...
[00:21:08] [112mips64-svn] `-- Extracting libtextstyle-0.20.1: .......... done
[00:21:11] [112mips64-svn] Extracting gettext-tools-0.20.1_1: .......... done
[00:21:15] ===>   fetchmail-6.4.1 depends on executable: msgfmt - found
[00:21:15] ===>   Returning to build of fetchmail-6.4.1
[00:21:15] ===>   fetchmail-6.4.1 depends on executable: gcc9 - not found
[00:21:15] ===>   fetchmail-6.4.1 depends on package: /packages/All/gcc9-9.2.0.txz - not found
[00:21:15] ===>   USE_PACKAGE_DEPENDS_ONLY set - not building missing dependency from source
[00:21:15] *** Error code 1
[00:21:15] 
[00:21:15] Stop.
[00:21:15] make: stopped in /usr/ports/mail/fetchmail
[00:21:15] build of mail/fetchmail | fetchmail-6.4.1 ended at Thu Oct  3 10:36:31 CEST 2019
[00:21:15] build time: 00:01:08
[00:21:15] !!! build failure encountered !!!
[00:21:15] Error: Build failed in phase: build-depends
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2019-10-03 12:10:34 UTC
(In reply to Matthias Andree from comment #0)
This is because lang/gcc9/Makefile has:
     16 ONLY_FOR_ARCHS= aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64 sparc64
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2019-10-03 12:26:52 UTC
But then I'll maintain that compiler.mk needs to pick a compiler that is available on MIPS.
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2019-10-03 12:34:14 UTC
(In reply to Matthias Andree from comment #2)
True, but there's no C11 compiler either in base or in ports available for mips64.

AFAIK there's work in head for porting clang (kevans may know more).
Comment 4 Matthias Andree freebsd_committer freebsd_triage 2019-10-03 12:48:47 UTC
Piotr, it appears you chose C11 for fetchmail because that magically picks GCC on powerpc64, but fetchmail with FreeBSD patches is C99 code and does not require C11. 

The bug I am reporting must be resolved: The framework must not choose an unavailable compiler and sacrifice the port builds, but needs to weasel out early in that case so that the *real* issue will be reported ("no C11 compiler for MIPS") rather than "euh can't fetch GCC at build time because poudriere doesn't permit fetches after the fetch stage" or similar.
Comment 5 Tobias C. Berner freebsd_committer freebsd_triage 2022-09-07 15:30:47 UTC
Moin moin 

Closing this due to old age. Please re-open if it is still an relevant.

mfg Tobias