Bug 270532 - devel/binutils: plist issues on riscv64
Summary: devel/binutils: plist issues on riscv64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: riscv Any
: --- Affects Some People
Assignee: Cy Schubert
URL: http://fuz.su/~fuz/freebsd/binutils-2...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-30 00:15 UTC by Robert Clausecker
Modified: 2023-03-31 04:20 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (cy)
fuz: merge-quarterly?


Attachments
Results of my risc64 poudriere build (476.10 KB, text/plain)
2023-03-30 13:49 UTC, Cy Schubert
no flags Details
Can you try this patch, please? (927 bytes, patch)
2023-03-30 16:15 UTC, Cy Schubert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2023-03-30 00:15:49 UTC
The packaging of this port fails on riscv64 with plist issues:

=======================<phase: package        >============================
===>  Building package for binutils-2.40_2,1
pkg-static: Unable to access file /wrkdirs/usr/ports/devel/binutils/work-native/stage/usr/local/share/locale/ro/LC_MESSAGES/gold.mo:No such file or directory
*** Error code 1


See URL field for a full build log.
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2023-03-30 13:49:56 UTC
Created attachment 241208 [details]
Results of my risc64 poudriere build

Here are the results of my risc64 poudriere build. My build by had in a jail and on a machine itself also succeeded. I have not received any emails from the package build infrastructure to say that the build has failed.

Additionally all FLAVORS built by the same job have succeeded.

[02:42:29] Removing old packages
[02:42:35] Built ports: ports-mgmt/pkg devel/ccache print/indexinfo devel/pkgconf converters/libiconv devel/libffi devel/gettext-runtime devel/readline devel/gmake devel/libtextstyle math/mpdecimal lang/perl5.32 converters/p5-Text-Unidecode textproc/p5-Unicode-EastAsianWidth devel/gettext-tools devel/p5-Locale-gettext devel/p5-Locale-libintl misc/help2man print/texinfo math/gmp lang/python39 devel/py-setuptools devel/ninja math/mpfr devel/meson archivers/liblz4 archivers/zstd devel/binutils@sparc64 devel/binutils@riscv64 devel/binutils@powerpc64 devel/binutils@mips devel/binutils@riscv32_unknown_elf devel/binutils@s390x devel/binutils@aarch64_none_elf devel/binutils@arm_none_eabi devel/binutils@i386 devel/binutils@mingw32 devel/binutils@riscv64_none_elf devel/binutils@arm_gnueabi devel/binutils@powerpc devel/binutils@powerpc64le devel/binutils@amd64 devel/binutils@mips64 devel/binutils@aarch64 devel/binutils@avr devel/binutils
[HEADamd64-cy-git] [2023-03-30_00h08m14s] [committing:] Queued: 46 Built: 46 Failed: 0  Skipped: 0  Ignored: 0  Tobuild: 0   Time: 02:42:09
[02:42:35] Logs: /poudriere/bob/data/logs/bulk/HEADamd64-cy-git/2023-03-30_00h08m14s
[02:42:35] WWW: http://localhost/poudriere//build.html?mastername=HEADamd64-cy-git&build=2023-03-30_00h08m14s
[02:42:35] Cleaning up
HEADamd64-cy-git: removed
HEADamd64-cy-git-n: removed
[02:42:35] Unmounting file systems

I suspect your problem is local. Can you please upload a copy of your complete build log so that it can be examined. It is likely something failed resulting in the one file not being installed. Unfortunately this is a problem with our ports build infrastructure.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-03-30 16:02:07 UTC
Please see URL field for the full build log.
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2023-03-30 16:15:05 UTC
Created attachment 241210 [details]
Can you try this patch, please?

Can you try this patch, please? This fixes build without GOLD.
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-03-30 17:01:08 UTC
This successfully fixes the build.

I don't understand how it didn't fail on the cluster---shouldn't GOLD be disabled there?
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2023-03-30 19:36:15 UTC
(In reply to Robert Clausecker from comment #4)

This determines whether GOLD is enabled or not:

# Actual earliest version may differ slightly
.if (${ARCH} != sparc64 && ${ARCH} != mips && ${ARCH} != mips64 && ${ARCH} != po
werpcspe && ${ARCH} != powerpc && ${ARCH} != powerpc64 && ${ARCH} != riscv64 &&
!defined(PKGNAMEPREFIX)) || ((${ARCH} == powerpc || ${ARCH} == powerpc64) && ${C
HOSEN_COMPILER_TYPE} != gcc && !defined(PKGNAMEPREFIX))
CONFIGURE_ARGS+=        --enable-gold --enable-plugins
CXXFLAGS+=      -Wno-c++11-narrowing
PLIST_SUB+=     GOLD=""
.else
PLIST_SUB+=     GOLD="@comment "
.endif

riscv64 enables GOLD. This was committed by linimon in c5335035d337a (SVN r556734).
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-03-30 19:37:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d0e1a6ae255f97dcf74f9cb87c676520417c9d11

commit d0e1a6ae255f97dcf74f9cb87c676520417c9d11
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2023-03-30 16:12:06 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2023-03-30 19:30:58 +0000

    devel/binutils: Fix plist error without GOLD

    PR:             270532
    Reported by:    fuz
    Tested by:      fuz

 devel/binutils/pkg-plist | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 Cy Schubert freebsd_committer freebsd_triage 2023-03-30 19:45:58 UTC
Fixed.
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-03-31 00:53:30 UTC
> ${ARCH} != riscv64

That bit seems to not build GOLD on riscv64.  Or perhaps I misunderstood the logic?
Comment 9 Robert Clausecker freebsd_committer freebsd_triage 2023-03-31 01:04:14 UTC
The problem was probably introduced on 2023-03-15, perhaps too recently for any riscv64 trial build to occur:

https://cgit.freebsd.org/ports/commit/?id=5012011fb0bfe69838c6526ece932e9225b7b5b4
Comment 10 Cy Schubert freebsd_committer freebsd_triage 2023-03-31 04:20:24 UTC
(In reply to Robert Clausecker from comment #9)
Maybe. Building flavors on amd64 is not the same as building native on riscv64. I'll build a riscv64 jail to verify.