Bug 273124 - update lang/zig to 0.11.0
Summary: update lang/zig to 0.11.0
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: //ziglang.org/download/0.11.0/release...
Keywords:
Depends on:
Blocks: 273274
  Show dependency treegraph
 
Reported: 2023-08-14 04:37 UTC by Nathan Fisher
Modified: 2024-01-02 09:35 UTC (History)
2 users (show)

See Also:


Attachments
Up (354.37 KB, patch)
2023-08-14 04:37 UTC, Nathan Fisher
no flags Details | Diff
update zig, fix DOCS (183.52 KB, patch)
2023-11-14 08:37 UTC, Dave Cottlehuber
no flags Details | Diff
update zig, fix DOCS, to be applied after jbeich patch (226.07 KB, patch)
2023-11-14 08:51 UTC, Dave Cottlehuber
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Fisher 2023-08-14 04:37:52 UTC
Created attachment 244080 [details]
Up

Zig 0.11.0 was released on 08-04-2023. The attached patch updates the port.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2023-08-15 03:34:24 UTC
Existing lang/zig should probably be renamed to lang/zig010. It doesn't scale otherwise: unbreaking consumers is non-trivial but each upstream has different release cadence. For example,
https://github.com/freebsd/freebsd-ports/compare/main...jbeich:zig-0.11
(append .patch to above URL to download and apply via "git am")

Also, attachment 244080 [details] regresses check-plist:

$ poudriere testport -j 132amd64 lang/zig
[...]
===========================================================================
====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: /wrkdirs/usr/ports/lang/zig/work/.build/stage3/bin/zig
Error: Orphaned: /wrkdirs/usr/ports/lang/zig/work/.build/stage3/lib/zig/build_runner.zig
Error: Orphaned: /wrkdirs/usr/ports/lang/zig/work/.build/stage3/lib/zig/c.zig
Error: Orphaned: /wrkdirs/usr/ports/lang/zig/work/.build/stage3/lib/zig/compiler_rt.zig
Error: Orphaned: /wrkdirs/usr/ports/lang/zig/work/.build/stage3/lib/zig/compiler_rt/aarch64_outline_atomics.zig
Error: Orphaned: /wrkdirs/usr/ports/lang/zig/work/.build/stage3/lib/zig/compiler_rt/absv.zig
Error: Orphaned: /wrkdirs/usr/ports/lang/zig/work/.build/stage3/lib/zig/compiler_rt/absvdi2.zig
Error: Orphaned: /wrkdirs/usr/ports/lang/zig/work/.build/stage3/lib/zig/compiler_rt/absvdi2_test.zig
[...]
Comment 2 Jan Beich freebsd_committer freebsd_triage 2023-08-15 04:43:22 UTC
Appears to break FreeBSD < 13 until EOL on 2023-12-31 per https://www.freebsd.org/security/#sup

$ poudriere testport -j 124amd64 lang/zig
[...]
zig build-exe zig ReleaseFast native-native: error: the following command failed with 1 compilation errors:
/wrkdirs/usr/ports/lang/zig/work/.build/zig2 build-exe --stack 33554432 /wrkdirs/usr/ports/lang/zig/work/zig-0.11.0/src/main.zig /wrkdirs/usr/ports/lang/zig/work/.build/zigcpp/libzigcpp.a /usr/local/llvm16/lib/libclang-cpp.so.16 /usr/local/llvm16/lib/liblldMinGW.a /usr/local/llvm16/lib/liblldELF.a /usr/local/llvm16/lib/liblldCOFF.a /usr/local/llvm16/lib/liblldWasm.a /usr/local/llvm16/lib/liblldMachO.a /usr/local/llvm16/lib/liblldCommon.a -lLLVM-16 -lexecinfo -lz -lzstd /usr/lib/libc++.so -lc -fstrip -OReleaseFast --cache-dir /wrkdirs/usr/ports/lang/zig/work/zig-0.11.0/zig-cache --global-cache-dir /wrkdirs/usr/ports/lang/zig/work/.cache/zig --name zig -target native-native -mcpu x86_64 --mod build_options::/wrkdirs/usr/ports/lang/zig/work/zig-0.11.0/zig-cache/c/8be3380d7aa95aa051fdfc613f919a48/options.zig --deps build_options -I /usr/local/llvm16/include -I /usr/local/llvm16/include -L /usr/local/llvm16/lib -L /usr/local/lib -I /usr/local/include --zig-lib-dir /wrkdirs/usr/ports/lang/zig/work/zig-0.11.0/lib --listen=- 
Build Summary: 2/5 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
+- install zig transitive failure
   +- zig build-exe zig ReleaseFast native-native 1 errors
error: ld.lld: undefined symbol: copy_file_range
    note: referenced by zig
    note:               /wrkdirs/usr/ports/lang/zig/work/zig-0.11.0/zig-cache/o/00823b2ab8afff70aca786909e306095/zig.o:(link.Elf.growNonAllocSection)
    note: referenced by zig
    note:               /wrkdirs/usr/ports/lang/zig/work/zig-0.11.0/zig-cache/o/00823b2ab8afff70aca786909e306095/zig.o:(objcopy.ElfFileHelper.write)
    note: referenced by zig
    note:               /wrkdirs/usr/ports/lang/zig/work/zig-0.11.0/zig-cache/o/00823b2ab8afff70aca786909e306095/zig.o:(link.MachO.growSection)
    note: referenced 3 more times
ninja: build stopped: cannot make progress due to previous errors.
Comment 3 iron.udjin 2023-08-18 03:01:09 UTC
Just tested this port. It works find for me. But... If DOCS=off the port cannot install some files. See: #270007.
Comment 4 Dave Cottlehuber freebsd_committer freebsd_triage 2023-11-14 08:37:11 UTC
Created attachment 246293 [details]
update zig, fix DOCS

I agree with jbeich we should fork zig010 for dependencies to allow them to upgrade.
I have attached a zig 0.11 patch that should fix DOCS issue referred in 270007 as well.

jbeich: do you want to commit your patch set now, if it's still current?

https://github.com/freebsd/freebsd-ports/compare/main...jbeich:zig-0.11.patch

I can apply 0.11 after that if Nathan's ok with my new diff.
Comment 5 Dave Cottlehuber freebsd_committer freebsd_triage 2023-11-14 08:51:04 UTC
Created attachment 246294 [details]
update zig, fix DOCS, to be applied after jbeich patch

- use en_US.UTF-8 locale for sorting pkg-plist
- stacks on top of jbeich's patch (which just adds CONFLICTS= ...) to forked zig010
Comment 6 Jan Beich freebsd_committer freebsd_triage 2023-11-14 11:37:16 UTC
Comment on attachment 246294 [details]
update zig, fix DOCS, to be applied after jbeich patch

- "poudriere bulk -t" still complains about failing check-plist due to /wrkdirs/*/stage3
- PORTREVISION and CMAKE_SKIP_INSTALL_RPATH removal should be synced with zig010
- files/patch-CMakeLists.txt timestamp doesn't match "make makepatch" output
- pkg-plist has sorting is inconsistent with "make makeplist" due to ports 02f27a83b44d

(In reply to Dave Cottlehuber from comment #4)
> jbeich: do you want to commit your patch set now, if it's still current?

Who lands is usually up to bug Assignee. Besides, comment 2 is still unsolved: report upstream, wait until /stable/12 EOL or break now by landing "as is".
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-01-01 05:40:55 UTC
A commit in branch main references this bug:

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

commit 8c1e3e605452d8181b2180dad180679d93aecbe3
Author:     Nathan Fisher <jeang3nie@hitchhiker-linux.org>
AuthorDate: 2023-08-14 04:32:18 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-01-01 05:37:19 +0000

    lang/zig: update to 0.11.0

    Changes:        https://ziglang.org/download/0.11.0/release-notes.html
    PR:             273124
    Approved by:    dch (maintainer)

 astro/mepo/Makefile                 |    2 +-
 audio/linuxwave/Makefile            |    2 +-
 biology/vcflib/Makefile             |    2 +-
 devel/zls/Makefile                  |    6 +-
 lang/zig/Makefile                   |    6 +-
 lang/zig/distinfo                   |   10 +-
 lang/zig/files/patch-CMakeLists.txt |   12 +-
 lang/zig/pkg-plist                  | 3040 +++++++++++++----------------------
 sysutils/ncdu2/Makefile             |    2 +-
 x11-wm/river/Makefile               |    2 +-
 x11/waylock/Makefile                |    2 +-
 11 files changed, 1160 insertions(+), 1926 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-01-01 05:40:56 UTC
A commit in branch main references this bug:

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

commit aaaa65fc0629810abd45313c70ee0cf10d31e8ee
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-08-15 02:42:24 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-01-01 05:36:21 +0000

    lang/zig: fork 0.10 into a pinned port

    Some consumers are ready for 0.11 syntax but many are not.

    PR:             273124
    Approved by:    dch (maintainer)

 lang/Makefile                                |     1 +
 lang/zig/Makefile                            |     2 +
 lang/zig010/Makefile (new)                   |    66 +
 lang/zig010/distinfo (new)                   |     5 +
 lang/zig010/files/patch-CMakeLists.txt (new) |    10 +
 lang/zig010/pkg-descr (new)                  |     2 +
 lang/zig010/pkg-plist (new)                  | 13845 +++++++++++++++++++++++++
 7 files changed, 13931 insertions(+)
Comment 9 Jan Beich freebsd_committer freebsd_triage 2024-01-01 06:11:59 UTC
Landed after ports bbab7f59e963 but before 2024Q1 brached. check-plist regression, unrelated fixes and general cleanup are left for later and don't need my input.
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-01-02 09:35:19 UTC
A commit in branch main references this bug:

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

commit 75a1a208d4d1814c54ce216f347af58bea118d2d
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-01-02 08:52:59 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-01-02 09:33:33 +0000

    lang/zig: unbreak fetch due distfile refresh after 8c1e3e605452

    fetch: https://ziglang.org/download/0.11.0/zig-0.11.0.tar.xz: size mismatch: expected 65092512, actual 15275316

     $ tar tvf zig-0.11.0.tar.xz
    [...]
    -drwxr-xr-x  0 ci     ci          0  3 Aug 19:21 zig-0.11.0/
    +drwxr-xr-x  0 ci     ci          0 14 Aug 21:57 zig-0.11.0/
    [...]
    -drwxr-xr-x  0 ci     ci          0  3 Aug 19:21 zig-0.11.0/zig-cache/
    -drwxr-xr-x  0 ci     ci          0  3 Aug 19:21 zig-0.11.0/zig-cache/h/
    --rw-r--r--  0 ci     ci       1637  3 Aug 19:21 zig-0.11.0/zig-cache/h/00889a5c28974786c8a0c50f32a3b330.txt
    --rw-r--r--  0 ci     ci       1643  3 Aug 19:21 zig-0.11.0/zig-cache/h/0191ddcdc8f7323e7ca29bde7a0ce808.txt
    --rw-r--r--  0 ci     ci       1649  3 Aug 19:21 zig-0.11.0/zig-cache/h/02293e34764cd700f7fa1bad9f99905d.txt
    --rw-r--r--  0 ci     ci       1486  3 Aug 19:21 zig-0.11.0/zig-cache/h/037b3303e65027dcd4d04821163b69fb.txt
    --rw-r--r--  0 ci     ci       1335  3 Aug 19:21 zig-0.11.0/zig-cache/h/0477d12ba45a9f7192f1c7e081ea54c6.txt
    [...]

    PR:             273124 (expect pkg-fallout@ spam)
    Reported by:    olgeni (via private mail)
    See also:       https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/54824

 lang/zig/distinfo | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)