Opened 6 years ago
Closed 6 years ago
#57694 closed defect (fixed)
clang-6.0: build fails in compiler_rt on < SnowLeopard due to fatal error: 'dispatch/dispatch.h' file not found
Reported by: | kencu (Ken) | Owned by: | jeremyhu (Jeremy Huddleston Sequoia) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | tiger leopard | Cc: | |
Port: | clang-6.0 |
Description
libdispatch is available on SnowLeopard and newer:
:info:build [ 12%] Building C object projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins_x86_64_10.4.dir/os_version_check.c.o :info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-6.0/clang-6.0/work/build/projects/compiler-rt/lib/builtins && /opt/local/bin/clang-mp-3.7 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-6.0/clang-6.0/work/build/projects/compiler-rt/lib/builtins -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-6.0/clang-6.0/work/llvm-6.0.1.src/projects/compiler-rt/lib/builtins -I/opt/local/include/libxml2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-6.0/clang-6.0/work/build/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-6.0/clang-6.0/work/llvm-6.0.1.src/include -DNDEBUG -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -arch x86_64 -o CMakeFiles/clang_rt.builtins_x86_64_10.4.dir/os_version_check.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-6.0/clang-6.0/work/llvm-6.0.1.src/projects/compiler-rt/lib/builtins/os_version_check.c :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-6.0/clang-6.0/work/llvm-6.0.1.src/projects/compiler-rt/lib/builtins/os_version_check.c:19:10: fatal error: 'dispatch/dispatch.h' file not found :info:build #include <dispatch/dispatch.h> :info:build ^ :info:build 1 error generated.
Attachments (2)
Change History (6)
Changed 6 years ago by kencu (Ken)
Attachment: | clang-6-fail-leopard-no-dispatch.log added |
---|
comment:1 Changed 6 years ago by kencu (Ken)
Keywords: | tiger leopard added |
---|
comment:2 Changed 6 years ago by kencu (Ken)
comment:3 Changed 6 years ago by kencu (Ken)
I'll put up the patched version of compiler-rt/lib/builtins/os_version_check.c
with a small test program attached to it to drive it.
It works for me on 10.4 and up, building it with:
clang -Wall -framework CoreFoundatation -o test_osversion ken_os_version_check_clang-6.c
or
gcc -Wall -framework CoreFoundatation -o test_osversion ken_os_version_check_clang-6.c
Interestingly, if you don't link in CoreFoundation the code does not error, but does not actually run the test or do anything either. Should probably return "-1" or something in that case, but have to ask the compiler_rt guys about that I guess :>
Changed 6 years ago by kencu (Ken)
Attachment: | ken_os_version_check_clang-6.c added |
---|
my patched version of os_version_check.c with a small test prog added on the bottom
comment:4 Changed 6 years ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
See <https://github.com/macports/macports-ports/pull/3088>