Date: Mon, 30 Jan 2023 09:56:26 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 269241] lang/spidermonkey102: builds fine with TRYBROKEN=1 on 12.4 (does not fail the readelf check) Message-ID: <bug-269241-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269241 Bug ID: 269241 Summary: lang/spidermonkey102: builds fine with TRYBROKEN=3D1 on 12.4 (does not fail the readelf check) Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: nc@FreeBSD.org Reporter: jcfyecrayz@liamekaens.com Assignee: nc@FreeBSD.org Flags: maintainer-feedback?(nc@FreeBSD.org) Building lang/spidermonkey102 works fine on FreeBSD 12.4 with TRYBROKEN=3D1= (or with poudriere, testport or bulk -T). It was marked broken with scant details (a brief comment about not finding readelf), so it's not clear what may have "fixed" it (nor how to reproduce = the reported problem), and no reference to a problem report with any further information. Digging further, it turns out that moz.configure has the following check: def validate_readelf(path): . . retcode, stdout, stderr =3D get_cmd_output(path, "--help") return retcode =3D=3D 0 and any(l.startswith(" -d ") for l in stdout.splitlines()) It attempts to check the output of 'readelf --help' to see if -d is support= ed.=20 But /usr/bin/readelf (from the BSD licensed elftoolchain project) sends the output of --help to stderr rather than stdout. This is why the check failed for /usr/bin/readelf. As of FreeBSD 12.4, however, there is also /usr/bin/llvm-readelf. The configure script checks for that flavor of readelf as well, and llvm-readelf DOES send --help output to stdout. In fact, the configure check tries llvm-readelf first before trying to fall back to readelf. So, on 12.4, the configure check for readelf does not fail as it did for 12= .3.=20 Here is the snippet showing how 'make configure' fails in 12.3: . . checking for readelf... not found DEBUG: readelf: Looking for llvm-readelf DEBUG: readelf: Looking for x86_64-portbld-freebsd12.3-readelf DEBUG: readelf: Looking for x86_64-freebsd12.3-readelf DEBUG: readelf: Looking for readelf DEBUG: Executing: `/usr/bin/readelf --help` DEBUG: readelf: /usr/bin/readelf found but didn't work . . Now on 12.4, the configure check is happy: . . checking for readelf... /usr/bin/llvm-readelf checking for objcopy... /usr/bin/llvm-objcopy . . [Incidentally, the GNU readelf also sends --help output to stdout as well. = So this problem never occurred on most or all Linux distributions.] One COULD fix the configure check to also look at stderr like so: --- work/firefox-102.4.0/moz.configure.orig 2022-10-10 09:55:56.0000000= 00 -0600 +++ work/firefox-102.4.0/moz.configure 2023-01-29 21:22:35.614382000 -0700 @@ -812,7 +812,8 @@ def validate_readelf(path): # option in the `--help` output, which fortunately, s compatible betwe= en # llvm-readelf and readelf. retcode, stdout, stderr =3D get_cmd_output(path, "--help") - return retcode =3D=3D 0 and any(l.startswith(" -d ") for l in stdout.splitlines()) + return retcode =3D=3D 0 and (any(l.startswith(" -d ") for l in stdout.splitlines()) \ + or any(l.startswith(" -d ") for l in stderr.splitlines())) @depends("--enable-compile-environment", target, host) But now that 12.4 has llvm-readelf, that patch is not needed unless we want= to support 12.3, which goes EOL in March, 2023. If so, adding the above patch does the job. Given that 12.3 is shortly going to be EOL and the project package builders= are using 12.4, I think we should just remove the BROKEN_FreeBSD_12 from lang/spidermonkey102/Makefile: diff --git a/lang/spidermonkey102/Makefile b/lang/spidermonkey102/Makefile index 219c5543fe83..3f32420c85c6 100644 --- a/lang/spidermonkey102/Makefile +++ b/lang/spidermonkey102/Makefile @@ -13,8 +13,6 @@ WWW=3D https://spidermonkey.dev/ LICENSE=3D MPL20 LICENSE_FILE=3D ${WRKSRC}/LICENSE -BROKEN_FreeBSD_12=3D ERROR: Cannot find readelf - BUILD_DEPENDS=3D ${LOCALBASE}/bin/python${PYTHON3_DEFAULT}:lang/python${PYTHON3_DEFAULT:S/./= /g} \ ${RUST_DEFAULT}>=3D1.35:lang/${RUST_DEFAULT} \ autoconf2.13:devel/autoconf2.13 \ --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269241-7788>