Bug 231570 - sysutils/e2fsprogs: fix build with powerpc64
Summary: sysutils/e2fsprogs: fix build with powerpc64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Some People
Assignee: Matthias Andree
Depends on:
Reported: 2018-09-22 06:09 UTC by Piotr Kubaj
Modified: 2018-09-22 16:41 UTC (History)
3 users (show)

See Also:
mandree: maintainer-feedback+

patch (613 bytes, patch)
2018-09-22 06:09 UTC, Piotr Kubaj
no flags Details | Diff
right patch (585 bytes, patch)
2018-09-22 06:15 UTC, Piotr Kubaj
mandree: maintainer-approval-
Details | Diff
another attempt at fixing the powerpc64 build (720 bytes, patch)
2018-09-22 09:44 UTC, Matthias Andree
no flags Details | Diff
xz-compressed build log with *my* patch on 11.2-RELEASE/MIPS64 (qemu in poudriere) (26.07 KB, application/x-xz)
2018-09-22 14:52 UTC, Matthias Andree
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2018-09-22 06:09:30 UTC
Created attachment 197330 [details]

USES=compiler:c11 is necessary for the master port to compile.

Tested on powerpc64 and on amd64.
Comment 1 Piotr Kubaj freebsd_committer 2018-09-22 06:15:13 UTC
Created attachment 197332 [details]
right patch

Sorry, I uploaded a patch for another port by mistake.
Comment 2 Matthias Andree freebsd_committer 2018-09-22 08:35:46 UTC
I am about to commit a similar version that makes the special case use the USES+= and the regular case the =.
Comment 3 Matthias Andree freebsd_committer 2018-09-22 09:44:37 UTC
Created attachment 197342 [details]
another attempt at fixing the powerpc64 build

Please test if this patch fixes the problem on powerpc64 as well. I don't want to force compiler builds on all the other Tier-2 architectures.
Comment 4 Piotr Kubaj freebsd_committer 2018-09-22 12:40:39 UTC
(In reply to Matthias Andree from comment #3)
This patch is wrong. Compiler that can use C11 is required on all architectures, not just powerpc64.
Comment 5 Matthias Andree freebsd_committer 2018-09-22 14:00:11 UTC
Is there any evidence for which architectures other than powerpc64 the default cc were insufficient?  We can include those, and only those, in the list where we require a C11 compiler.  I will demand a build log made on FreeBSD 11.2.

It would seem that, for instance, on MIPS64 (gcc 4.2.1) and ARM64 (clang 6.0.0), the default compiler is good, in that I haven't received reports of self-test failures or seen BROKEN_${ARCH} commits from fellow committers, and under qemu, self-tests pass for me on an 11.2 amd64 host.

I will not force the ports-GCC build down on the low-end machines that do not need it, possibly with a three-stage bootstrap that takes half a calendar day to build.

So please report back if my patch fixes the powerpc64 build and the built code then passes self-tests.
Comment 6 Piotr Kubaj freebsd_committer 2018-09-22 14:20:37 UTC
(In reply to Matthias Andree from comment #5)
There seems to be a misunderstanding here.

It seems that you think USES=compiler:c11 forces GCC from ports. That is NOT the case.

It would be good if you read Mk/Uses/compiler.mk, before making assumptions.

Clang 6.0 is just fine and will be used for compiling this port with my patch, so ARM64 and AMD64 will not use GCC from ports.

GCC from ports will be used only on architectures where there is still GCC in base, which is at version 4.2.1 and it's simply too old to compile this.

I'm pretty sure MIPS64 also fails right now, but there were simply no users of MIPS64 that tried to compile this port.
Comment 7 Piotr Kubaj freebsd_committer 2018-09-22 14:34:21 UTC
This is not closed.

This port still fails to build.
Comment 8 Matthias Andree freebsd_committer 2018-09-22 14:38:47 UTC
This is useless.  I see what I see WRT MIPS64 trying to build GCC and requisites when using your patch, and my 11.2 MIPS64 self-tests pass, no need for you to second-guess without substantiation.

Since you've failed to test on powerpc64, I will commit what I have proposed and that will be all.
Comment 9 commit-hook freebsd_committer 2018-09-22 14:41:02 UTC
A commit references this bug:

Author: mandree
Date: Sat Sep 22 14:40:13 UTC 2018
New revision: 480389
URL: https://svnweb.freebsd.org/changeset/ports/480389

  Attempt to fix build on powerpc64.

  Since the reporter has refused to test my proposed patch twice,
  I am committing this anyways.

  PR:		231570
  Reported by:	Piotr Kubaj <pkubaj@anongoth.pl>

Comment 10 Piotr Kubaj freebsd_committer 2018-09-22 14:48:18 UTC
(In reply to commit-hook from comment #9)
Well, it works, so good for me.

I still believe this is not a proper solution, but since it works, I don't really mind.
Comment 11 Matthias Andree freebsd_committer 2018-09-22 14:52:23 UTC
Created attachment 197350 [details]
xz-compressed build log with *my* patch on 11.2-RELEASE/MIPS64 (qemu in poudriere)

FTR, I am attaching the MIPS64 build log showing that MIPS64 does not need USES+=compiler:c11 since it was made without.
Comment 12 Piotr Kubaj freebsd_committer 2018-09-22 16:41:20 UTC
(In reply to Matthias Andree from comment #11)
It could be that the bug is specific to head (that's what I test on).

Either way, I'm not going to spend more time on this issue, since your patch also works.