Opened 2 months ago
Last modified 5 weeks ago
#70867 reopened defect
clang-17: Undefined symbols: __availability_version_check
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | mohd-akram (Mohamed Akram) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.1 |
Keywords: | highsierra, elcapitan, yosemite, mavericks, mountainlion, lion, snowleopard | Cc: | cjones051073 (Chris Jones) |
Port: | odin, clang-17, clang-18 |
Description
Executing: cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_odin/odin/work/odin-2024-09" && /usr/bin/make -j4 release DEBUG: system: cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_odin/odin/work/odin-2024-09" && /usr/bin/make -j4 release ./build_odin.sh release + /opt/local/bin/clang++-mp-17 src/main.cpp src/libtommath.cpp -Wno-switch -Wno-macro-redefined -Wno-unused-value -I/opt/local/include '-DODIN_VERSION_RAW="dev-2024-09"' -Os -stdlib=libc++ -std=c++14 -I/opt/local/libexec/llvm-18/include -std=c++17 -stdlib=libc++ -fno-exceptions -funwind-tables -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -L/opt/local/libexec/llvm-18/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -O3 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/libexec/llvm-18/lib -pthread -lm -lstdc++ -liconv -ldl -framework System -lLLVM -o odin Undefined symbols for architecture x86_64: "__availability_version_check", referenced from: ___isPlatformVersionAtLeast in libclang_rt.osx.a(os_version_check.c.o) __initializeAvailabilityCheck in libclang_rt.osx.a(os_version_check.c.o) ld: symbol(s) not found for architecture x86_64 clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [release] Error 1 Command failed: cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_odin/odin/work/odin-2024-09" && /usr/bin/make -j4 release Exit code: 2
Is this a bug in clang-17 and/or clang-18 or in the way that odin is using them?
Change History (14)
comment:1 Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)
Summary: | odin @0.2.24.09: Undefined symbols: __availability_version_check → clang-17: Undefined symbols: __availability_version_check |
---|
comment:2 Changed 5 weeks ago by kencu (Ken)
presumably caused by this change:
https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20230508/1156754.html
and see #68522
comment:3 Changed 5 weeks ago by kencu (Ken)
Keywords: | highsierra elcapitan yosemite mavericks mountainlion lion snowleopard added |
---|
comment:4 Changed 5 weeks ago by cjones051073 (Chris Jones)
See [2bbc71aa6f3fb4f66d9252d32fdc6feb74137833/macports-ports]
I have upped the minimum darwin version for clang17 and newer to darwin12
comment:5 Changed 5 weeks ago by cjones051073 (Chris Jones)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
python312 now builds fine in OSX10.7
comment:6 follow-up: 9 Changed 5 weeks ago by kencu (Ken)
this issue with clang-17 and newer affects up to high sierra, though…so more to go
comment:7 Changed 5 weeks ago by kencu (Ken)
or a simple patch to revert that change could be done by someone
comment:8 Changed 5 weeks ago by cjones051073 (Chris Jones)
the build errors with python312 only affected 10.7 AFAIK.
I won't be providing any patches to fix these old OSes myself, just to be clear.
comment:9 Changed 5 weeks ago by cjones051073 (Chris Jones)
Replying to kencu:
this issue with clang-17 and newer affects up to high sierra, though…so more to go
Anyone who wishes to can tweak the compiler settings themselves so please feel free to make whatever fixes you think are required. I won't be doing it myself this time.
comment:10 Changed 5 weeks ago by kencu (Ken)
but the build error with odin here is up to high sierra
comment:12 Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
python312 used clang-17 on Mac OS X 10.7 because it sets compiler.c_standard 2011
. On Mac OS X 10.6 it used MacPorts clang 11 and built fine. On Mac OS X 10.8 and later it used Xcode clang and built fine.
odin uses MacPorts clang 17 up to a newer OS version because it setscompiler.cxx_standard 2017
.
I initially thought the problem might be specific to odin because it also separately depends on llvm-18. But the build failure of python312 suggests the clang-17 port is simply broken, possibly on all OS versions; I have not tested it further. Changing the compiler selection logic to exclude clang-17 on affected systems doesn't sound like the solution. Fixing the compiler so it works on an affected systems seems like what is needed.
comment:13 Changed 5 weeks ago by cjones051073 (Chris Jones)
macports-clang-17 is not broken all OSes. it works just fine on macOS15(arm64) at least, I was able to build python312 and odin just fine there using it. whatever the issue is here, if it is an issue with the compiler its limited to older OSes.
I have no ability to do any testing on other platforms than the above, so won't be investigating this one myself.
comment:14 Changed 5 weeks ago by kencu (Ken)
I thought I'd pretty clearly indicated what the problem was and which systems were affected above, but ignore that if you choose, of course. (We've known about this problem with clang-17 on older systems for at least a year now).
I'll leave the trivial patch to someone who has the systems going and will test it.
Has duplicate #71075.
This now causes python312 to be unbuildable on Mac OS X 10.7 which in turn causes lots of things to be unbuildable because that's our default version of python.