Bug 258812 - devel/basu: broken LLD 13 build
Summary: devel/basu: broken LLD 13 build
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: Jan Beich
URL:
Keywords: patch
Depends on:
Blocks: 258209
  Show dependency treegraph
 
Reported: 2021-09-30 16:53 UTC by Ghost
Modified: 2021-11-28 05:14 UTC (History)
4 users (show)

See Also:
jbeich: merge-quarterly+


Attachments
v1 (use "git am") (1.87 KB, patch)
2021-09-30 16:53 UTC, Ghost
no flags Details | Diff
v2 ("git am") (3.51 KB, patch)
2021-10-10 12:55 UTC, Ghost
jbeich: maintainer-approval+
Details | Diff
use upstream fix ("git am") (3.40 KB, patch)
2021-11-28 03:59 UTC, Ghost
2khramtsov: maintainer-approval? (jbeich)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ghost 2021-09-30 16:53:55 UTC
Created attachment 228291 [details]
v1 (use "git am")

devel/llvm13 as system toolchain can't link devel/basu. The attached workaround (?) fixes this for me. At least x11/mako notifications works fine. I'll file upstream PR today or tomorrow, also need to check if this is the right thing to do.
Comment 1 Ghost 2021-09-30 16:55:21 UTC
Forgot PORTREVISION again, --amend this, sorry.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2021-09-30 17:58:03 UTC
Comment on attachment 228291 [details]
v1 (use "git am")

I'll probably wait for upstream review. The fix introduces warnings:

../src/libsystemd/sd-bus/bus-error.c:74:31: warning: 'extern' variable has an initializer [-Wextern-initializer]
extern const sd_bus_error_map __start_BUS_ERROR_MAP[] = {};
                              ^
../src/libsystemd/sd-bus/bus-error.c:75:31: warning: 'extern' variable has an initializer [-Wextern-initializer]
extern const sd_bus_error_map __stop_BUS_ERROR_MAP[] = {};
                              ^
Comment 3 Ghost 2021-10-01 17:41:31 UTC
> The fix introduces warnings

Don't merge this :) tests will also SIGSEGV due to overrun while walking bus_standard_errors[], x11/mako didn't expose this, but tests did.

The way to fix this is to rewrite some of bus_standard_errors[] walking logic,
I attached WIP at https://lists.sr.ht/~emersion/public-inbox/%3CCANvPQf_5qOdfbe4Tk029yVB6BHipmYfQnuuCVoTUv3N%3D2f8jfw%40mail.gmail.com%3E

"test-bus-error" works with standard dbus errors using WIP, but still fails with custom dbus errors. I opted for an upstream issue because I don't know what to do about custom dbus error tests, I don't know dbus stuff.
Comment 4 Ghost 2021-10-10 12:55:36 UTC
Created attachment 228559 [details]
v2 ("git am")

- test-bus-error passes again;
- package contents did not change on 12.2-13.0/{amd64,i386} and 13.0/aarch64;
- no new warnings on 12.2-13.0/{amd64,i386} and 13.0/aarch64 (via qemu-user-static and native-xtools).

Upstream yet to decide.
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2021-10-19 19:08:43 UTC
(In reply to Evgeniy Khramtsov from comment #4)
I believe the maintainer timeout has now expired?
Comment 6 Ghost 2021-10-19 22:01:04 UTC
(In reply to Dimitry Andric from comment #5)

No.

- I didn't request maintainer-approval for v2.
- I forgot to mark v1 as obsolete after v2.

This should be first fixed upstream per comment 2.
Comment 7 Jan Beich freebsd_committer freebsd_triage 2021-10-20 01:49:40 UTC
(In reply to Evgeniy Khramtsov from comment #6)
I've pinged upstream but it ended up in a separate thread (despite importing mbox locally to make sure References field is correct).
https://lists.sr.ht/~emersion/public-inbox/%3Ca6j4-iinz-wny%40FreeBSD.org%3E

Otherwise, v2 looks OK. Let's wait at least 2 days more then land regardless.
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-10-30 02:46:30 UTC
A commit in branch main references this bug:

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

commit ffe546db80d95396051300a693d07acdcda457a3
Author:     Evgeniy Khramtsov <evgeniy@khramtsov.org>
AuthorDate: 2021-10-09 15:37:45 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-10-30 02:45:34 +0000

    devel/basu: unbreak build with LLD 13 (devel/llvm13 or -CURRENT)

    ld: error: undefined symbol: __start_BUS_ERROR_MAP
    >>> referenced by bus-error.c
    >>>               libsystemd_static.a.p/sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a

    ld: error: undefined symbol: __stop_BUS_ERROR_MAP
    >>> referenced by bus-error.c
    >>>               libsystemd_static.a.p/sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a
    >>> referenced by bus-error.c
    >>>               libsystemd_static.a.p/sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a
    cc: error: linker command failed with exit code 1 (use -v to see invocation)

    PR:             258812
    Obtained from:  https://github.com/systemd/systemd/commit/945317a4b69d

 devel/basu/files/patch-lld13 (new) | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-10-30 02:46:31 UTC
A commit in branch 2021Q4 references this bug:

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

commit b1a8e908da76d6f35eef7486f0a30b637cf879b2
Author:     Evgeniy Khramtsov <evgeniy@khramtsov.org>
AuthorDate: 2021-10-09 15:37:45 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-10-30 02:46:08 +0000

    devel/basu: unbreak build with LLD 13 (devel/llvm13 or -CURRENT)

    ld: error: undefined symbol: __start_BUS_ERROR_MAP
    >>> referenced by bus-error.c
    >>>               libsystemd_static.a.p/sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a

    ld: error: undefined symbol: __stop_BUS_ERROR_MAP
    >>> referenced by bus-error.c
    >>>               libsystemd_static.a.p/sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a
    >>> referenced by bus-error.c
    >>>               libsystemd_static.a.p/sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a
    cc: error: linker command failed with exit code 1 (use -v to see invocation)

    PR:             258812
    Obtained from:  https://github.com/systemd/systemd/commit/945317a4b69d

    (cherry picked from commit ffe546db80d95396051300a693d07acdcda457a3)

 devel/basu/files/patch-lld13 (new) | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
Comment 10 Ghost 2021-11-28 03:59:52 UTC
Created attachment 229762 [details]
use upstream fix ("git am")
Comment 11 commit-hook freebsd_committer freebsd_triage 2021-11-28 05:14:28 UTC
A commit in branch main references this bug:

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

commit 175cb372bbfba1f6f56a2710cc8aab40512b1cea
Author:     Evgeniy Khramtsov <evgeniy@khramtsov.org>
AuthorDate: 2021-11-28 03:56:15 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-11-28 05:13:00 +0000

    devel/basu: switch to upstream fix after ffe546db80d9

    PR:             258812

 devel/basu/Makefile                 |  1 +
 devel/basu/distinfo                 |  2 ++
 devel/basu/files/patch-lld13 (gone) | 23 -----------------------
 3 files changed, 3 insertions(+), 23 deletions(-)