Opened 19 months ago

Closed 18 months ago

Last modified 18 months ago

#66173 closed defect (duplicate)

zig 0.10.0 fails to build on arm64

Reported by: breun (Nils Breunese) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: arm64 Cc: felix@…
Port: zig

Description (last modified by breun (Nils Breunese))

~ ❯ sw_vers              
ProductName:		macOS
ProductVersion:		13.0
BuildVersion:		22A380
~ ❯ sudo port install zig
--->  Computing dependencies for zig
--->  Fetching archive for zig
--->  Attempting to fetch zig-0.10.0_0.darwin_22.arm64.tbz2 from https://packages.macports.org/zig
--->  Attempting to fetch zig-0.10.0_0.darwin_22.arm64.tbz2 from https://ema.uk.packages.macports.org/zig
--->  Attempting to fetch zig-0.10.0_0.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/zig
--->  Building zig
Error: Failed to build zig: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_zig/zig/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port zig failed

The end of /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_zig/zig/main.log looks like this:

:info:build ld: warning: directory not found for option '-L/opt/local/share/cmake/Modules'
:info:build Undefined symbols for architecture arm64:
:info:build   "_panic_stage", referenced from:
:info:build       _std.debug.panicImpl in zig2.o
:info:build   "_panic_state_raw", referenced from:
:info:build       _crash_report.PanicSwitch.preDispatch in zig2.o
:info:build       _crash_report.PanicSwitch.dispatch in zig2.o
:info:build   "_zir_state", referenced from:
:info:build       _crash_report.AnalyzeBody.push in zig2.o
:info:build       _crash_report.AnalyzeBody.pop in zig2.o
:info:build       _crash_report.dumpStatusReport in zig2.o
:info:build ld: symbol(s) not found for architecture arm64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [zig2] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_zig/zig/work/build'
:info:build make[1]: *** [CMakeFiles/zig2.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_zig/zig/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_zig/zig/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_zig/zig/work/build" && /usr/bin/make -j10 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build zig: command execution failed
:debug:build Error code: CHILDSTATUS 62106 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_zig/zig/main.log for details.

https://ports.macports.org/port/zig/details/ shows that zig also fails to build on the arm64 versions of Monterey and Big Sur due the same issue.

Change History (9)

comment:1 Changed 19 months ago by kencu (Ken)

see also 65333

comment:2 Changed 18 months ago by christoph-morrison (Christoph 'knurd' Morrison)

Same on 13.0.1

ProductName:		macOS
ProductVersion:		13.0.1
BuildVersion:		22A400
Version 0, edited 18 months ago by christoph-morrison (Christoph 'knurd' Morrison) (next)

comment:3 Changed 18 months ago by kencu (Ken)

removing a patchfile seems to work for some. See ticket:65333

Last edited 18 months ago by kencu (Ken) (previous) (diff)

comment:4 Changed 18 months ago by breun (Nils Breunese)

Does this mean I need to build a custom LLVM port?

Last edited 18 months ago by breun (Nils Breunese) (previous) (diff)

comment:5 Changed 18 months ago by breun (Nils Breunese)

Description: modified (diff)
Summary: zig 0.10.0 fails to build on macOS 13 arm64zig 0.10.0 fails to build on arm64

comment:6 Changed 18 months ago by kencu (Ken)

Resolution: duplicate
Status: newclosed

there is more information in the other ticket, so what say we re-open that and close this, to keep it all in one place?

comment:7 Changed 18 months ago by breun (Nils Breunese)

i0ntempest said the following about this ticket in ticket:65333: “That's a different error, though might be caused by the same thing (the emutls patch for llvm).” I don’t know if this is a duplicate or not.

The other ticket was also already closed, even though arm64 builds wet still failing on the buildbots, so I created this new ticket, but I see it’s been reopened now.

Last edited 18 months ago by breun (Nils Breunese) (previous) (diff)

comment:8 Changed 18 months ago by kencu (Ken)

yes

comment:9 Changed 18 months ago by kencu (Ken)

what's in this ticket is a small subset of the information there, which is more useful.

Note: See TracTickets for help on using tickets.