Created attachment 230189 [details] Patch file In the ar(1) man page of base system 'l' option is explained as following. -l This option is accepted for compatibility with GNU ar(1), but is ignored. However, since binutils 2.36 GNU ar changed the meaning of 'l' option. According to the ar(1) man page of binutils 2.37 it is explained as following. l Specify dependencies of this library. The dependencies must immediately follow this option character, must use the same syntax as the linker command line, and must be specified within a single argument. I.e., if multiple items are needed, they must be quoted to form a single command line argument. For example L "-L/usr/local/lib -lmydep1 -lmydep2" And this incompatible change affects to the build of ports that uses 'USES=imake' if devel/binutils is installed and /usr/local/bin is before /usr/bin in the value of PATH environment variable. For example build of textproc/docbook-to-man fails as following. rm -f libtptregexp.a ar clq libtptregexp.a regexp.o regsub.o regerror.o ar: libdeps specified more than once *** Error code 1 Stop. make[3]: stopped in /usr0/freebsd/ports/work/usr/ports/textproc/docbook-to-man/work/docbook-to-man/Instant/tptregexp *** Error code 1 Stop. make[2]: stopped in /usr0/freebsd/ports/work/usr/ports/textproc/docbook-to-man/work/docbook-to-man/Instant *** Error code 1 Stop. make[1]: stopped in /usr0/freebsd/ports/work/usr/ports/textproc/docbook-to-man/work/docbook-to-man *** Error code 1 Stop. make: stopped in /usr/ports/textproc/docbook-to-man Therefore change Imake.tmpl so 'l' options isn't used with 'ar'. As is explained above 'ar' of base system ignores 'l' option. So it should work fine even if devel/binutils isn't installed and 'ar' of base system is used.
Created attachment 230194 [details] Updated patch file Add definition of ArCmd, ArAddCmd and ArExtCmd to FreeBSD.cf instead of changing the definition of them in Imake.tmpl. FreeBSD.cf is used to keep settings specific to FreeBSD. So it seems more proper place to fix the problem.
I would like request exp-run with latest patch as it affects to 189 ports in the ports tree. yasu@rolling-vm-freebsd2[1544]% pwd /usr/ports yasu@rolling-vm-freebsd2[1545]% find -s . -name Makefile -exec grep 'USES.*imake' {} + | wc -l 189 yasu@rolling-vm-freebsd2[1546]%
Exp-run looks fine.
I have no objections to this, however, this change should affect all systems using binutils, not just FreeBSD, so perhaps they should be changed in a more global location? Have these patches been submitted upstream?
Created attachment 237253 [details] Updated patch file Update patch to fix the issue. Version 1.0.7 includes the fix of the error but it assumes the issue is specific to Linux and the error still happens on FreeBSD. So update patch to fix the issue on FreeBSD as following. 1. Introduce new macro 'HasGnuAr'. 2. Change Imake.tmpl so it defines 'ArCmd' as 'ArCmdBase cq' if 'HasGnuAr' is defined. 3. Define 'HasGnuAr' in both FreeBSD.cf and linux.cf. I'm going to submit patch to upstream.
(In reply to Yasuhiro Kimura from comment #5) Merge request to upstream: https://gitlab.freedesktop.org/xorg/util/cf/-/merge_requests/8
^Triage: adjust for limbo status: - the maintainer's approval (in comment 4) is ambigous - the specific maintainer cannot land the patch after ports ce10a2259b9d - the reporter can land the patch instead after ports 88280cfb082d - the exp-run results (in comment 3) may no longer apply - the upstream fix is part of 1.0.8 per https://lists.x.org/archives/xorg-announce/2023-February/003329.html
Created attachment 242681 [details] Updated patch file Update to newer version 1.0.8. This includes change mentioned in comment #5 and comment #6
Would you please try another exp-run with my latest patch?
exp-run looks fine
Maintainer timeout. Take.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9382e1983615b9bd30bb1d499e94571da74b6bbe commit 9382e1983615b9bd30bb1d499e94571da74b6bbe Author: Yasuhiro Kimura <yasu@FreeBSD.org> AuthorDate: 2023-06-08 09:45:29 +0000 Commit: Yasuhiro Kimura <yasu@FreeBSD.org> CommitDate: 2023-07-09 23:24:57 +0000 x11/xorg-cf-files: Update to 1.0.8 ReleaseNotes: https://lists.x.org/archives/xorg-announce/2023-February/003329.html PR: 260484 Exp-run By: antoine Approved by: maintainer timeout x11/xorg-cf-files/Makefile | 4 ++-- x11/xorg-cf-files/distinfo | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)