Bug 265917 - [PATCH] devel/binutils: Perform exp-run on binutils 2.39 update
Summary: [PATCH] devel/binutils: Perform exp-run on binutils 2.39 update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords: patch
Depends on:
Blocks: 261875
  Show dependency treegraph
 
Reported: 2022-08-17 18:52 UTC by Cy Schubert
Modified: 2022-11-30 14:59 UTC (History)
4 users (show)

See Also:
antoine: exp-run+


Attachments
Update to devel/binutils to 2.39 (5.21 KB, patch)
2022-08-17 18:52 UTC, Cy Schubert
no flags Details | Diff
Fixes a INFO plist issue and addresses breakage in PR/261875 (5.24 KB, patch)
2022-08-19 17:02 UTC, Cy Schubert
no flags Details | Diff
Can you try this patch please? (9.52 KB, patch)
2022-10-16 21:17 UTC, Cy Schubert
no flags Details | Diff
This patch should address reported regressions. (12.34 KB, patch)
2022-10-30 21:46 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 Cy Schubert freebsd_committer freebsd_triage 2022-08-17 18:52:53 UTC
Created attachment 235978 [details]
Update to devel/binutils to 2.39

Hi portmgr@,

Please perform an exp-run on the attached update to devel/binutils 2.39.
Comment 1 Dima Panov freebsd_committer freebsd_triage 2022-08-18 12:44:19 UTC
(In reply to Cy Schubert from comment #0)
On my own desktop set only multimedia/libxine fails to link with new binutils

/usr/local/bin/ld.bfd: xine-list.o: non-canonical reference to canonical protected function `xine_set_flags' in ../src/xine-engine/.libs/libxine.so
/usr/local/bin/ld.bfd: failed to set dynamic section sizes: bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)


https://build.dimapanov.com/data/131amd64-dimaports/2022-08-18_14h58m41s/logs/errors/libxine-1.2.12_2.log
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2022-08-18 18:20:46 UTC
There was already an exp-run in PR #261875 with results posted.
Could the failures be handled before doing another one?
(binutils exp-runs are more intensive than some others)
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2022-08-18 20:50:23 UTC
(In reply to Antoine Brodin from comment #2)
That was for 2.38. This PR is for 2.39.
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2022-08-18 20:53:20 UTC
(In reply to Antoine Brodin from comment #2)
That was for 2.38. This PR is for 2.39.

Also, the URLs to the package builds don't work.
Comment 5 Antoine Brodin freebsd_committer freebsd_triage 2022-08-19 09:05:52 UTC
Info pages have to be put in the INFO macro, not in the plist.
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2022-08-19 17:02:25 UTC
Created attachment 236016 [details]
Fixes a INFO plist issue and addresses breakage in PR/261875

https://www.mail-archive.com/u-boot@lists.denx.de/msg430287.html discusses that GCC11 or greater is required but if <= GCC10 is used binutils must be built with --with-isa-spec=2.2. This patch adds that CONFIGURE_ARGS option.

If this causes other problems we will need to rethink our minimum GCC requirement on those architectures that need GCC or conditionally add this option if GCC < 11 (though I don't see an easy way to test for that in ports other than gcc -v 2>&1 | awk '$0 ~ /gcc version/ {print $3}', which is ugly).
Comment 7 Cy Schubert freebsd_committer freebsd_triage 2022-08-25 22:23:33 UTC
2.39 addresses the regressions in 2.38. Can we run an exp-run, please?
Comment 11 Cy Schubert freebsd_committer freebsd_triage 2022-10-04 00:10:46 UTC
1. The plist breakage is not reproducable with this version.

2. I am not able to reproduce the build breakage in 13-STABLE (amd64/i386) jail.

3. No such breakage under 12-STABLE (amd64/i386).

I will attach a new diff based on the current state of the ports tree.
Comment 12 Antoine Brodin freebsd_committer freebsd_triage 2022-10-04 06:33:38 UTC
(In reply to Cy Schubert from comment #11)
It was reproduced on all the exp builders.
Comment 13 Cy Schubert freebsd_committer freebsd_triage 2022-10-07 22:53:16 UTC
Having built binutils 2.39 under poudriere 14-CURRENT, 13.1-RELEASE, 12.3-RELEASE, in i386 and amd64 poudriere jails, using a ports tree as of this morning I have seen no failures. I'm puzzled why the package builder poudriere is experiencing these failures.

The only reason we see package failures is that only a subset of files were successfully built. Can I have a copy of each failed wrkdir. ./config.log might shed some light on why the package build poudriere jobs all failed while all mine succeeded.
Comment 14 Antoine Brodin freebsd_committer freebsd_triage 2022-10-08 07:41:22 UTC
(In reply to Cy Schubert from comment #13)
No, it's because the plist of all the binutils flavors was not checked,  binutils has around 20 flavors, it's not just native.
Comment 15 Cy Schubert freebsd_committer freebsd_triage 2022-10-15 15:37:54 UTC
The build problems appear to be FLAVORs under i386. Probably due to 32-bit issues in which some files are not built and therefore not installed. I've seen this behavour before with other ports. Fix the build problems and the pkg-plist problems magically disappear.

Building natively is not a problem however.
Comment 16 Antoine Brodin freebsd_committer freebsd_triage 2022-10-15 18:34:22 UTC
(In reply to Cy Schubert from comment #15)
this is a failure log for amd64 flavor on amd64:
http://package18.nyi.freebsd.org/data/123amd64-default-foo/2022-08-26_08h04m01s/logs/errors/amd64-binutils-2.39,1.log
Comment 17 Cy Schubert freebsd_committer freebsd_triage 2022-10-15 19:04:22 UTC
(In reply to Antoine Brodin from comment #16)
This is certainly not consistent with my amd64 flavor build in a 12.3 amd64 poudriere jail. (Sorry, my poudriere server is not internet accessible.)

=>> Building devel/binutils
build started at Sun Oct  9 12:58:04 PDT 2022
port directory: /usr/ports/devel/binutils
package name: binutils-2.39,1
building for: FreeBSD kq386 12.3-RELEASE-p7 FreeBSD 12.3-RELEASE-p7 amd64
maintained by: cy@FreeBSD.org
Makefile ident: 
Poudriere version: 3.3.7_1
Host OSVERSION: 1400072
Jail OSVERSION: 1203000
Job Id: 01

---Begin Environment---
SHELL=/bin/csh
OSVERSION=1203000
UNAME_v=FreeBSD 12.3-RELEASE-p7
UNAME_r=12.3-RELEASE-p7
BLOCKSIZE=K
MAIL=/var/mail/root
POUDRIERE_ETC=/var/db/local/poudriere-bob
STATUS=1
HOME=/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
LOCALBASE=/usr/local
USER=root
LIBEXECPREFIX=/usr/local/libexec/poudriere
POUDRIERE_VERSION=3.3.7_1
MASTERMNT=/poudriere/bob/data/.m/12R3amd64-cy-git/ref
POUDRIERE_BUILD_TYPE=bulk
PACKAGE_BUILDING=yes
SAVED_TERM=screen
PWD=/poudriere/bob/data/.m/12R3amd64-cy-git/ref/.p/pool
P_PORTS_FEATURES=FLAVORS SELECTED_OPTIONS
MASTERNAME=12R3amd64-cy-git
SCRIPTPREFIX=/usr/local/share/poudriere
OLDPWD=/poudriere/bob/data/.m/12R3amd64-cy-git/ref/.p
SCRIPTPATH=/usr/local/share/poudriere/bulk.sh
POUDRIEREPATH=/usr/local/bin/poudriere
---End Environment---

---Begin Poudriere Port Flags/Env---
PORT_FLAGS=
PKGENV=
FLAVOR=native
DEPENDS_ARGS=
MAKE_ARGS= FLAVOR=native
---End Poudriere Port Flags/Env---

---Begin OPTIONS List---
===> The following configuration options are available for binutils-2.39,1:
     NLS=on: Native Language Support
     RELRO=off: Enable relocation memory corruption mitigation (-z relro) by default
     STATIC=off: Build static executables and/or libraries
===> Use 'make config' to modify these settings
---End OPTIONS List---
[...]
fi
gmake[4]: Entering directory '/wrkdirs/usr/ports/devel/binutils/work-native/binutils-2.39/libiberty/testsuite'
gmake[4]: Nothing to be done for 'install'.
gmake[4]: Leaving directory '/wrkdirs/usr/ports/devel/binutils/work-native/binutils-2.39/libiberty/testsuite'
gmake[3]: Leaving directory '/wrkdirs/usr/ports/devel/binutils/work-native/binutils-2.39/libiberty'
gmake[2]: Nothing to be done for 'install-target'.
gmake[2]: Leaving directory '/wrkdirs/usr/ports/devel/binutils/work-native/binutils-2.39'
gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/binutils/work-native/binutils-2.39'
install  -m 0644 /wrkdirs/usr/ports/devel/binutils/work-native/binutils-2.39/include/plugin-api.h /wrkdirs/usr/ports/devel/binutils/work-native/stage/usr/local/include/
/bin/rm -f /wrkdirs/usr/ports/devel/binutils/work-native/stage/usr/local/include/ansidecl.h
/usr/bin/sed -i.bak '/#include "ansidecl.h"/d' /wrkdirs/usr/ports/devel/binutils/work-native/stage/usr/local/include/bfd.h
====> Compressing man pages (compress-man)
===========================================================================
=======================<phase: package        >============================
===>  Building package for binutils-2.39,1
===========================================================================
=>> Cleaning up wrkdir
===>  Cleaning for binutils-2.39,1
build of devel/binutils | binutils-2.39,1 ended at Sun Oct  9 13:09:29 PDT 2022
build time: 00:11:26


The only difference is mine says, MAKE_ARGS= FLAVOR=native while the failed build has MAKE_ARGS= FLAVOR=amd64. amd64 using FLAVOR=native works while amd64 with FLAVOR=amd64 does not. I'll try that out. Though FLAVOR=native and FLAVOR=amd64 building on an amd64 should produce the same result. But maybe not. Interesting.
Comment 18 Antoine Brodin freebsd_committer freebsd_triage 2022-10-15 19:09:31 UTC
(In reply to Cy Schubert from comment #17)
The log above has FLAVOR=native ,  not FLAVOR=amd64
Comment 19 Cy Schubert freebsd_committer freebsd_triage 2022-10-15 23:52:01 UTC
I've now been able to duplicate this from the command line.

make check-orphans completes successfully on amd64.

make FLAVOR=amd64 check-orphans fails on amd64.

Having been able to duplicate the problem from the command line solving this interactively will be much easier now.
Comment 20 Cy Schubert freebsd_committer freebsd_triage 2022-10-16 21:17:55 UTC
Created attachment 237383 [details]
Can you try this patch please?

Can you try this patch please. plist regressions have been fixed.
Comment 21 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:40:48 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
Comment 22 Antoine Brodin freebsd_committer freebsd_triage 2022-10-19 12:28:00 UTC
What about the elf-dissector / libxine / atf-* failures?  Were they fixed?  (I see 0 commit mentioning this bug report)
Comment 23 Cy Schubert freebsd_committer freebsd_triage 2022-10-25 03:50:21 UTC
The atf-* ports now build correctly. I'll post patches later.

elf-dissector may need the attention of our upstream because INIT_DISASSEMBLE_INFO() now has a fourth argument.

libxine will likely need the patch from https://www.linuxquestions.org/questions/slackware-14/regression-on-current-with-xine-lib-4175715727/. This hasn't been tested yet.
Comment 24 Cy Schubert freebsd_committer freebsd_triage 2022-10-25 04:19:57 UTC
The libxine patch works as well. Will post later.

This leaves elf-dissector with the extra argument to INIT_DISASSEMBLE_INFO().
Comment 25 Cy Schubert freebsd_committer freebsd_triage 2022-10-30 21:46:12 UTC
Created attachment 237731 [details]
This patch should address reported regressions.

Please try this patch.
Comment 26 Antoine Brodin freebsd_committer freebsd_triage 2022-11-07 18:14:52 UTC
Exp-run looks fine
Comment 27 commit-hook freebsd_committer freebsd_triage 2022-11-07 18:39:40 UTC
A commit in branch main references this bug:

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

commit 1d2e6d5c44d0580f53a830ad74b85ec444952b40
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-10-25 03:17:11 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-11-07 18:38:55 +0000

    sysutils/atf-*: Fix binutils 3.39 build

    PR:             265917

 sysutils/atf-master/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 28 commit-hook freebsd_committer freebsd_triage 2022-11-07 18:39:41 UTC
A commit in branch main references this bug:

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

commit 4b9324b680ae0adabf23d962ba624f66ded51b81
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-10-25 14:16:02 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-11-07 18:38:56 +0000

    devel/elf-dissector: Fix binutils 2.39 regression

    Fix build with binutils 2.39

    PR:             265917

 .../files/patch-src_lib_disassembler_disassembler.cpp (new)   | 11 +++++++++++
 1 file changed, 11 insertions(+)
Comment 29 commit-hook freebsd_committer freebsd_triage 2022-11-07 18:39:42 UTC
A commit in branch main references this bug:

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

commit eab31cc222286b7ba79a629da7200b0bffe63f03
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-10-25 04:12:09 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-11-07 18:38:55 +0000

    multimedia/libxine: Fix binutils 2.39 regression

    Fix build under 2.39.

    PR:             265917
    Obtained from:  https://www.linuxquestions.org/questions/slackware-14/\
                    regression-on-current-with-xine-lib-4175715727/

 multimedia/libxine/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 30 Cy Schubert freebsd_committer freebsd_triage 2022-11-07 18:40:24 UTC
Good stuff, thanks.
Comment 31 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-11-30 14:59:27 UTC
devel/binutils is update to 2.39 with ports 32d885a48f08.