Bug 260484 - x11/xorg-cf-files: Update to 1.0.8
Summary: x11/xorg-cf-files: Update to 1.0.8
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: Yasuhiro Kimura
URL: https://lists.x.org/archives/xorg-ann...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-17 02:50 UTC by Yasuhiro Kimura
Modified: 2023-07-09 23:27 UTC (History)
2 users (show)

See Also:
yasu: maintainer-feedback-
yasu: merge-quarterly-
antoine: exp-run+


Attachments
Patch file (4.10 KB, patch)
2021-12-17 02:50 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (5.04 KB, patch)
2021-12-17 06:46 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (5.06 KB, patch)
2022-10-13 07:14 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (1.43 KB, patch)
2023-06-08 09:53 UTC, Yasuhiro Kimura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2021-12-17 02:50:40 UTC
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.
Comment 1 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-12-17 06:46:47 UTC
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.
Comment 2 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-12-17 09:30:09 UTC
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]%
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2021-12-18 15:04:33 UTC
Exp-run looks fine.
Comment 4 Niclas Zeising freebsd_committer freebsd_triage 2021-12-30 18:21:38 UTC
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?
Comment 5 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-10-13 07:14:20 UTC
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.
Comment 6 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-10-15 15:34:10 UTC
(In reply to Yasuhiro Kimura from comment #5)

Merge request to upstream:
https://gitlab.freedesktop.org/xorg/util/cf/-/merge_requests/8
Comment 7 Jan Beich freebsd_committer freebsd_triage 2023-05-31 02:51:54 UTC
^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
Comment 8 Yasuhiro Kimura freebsd_committer freebsd_triage 2023-06-08 09:53:37 UTC
Created attachment 242681 [details]
Updated patch file

Update to newer version 1.0.8.

This includes change mentioned in comment #5 and comment #6
Comment 9 Yasuhiro Kimura freebsd_committer freebsd_triage 2023-06-21 01:14:27 UTC
Would you please try another exp-run with my latest patch?
Comment 10 Antoine Brodin freebsd_committer freebsd_triage 2023-06-25 20:54:12 UTC
exp-run looks fine
Comment 11 Yasuhiro Kimura freebsd_committer freebsd_triage 2023-07-09 23:22:13 UTC
Maintainer timeout. Take.
Comment 12 commit-hook freebsd_committer freebsd_triage 2023-07-09 23:25:35 UTC
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(-)