Opened 14 months ago

Closed 7 months ago

#68281 closed defect (fixed)

zig: linker command failed with “duplicate symbols”

Reported by: wyuenho (Jimmy Yuen Ho Wong) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: sonoma arm64 Cc: ahrex, eric-j-ason, mascguy (Christopher Nielsen), Dave-Allured (Dave Allured)
Port: zig

Description

$ sudo port -v install zig
--->  Computing dependencies for zig.
--->  Fetching archive for zig
--->  zig-0.11.0_0.darwin_23.arm64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
--->  Attempting to fetch zig-0.11.0_0.darwin_23.arm64.tbz2 from https://packages.macports.org/zig
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   126    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
--->  Attempting to fetch zig-0.11.0_0.darwin_23.arm64.tbz2 from https://ema.uk.packages.macports.org/zig
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0--->  Attempting to fetch zig-0.11.0_0.darwin_23.arm64.tbz2 from https://mse.uk.packages.macports.org/zig
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   196    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
--->  Building zig
Executing:  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 
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
/opt/local/bin/cmake -S/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 -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/CMakeFiles /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build//CMakeFiles/progress.marks
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/zigcpp.dir/build.make CMakeFiles/zigcpp.dir/depend
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/zig-wasm2c.dir/build.make CMakeFiles/zig-wasm2c.dir/depend
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /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 /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 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/CMakeFiles/zig-wasm2c.dir/DependInfo.cmake --color=
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /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 /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 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/CMakeFiles/zigcpp.dir/DependInfo.cmake --color=
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'
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/zig-wasm2c.dir/build.make CMakeFiles/zig-wasm2c.dir/build
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
make[2]: Nothing to be done for `CMakeFiles/zig-wasm2c.dir/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'
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'
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/zigcpp.dir/build.make CMakeFiles/zigcpp.dir/build
[ 10%] Built target zig-wasm2c
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/zig1.dir/build.make CMakeFiles/zig1.dir/depend
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /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 /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 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build/CMakeFiles/zig1.dir/DependInfo.cmake --color=
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
make[2]: Nothing to be done for `CMakeFiles/zigcpp.dir/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'
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'
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/zig1.dir/build.make CMakeFiles/zig1.dir/build
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
make[2]: Nothing to be done for `CMakeFiles/zig1.dir/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'
[ 47%] Built target zigcpp
[ 68%] Built target zig1
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/zig2.dir/build.make CMakeFiles/zig2.dir/depend
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /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 /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 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/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/DependInfo.cmake --color=
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'
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/zig2.dir/build.make CMakeFiles/zig2.dir/build
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_zig/zig/work/build'
[ 73%] Linking CXX executable zig2
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/zig2.dir/link.txt --verbose=ON
/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 
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'
duplicate symbol '__mh_execute_header' in:
    /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
    boundary-file
ld: 1 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [zig2] Error 1
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'
make[1]: *** [CMakeFiles/zig2.dir/all] Error 2
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'
make: *** [all] Error 2
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'
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 
Exit code: 2
Error: Failed to build zig: command execution failed
Error: 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.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port zig failed

Attachments (1)

main.2.log (1.7 MB) - added by wyuenho (Jimmy Yuen Ho Wong) 14 months ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 14 months ago by reneeotten (Renee Otten)

Summary: zig error: linker command failed with exit code 1zig: linker command failed with “duplicate symbols”

please add the full main.log file mentioned in the error message to this ticket

Changed 14 months ago by wyuenho (Jimmy Yuen Ho Wong)

Attachment: main.2.log added

comment:2 Changed 14 months ago by wyuenho (Jimmy Yuen Ho Wong)

The first main.log was uploaded by mistake. Please ignore it.

comment:3 Changed 13 months ago by ahrex

Cc: ahrex added

comment:4 Changed 13 months ago by ahrex

Looks like upstream fixed it: https://github.com/ziglang/zig/issues/17050

comment:5 Changed 12 months ago by SpikeLightfoot

How can I use the "OTHER_LDFLAGS=-ld_classic" workaround within MacPorts?

comment:6 Changed 11 months ago by eric-j-ason

Cc: eric-j-ason added

comment:7 Changed 9 months ago by sejmann

I doubt this was the proper way to fix it, but I got it to build/install by editing the Portfile and appending the line:

configure.args-append -DCMAKE_INSTALL_RPATH="${prefix}/libexec/llvm-16/lib" -DCMAKE_EXE_LINKER_FLAGS="-ld_classic"

I guess that workaround won't be necessary once the port is updated to zig 0.12.0

Last edited 9 months ago by sejmann (previous) (diff)

comment:8 Changed 7 months ago by mrdomino (Jōshin)

Any reason not to merge that line to the Portfile for now until a new release is cut? Does it break anything?

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

Cc: mascguy added

comment:10 Changed 7 months ago by Christopher Nielsen <mascguy@…>

In 2c4d5b80c765202da0f3f599e08f9937d9b7b7ff/macports-ports (master):

zig: use ld_classic for Xcode 15

See: #68281

comment:11 Changed 7 months ago by wyuenho (Jimmy Yuen Ho Wong)

comment:12 Changed 7 months ago by kencu (Ken)

the root cause of this is having a libc++.dylib with @rpath/libc++.1.dylib being found opportunistically in the llvm library directory.

The libc++ stuff in the clang ports needs to be moved to a subdirectory where it won’t be opportunistically found when linking in the llvm libraries.

comment:13 Changed 7 months ago by kencu (Ken)

same deal as #69725

comment:14 Changed 7 months ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:15 Changed 7 months ago by wyuenho (Jimmy Yuen Ho Wong)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.