Opened 2 years ago

Closed 7 weeks ago

#65333 closed defect (fixed)

zig 0.10.0 fails to build on arm64

Reported by: i0ntempest Owned by: i0ntempest
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc: felix@…, saagarjha (Saagar Jha), shahn, temp (Stephan Wentz), vigna (Sebastiano Vigna), antixsuperstar (Marcos G Y), dsedivec, eric-j-ason, mascguy (Christopher Nielsen)
Port: zig, llvm-13

Description

:info:destroot -- Installing: /opt/local/lib
:info:destroot error(link): undefined reference to symbol '___emutls_get_address'
:info:destroot error(link):   first referenced in '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/zig-0.9.1/zig-cache/o/8c8e1d0293d93fa83f2451e5253da17a/build.o'
:info:destroot error: UndefinedSymbolReference
:info:destroot ::
:info:destroot :: ERROR: 1
:info:destroot :: (execute_process)
:info:destroot ::
:info:destroot :: argv: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/zig build --zig-lib-dir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/zig-0.9.1/lib -Dlib-files-only --prefix /opt/local -Dconfig_h=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/config.h install
:info:destroot ::
:info:destroot :: argv[0]: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/zig
:info:destroot :: argv[1]: build
:info:destroot :: argv[2]: --zig-lib-dir
:info:destroot :: argv[3]: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/zig-0.9.1/lib
:info:destroot :: argv[4]: -Dlib-files-only
:info:destroot :: argv[5]: --prefix
:info:destroot :: argv[6]: /opt/local
:info:destroot :: argv[7]: -Dconfig_h=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/config.h
:info:destroot :: argv[8]: install
:info:destroot ::
:info:destroot CMake Error at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/zig-0.9.1/cmake/install.cmake:36 (message):
:info:destroot Call Stack (most recent call first):
:info:destroot   cmake_install.cmake:63 (include)
:info:destroot make: *** [install/fast] Error 1

Attachments (1)

main.log (617.9 KB) - added by i0ntempest 2 years ago.

Download all attachments as: .zip

Change History (48)

Changed 2 years ago by i0ntempest

Attachment: main.log added

comment:1 Changed 2 years ago by saagarjha (Saagar Jha)

Cc: saagarjha added

comment:2 Changed 2 years ago by saagarjha (Saagar Jha)

In my case it's _panic_stage:

:info:destroot error(link): undefined reference to symbol '_panic_stage'
:info:destroot error(link):   first referenced in '/opt/local/var/macports/build/_Users_saagarjha_Developer_macports-ports_lang_zig/zig/work/zig-0.9.1/zig-cache/o/6a87c1188d68d8f3437a2f9cdaa6f7d8/build.o'
:info:destroot error: UndefinedSymbolReference
:info:destroot ::
:info:destroot :: ERROR: 1
:info:destroot :: (execute_process)

Interestingly this only reproduces using MacPorts's LLVM. I don't see it when building from source…

comment:3 Changed 2 years ago by i0ntempest

We have different problems then, for me it fails even in a manual build. Also see: https://github.com/ziglang/zig/issues/11920

comment:4 Changed 2 years ago by saagarjha (Saagar Jha)

Just to be clear, this reproduces in a manual build too if I use MacPorts LLVM. Using a LLVM I built myself does not reproduce the issue. Just wanted to confirm that you were doing this rather than using MacPorts to get the dependencies :)

comment:5 Changed 2 years ago by kencu (Ken)

I might wonder if it could somehow be connected to this commit, that enabled emulated-tls for all llvm/clangs:

[1624fe05a9a4301b52b76ef157f4ec63378338d9/macports-ports]

I can't see, at the moment, how else that symbol could be creeping into the build.

Last edited 7 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 2 years ago by saagarjha (Saagar Jha)

Removing "0019-10.6-and-less-use-emulated-TLS-before-10.7.patch" from llvm's Portfile fixes the issue. From the patch I'm not entirely sure why because it seems to not make changes on <10.7, but I'm sure Ken can work it out from there :)

comment:7 Changed 2 years ago by i0ntempest

Just confirmed, it's indeed caused by that patch. If that patch is supposed to change stuff on 10.7 and earlier maybe we could apply it only on those systems for now?

comment:8 Changed 2 years ago by kencu (Ken)

well, that’s how it was before, but Marcus had to change it to apply on all system versions to fix an issue with rust.

I think then somehow this added condition is leading llvm to tell zig to use emulated tls?

https://github.com/macports/macports-ports/blob/e8ee22994285a56f684af1ddf7841051378f1410/lang/llvm-13/files/0019-10.6-and-less-use-emulated-TLS-before-10.7.patch#L52

If that is the exact issue wonder why this test is isMacOSXVersionLT(10, 7) is misbehaving… have to find and read over exactly how that is set.

comment:9 Changed 2 years ago by i0ntempest

Port: llvm-13 added

comment:10 Changed 2 years ago by i0ntempest

Any news on this? If the emutls patch file cannot be removed maybe put it into a variant or something?

comment:11 Changed 2 years ago by i0ntempest

Owner: set to i0ntempest
Resolution: fixed
Status: newclosed

In 79cdca7883640b43b03f0b216de0e1a56df0db0f/macports-ports (master):

zig: update to 0.10.0, add lib dependencies

Closes: #65333

comment:12 Changed 2 years ago by i0ntempest

Looks like after the 0.10 upgrade, arm builds are getting the _panic_stage symbol not found error:

Undefined symbols for architecture arm64:
  "_panic_stage", referenced from:
      _std.debug.panicImpl in zig2.o
  "_panic_state_raw", referenced from:
      _crash_report.PanicSwitch.preDispatch in zig2.o
      _crash_report.PanicSwitch.dispatch in zig2.o
  "_zir_state", referenced from:
      _crash_report.AnalyzeBody.push in zig2.o
      _crash_report.AnalyzeBody.pop in zig2.o
      _crash_report.dumpStatusReport in zig2.o
ld: symbol(s) not found for architecture arm64

I don't have an arm machine so I don't know how to tackle this.

comment:13 Changed 2 years ago by saagarjha (Saagar Jha)

I have an Apple silicon Mac and have been running with a patch that removes the TLS fix for 10.6 for several months without problems. I don't actually know what the difference is but considering it works, perhaps we can make it conditional on OS like it was before?

comment:14 Changed 2 years ago by kencu (Ken)

I think zig must monkey with the target triple… how else??

but you would imagine that would cause lotsvof fallout…

comment:15 Changed 2 years ago by kencu (Ken)

what to do…

removing the tls patch for arm would probably practically do the zig fix, but it’s undesirable for systems to diverge like this. llvm built universal arm64/x86_64 on arm would be different than llvm built universal on Intel

fixing zig seems impossibly difficult to ask, given what we’re doing to llvm here.

https://github.com/ziglang/zig/issues/11920

making zig use it’s own sequestered llvm is inefficient and a maintenance burden…

Last edited 2 years ago by kencu (Ken) (previous) (diff)

comment:16 Changed 2 years ago by breun (Nils Breunese)

I ran into this issue when trying to install the ncdu port on arm64, which has zig as a dependency. I see this ticket is closed. Does that mean this issue should be solved now? Because it's not solved for me, see ticket:66173.

Last edited 2 years ago by breun (Nils Breunese) (previous) (diff)

comment:17 in reply to:  16 Changed 2 years ago by i0ntempest

Replying to breun:

I ran into this issue when trying to install the ncdu port on arm64, which has zig as a dependency. I see this ticket is closed. Does that mean this issue should be solved now? Because it's not solved for me, see ticket:66173.

That's a different error, though might be caused by the same thing (the emutls patch for llvm).

comment:18 Changed 2 years ago by kencu (Ken)

Resolution: fixed
Status: closedreopened

comment:19 Changed 2 years ago by kencu (Ken)

has duplicate 66173

comment:20 Changed 2 years ago by kencu (Ken)

Summary: zig: destroot failure: undefined reference to symbol '___emutls_get_address'zig 0.10.0 fails to build on arm64

comment:21 Changed 2 years ago by shahn

Cc: shahn added

comment:22 Changed 23 months ago by temp (Stephan Wentz)

Cc: temp added

comment:23 Changed 22 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: vigna added

Has duplicate #66766.

comment:24 Changed 21 months ago by mforbes (Michael McNeil Forbes)

Is there a workaround? I really want to be able to use ncdu and this is breaking for me. It is not clear if a workaround is posted elsewhere, but it is certainly not easy to find. Is there some easy way to regress?

Last edited 21 months ago by mforbes (Michael McNeil Forbes) (previous) (diff)

comment:25 Changed 21 months ago by saagarjha (Saagar Jha)

diff --git a/lang/llvm-15/Portfile b/lang/llvm-15/Portfile
index cfe89f37017..b6d106f8c8a 100644
--- a/lang/llvm-15/Portfile
+++ b/lang/llvm-15/Portfile
@@ -132,7 +132,6 @@ patchfiles-append \
     0013-clang-add-back-runtime-libraries-used-on-10.4-and-10.patch \
     0014-Fix-float.h-to-work-on-Snow-Leopard-and-earlier.patch \
     0015-Fixup-libstdc-header-search-paths-for-older-versions.patch \
-    0019-10.6-and-less-use-emulated-TLS-before-10.7.patch \
     0025-lldb-add-defines-needed-for-older-SDKs.patch \
     0999-i386-fix.diff

comment:26 Changed 21 months ago by kencu (Ken)

I think this error is happening with our llvm patch because with our patch, llvm might call for the emulated tls symbol.

zig checks to see if the symbol exists, therefore, and doesn’t find it, so errors.

see

https://github.com/ziglang/zig/issues/8180

and

https://github.com/ziglang/zig/commit/dbfcebf8d88b91c5a85366da09a4ce69c0bb5dc6

We might be able to tell zig not to error when it can’t find

'___emutls_get_address'

by passing a linker flag.

comment:27 Changed 21 months ago by kencu (Ken)

this flag

-fallow-shlib-undefined

might do it, however it might then allow other, needed, undefined symbols to not error… have to see

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

comment:28 Changed 21 months ago by kencu (Ken)

Well, adding:

configure.ldflags-append -Wl,-undefined,dynamic_lookup

didn't work:

ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: illegal thread local variable reference to regular symbol _panic_stage for architecture arm64

comment:29 Changed 21 months ago by vigna (Sebastiano Vigna)

Removing 0019-10.6-and-less-use-emulated-TLS-before-10.7.patch worked for me.

comment:30 Changed 21 months ago by kencu (Ken)

Yes, problem is we can't really remove that patch without sinking the rust ports, so we're trying to see if we can get zig to work even with that patch in.

Otherwise we will need a sequestered llvm for zig I guess.

comment:31 Changed 21 months ago by saagarjha (Saagar Jha)

Can we look into why this patch is breaking the build? As far as I understand it was intended to be a no-op for anything past 10.7. Can we not make it do this?

comment:32 in reply to:  31 Changed 21 months ago by kencu (Ken)

Replying to saagarjha:

Can we look into why this patch is breaking the build? As far as I understand it was intended to be a no-op for anything past 10.7. Can we not make it do this?

look up for my thoughts on this, links to relevant issues, and potential solution paths:

comment:26

Last edited 20 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:33 Changed 20 months ago by antixsuperstar (Marcos G Y)

Cc: antixsuperstar added

comment:34 Changed 20 months ago by mforbes (Michael McNeil Forbes)

Since no one has provided a workaround yet for this, I have posted one for my particular issue with ncdu:

# Make some coffee... this takes a while.
git clone --single-branch https://github.com/macports/macports-ports.git  
cd macports-ports
git checkout 6032b8aa0e865ddedc83b63bc662c7e5e091a909
cd sysutils/ncdu
port install

This will install version ncdu@2.2.1 which uses the previous version of zig.

Don't forget to exclude this when you upgrade:

port upgrade outdated and not ncdu
Last edited 20 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:35 Changed 20 months ago by saagarjha (Saagar Jha)

You know you can tell MacPorts to index a git repo, right? I have a couple of patches that I apply and it manages rebasing them for me on each update. See https://guide.macports.org/#installing.macports.git for how to switch over.

comment:36 Changed 19 months ago by dsedivec

Cc: dsedivec added

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

If you want to use ncdu, and don't necessarily need ncdu 2.x, you can run sudo port install ncdu1 to install ncdu 1.x, which doesn't require zig.

comment:38 Changed 15 months ago by maverickwoo (Maverick Woo)

FWIW, I was just able to build zig 0.11.0 with the latest ports of clang 16 and llvm 16 on arm64 with macOS 12. This subsequently allowed me to build ncdu 2.3 on the same machine.

For the purpose of reproducibility, here are the small changes I've made to my local Portfiles:

[...]
github.setup        ziglang zig 0.11.0
[...]
set llvm_version    16
[...]
checksums           rmd160  484834dc8cb38332eeaab2345f605c711198654f \
                    sha256  71de3e958293dffaa17f7ad1438c775389f5406991c96b533bb1501178092b02 \
                    size    24606916
[...]
    version             2.3
[...]
    checksums           rmd160  f09fce3f38afc24c90c70345f9322c9e3dcee971 \
                        sha256  bbce1d1c70f1247671be4ea2135d8c52cd29a708af5ed62cecda7dc6a8000a3c \
                        size    56608
[...]

P.S. I am aware that this does not solve the problem that zig 0.10.1 does not build on the same machine (which I could also reproduce), but I thought this message may be useful for future visitors of this ticket. (I arrived here originally through ncdu.)

comment:39 Changed 15 months ago by jeffszuhay (Jeff Szuhay)

from beginning of log file:

version:1
:debug:main Starting logging for zig @0.10.1_0
:debug:sysinfo macOS 13.5.1 (darwin/22.6.0) arch arm
:debug:sysinfo MacPorts 2.8.1
:debug:sysinfo Xcode 14.3.1, CLT 14.3.1.0.1.1683849156
:debug:sysinfo SDK 13
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 13.0
:debug:main Fetching zig-0.10.1_0.darwin_22.arm64.tbz2 archive size
:debug:main epoch: in tree: 0 installed: 0
:debug:main cmake 3.24.4_0 exists in the ports tree
:debug:main cmake 3.24.4_0  is the latest installed
:debug:main cmake 3.24.4_0  is active

from failure location in log file:

: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)

comment:40 in reply to:  39 Changed 15 months ago by maverickwoo (Maverick Woo)

I submitted a PR (https://github.com/macports/macports-ports/pull/20090) to upgrade the zig port to 0.11.0. If merged, it will sidestep the issue of 0.10.1 not building and then I will submit a PR to upgrade ncdu as well.

comment:41 Changed 15 months ago by maverickwoo (Maverick Woo)

In bf8204b0ff254e55b1e48ee9498880c7184c6893/macports-ports (master):

zig: update to 0.11.0

See #65333.

Note:

The use of "PortGroup cmake 1.1" would lead to a dependency on the
existence of ${prefix}/share/cmake/Modules, but this directory may not
exist on some machines (such as the CI). We workaround this by
piggybacking on a directory that is known to exist due to the build
dependency on LLVM by this port.

comment:42 Changed 11 months ago by vigna (Sebastiano Vigna)

Unfortunately, does not build again with Sonoma, even using 0.11.0 and removing 0019-10.6-and-less-use-emulated-TLS-before-10.7.patch from llvm-17.

version:1
:debug:main Starting logging for zig @0.11.0_0
:debug:sysinfo macOS 14.1.2 (darwin/23.1.0) arch arm
:debug:sysinfo MacPorts 2.8.1
:debug:sysinfo Xcode 15.0.1, CLT 15.0.0.0.1.1694021235
:debug:sysinfo SDK 14
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 14.0
:debug:main epoch: in tree: 0 installed: 0
:debug:main cmake 3.24.4_0 exists in the ports tree
:debug:main cmake 3.24.4_0  is the latest installed
:debug:main cmake 3.24.4_0 +universal is active
:debug:main Merging existing requested variants '+universal' into variants
:debug:main new fully merged portvariants: universal +
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/devel/cmake
:debug:main OS darwin/23.1.0 (macOS 14.1.2) arch arm
:debug:main Sourcing PortGroup muniversal 1.0 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/muniversal-1.0.tcl
:debug:main Sourcing PortGroup github 1.0 from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/github-
[...]
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/zig2.c:2892819:23: warning: incompatible pointer types passing 'uintptr_t *' (aka 'unsigned long *') to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
:info:build  t5.f1 = zig_subo_u64(&t5.f0, t4, t0, UINT8_C(64));
:info:build                       ^~~~~~
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/zig-0.11.0/stage1/zig.h:670:43: note: passing argument to parameter 'res' here
:info:build static inline bool zig_subo_u64(uint64_t *res, uint64_t lhs, uint64_t rhs, uint8_t bits) {
:info:build                                           ^
:info:build 44 warnings generated.
:info:build [ 94%] Linking CXX executable zig2
:info:build /opt/local/bin/cmake -E cmake_link_script CMakeFiles/zig2.dir/link.txt --verbose=ON
:info:build /opt/local/bin/clang++-mp-16 -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -Wl,-stack_size,0x10000000 CMakeFiles/zig2.dir/zig2.c.o CMakeFiles/zig2.dir/compiler_rt.c.o -o zig2   -L/opt/local/libexec/llvm-16  -L/opt/local/libexec/llvm-16/lib  -Wl,-rpath,/opt/local/lib zigcpp/libzigcpp.a /opt/local/libexec/llvm-16/lib/libclangFrontendTool.a /opt/local/libexec/llvm-16/lib/libclangCodeGen.a /opt/local/libexec/llvm-16/lib/libclangFrontend.a /opt/local/libexec/llvm-16/lib/libclangDriver.a /opt/local/libexec/llvm-16/lib/libclangSerialization.a /opt/local/libexec/llvm-16/lib/libclangSema.a /opt/local/libexec/llvm-16/lib/libclangStaticAnalyzerFrontend.a /opt/local/libexec/llvm-16/lib/libclangStaticAnalyzerCheckers.a /opt/local/libexec/llvm-16/lib/libclangStaticAnalyzerCore.a /opt/local/libexec/llvm-16/lib/libclangAnalysis.a /opt/local/libexec/llvm-16/lib/libclangASTMatchers.a /opt/local/libexec/llvm-16/lib/libclangAST.a /opt/local/libexec/llvm-16/lib/libclangParse.a /opt/local/libexec/llvm-16/lib/libclangSema.a /opt/local/libexec/llvm-16/lib/libclangStaticAnalyzerFrontend.a /opt/local/libexec/llvm-16/lib/libclangStaticAnalyzerCheckers.a /opt/local/libexec/llvm-16/lib/libclangStaticAnalyzerCore.a /opt/local/libexec/llvm-16/lib/libclangAnalysis.a /opt/local/libexec/llvm-16/lib/libclangASTMatchers.a /opt/local/libexec/llvm-16/lib/libclangAST.a /opt/local/libexec/llvm-16/lib/libclangParse.a /opt/local/libexec/llvm-16/lib/libclangBasic.a /opt/local/libexec/llvm-16/lib/libclangEdit.a /opt/local/libexec/llvm-16/lib/libclangLex.a /opt/local/libexec/llvm-16/lib/libclangARCMigrate.a /opt/local/libexec/llvm-16/lib/libclangRewriteFrontend.a /opt/local/libexec/llvm-16/lib/libclangRewrite.a /opt/local/libexec/llvm-16/lib/libclangCrossTU.a /opt/local/libexec/llvm-16/lib/libclangIndex.a /opt/local/libexec/llvm-16/lib/libclangToolingCore.a /opt/local/libexec/llvm-16/lib/libclangExtractAPI.a /opt/local/libexec/llvm-16/lib/libclangSupport.a /opt/local/libexec/llvm-16/lib/liblldMinGW.a /opt/local/libexec/llvm-16/lib/liblldELF.a /opt/local/libexec/llvm-16/lib/liblldCOFF.a /opt/local/libexec/llvm-16/lib/liblldWasm.a /opt/local/libexec/llvm-16/lib/liblldMachO.a /opt/local/libexec/llvm-16/lib/liblldCommon.a -lLLVMWindowsManifest -lLLVMXRay -lLLVMLibDriver -lLLVMDlltoolDriver -lLLVMCoverage -lLLVMLineEditor -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMX86TargetMCA -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMWebAssemblyDisassembler -lLLVMWebAssemblyAsmParser -lLLVMWebAssemblyCodeGen -lLLVMWebAssemblyDesc -lLLVMWebAssemblyUtils -lLLVMWebAssemblyInfo -lLLVMVEDisassembler -lLLVMVEAsmParser -lLLVMVECodeGen -lLLVMVEDesc -lLLVMVEInfo -lLLVMSystemZDisassembler -lLLVMSystemZAsmParser -lLLVMSystemZCodeGen -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSparcDisassembler -lLLVMSparcAsmParser -lLLVMSparcCodeGen -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMRISCVTargetMCA -lLLVMRISCVDisassembler -lLLVMRISCVAsmParser -lLLVMRISCVCodeGen -lLLVMRISCVDesc -lLLVMRISCVInfo -lLLVMPowerPCDisassembler -lLLVMPowerPCAsmParser -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMMSP430Disassembler -lLLVMMSP430AsmParser -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMipsDisassembler -lLLVMMipsAsmParser -lLLVMMipsCodeGen -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMLoongArchDisassembler -lLLVMLoongArchAsmParser -lLLVMLoongArchCodeGen -lLLVMLoongArchDesc -lLLVMLoongArchInfo -lLLVMLanaiDisassembler -lLLVMLanaiCodeGen -lLLVMLanaiAsmParser -lLLVMLanaiDesc -lLLVMLanaiInfo -lLLVMHexagonDisassembler -lLLVMHexagonCodeGen -lLLVMHexagonAsmParser -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMBPFDisassembler -lLLVMBPFAsmParser -lLLVMBPFCodeGen -lLLVMBPFDesc -lLLVMBPFInfo -lLLVMAVRDisassembler -lLLVMAVRAsmParser -lLLVMAVRCodeGen -lLLVMAVRDesc -lLLVMAVRInfo -lLLVMARMDisassembler -lLLVMARMAsmParser -lLLVMARMCodeGen -lLLVMARMDesc -lLLVMARMUtils -lLLVMARMInfo -lLLVMAMDGPUTargetMCA -lLLVMAMDGPUDisassembler -lLLVMAMDGPUAsmParser -lLLVMAMDGPUCodeGen -lLLVMAMDGPUDesc -lLLVMAMDGPUUtils -lLLVMAMDGPUInfo -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMOrcJIT -lLLVMWindowsDriver -lLLVMMCJIT -lLLVMJITLink -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMDWP -lLLVMDebugInfoLogicalView -lLLVMDebugInfoGSYM -lLLVMOption -lLLVMObjectYAML -lLLVMObjCopy -lLLVMMCA -lLLVMMCDisassembler -lLLVMLTO -lLLVMCFGuard -lLLVMFrontendOpenACC -lLLVMFrontendHLSL -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMFrontendOpenMP -lLLVMDWARFLinkerParallel -lLLVMDWARFLinker -lLLVMGlobalISel -lLLVMMIRParser -lLLVMAsmPrinter -lLLVMSelectionDAG -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMIRPrinter -lLLVMInterfaceStub -lLLVMFileCheck -lLLVMFuzzMutate -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMIRReader -lLLVMAsmParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMFuzzerCLI -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMTargetParser -lLLVMTableGen -lLLVMSupport -lLLVMDemangle -lm -lz -lzstd -lcurses -lxml2 
:info:build ld: warning: ignoring duplicate libraries: '/opt/local/libexec/llvm-16/lib/libclangAST.a', '/opt/local/libexec/llvm-16/lib/libclangASTMatchers.a', '/opt/local/libexec/llvm-16/lib/libclangAnalysis.a', '/opt/local/libexec/llvm-16/lib/libclangParse.a', '/opt/local/libexec/llvm-16/lib/libclangSema.a', '/opt/local/libexec/llvm-16/lib/libclangStaticAnalyzerCheckers.a', '/opt/local/libexec/llvm-16/lib/libclangStaticAnalyzerCore.a', '/opt/local/libexec/llvm-16/lib/libclangStaticAnalyzerFrontend.a'
:info:build duplicate symbol '__mh_execute_header' in:
:info:build     /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/CMakeFiles/zig2.dir/zig2.c.o
:info:build     boundary-file
:info:build ld: 1 duplicate symbols
: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_macports_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_macports_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_macports_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_macports_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 66999 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_macports_release_tarballs_ports_lang_zig/zig/main.log for details.
Last edited 11 months ago by vigna (Sebastiano Vigna) (previous) (diff)

comment:43 Changed 7 months ago by eric-j-ason

Cc: eric-j-ason added

comment:44 Changed 7 months ago by eric-j-ason

Cc: eric-j-ason removed

comment:45 Changed 7 months ago by eric-j-ason

Cc: eric-j-ason added

comment:46 Changed 7 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:47 Changed 7 weeks ago by i0ntempest

Resolution: fixed
Status: reopenedclosed

zig 0.13 now builds on all arm64 macOS.

Note: See TracTickets for help on using tickets.