Discussion:
[MacPorts] #57694: clang-6.0: build fails in compiler_rt on < SnowLeopard due to fatal error: 'dispatch/dispatch.h' file not found
MacPorts
2018-11-28 07:15:59 UTC
Permalink
#57694: clang-6.0: build fails in compiler_rt on < SnowLeopard due to fatal error:
'dispatch/dispatch.h' file not found
--------------------+-----------------------
Reporter: kencu | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: clang-6.0
--------------------+-----------------------
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.
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57694>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-28 07:16:27 UTC
Permalink
#57694: clang-6.0: build fails in compiler_rt on < SnowLeopard due to fatal error:
'dispatch/dispatch.h' file not found
------------------------+----------------------
Reporter: kencu | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: clang-6.0 |
------------------------+----------------------
Changes (by kencu):

* Attachment "clang-6-fail-leopard-no-dispatch.log" added.
--
Ticket URL: <https://trac.macports.org/ticket/57694>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-28 07:16:51 UTC
Permalink
#57694: clang-6.0: build fails in compiler_rt on < SnowLeopard due to fatal error:
'dispatch/dispatch.h' file not found
------------------------+---------------------------
Reporter: kencu | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: tiger leopard
Port: clang-6.0 |
------------------------+---------------------------
Changes (by kencu):

* keywords: => tiger leopard
--
Ticket URL: <https://trac.macports.org/ticket/57694#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-28 14:38:59 UTC
Permalink
#57694: clang-6.0: build fails in compiler_rt on < SnowLeopard due to fatal error:
'dispatch/dispatch.h' file not found
------------------------+---------------------------
Reporter: kencu | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: tiger leopard
Port: clang-6.0 |
------------------------+---------------------------

Comment (by kencu):

See <https://github.com/macports/macports-ports/pull/3088>
--
Ticket URL: <https://trac.macports.org/ticket/57694#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-29 03:05:20 UTC
Permalink
#57694: clang-6.0: build fails in compiler_rt on < SnowLeopard due to fatal error:
'dispatch/dispatch.h' file not found
------------------------+---------------------------
Reporter: kencu | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: tiger leopard
Port: clang-6.0 |
------------------------+---------------------------

Comment (by kencu):

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 :>
--
Ticket URL: <https://trac.macports.org/ticket/57694#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-29 03:06:24 UTC
Permalink
#57694: clang-6.0: build fails in compiler_rt on < SnowLeopard due to fatal error:
'dispatch/dispatch.h' file not found
------------------------+---------------------------
Reporter: kencu | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: tiger leopard
Port: clang-6.0 |
------------------------+---------------------------
Changes (by kencu):

* 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
--
Ticket URL: <https://trac.macports.org/ticket/57694>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-06 07:16:10 UTC
Permalink
#57694: clang-6.0: build fails in compiler_rt on < SnowLeopard due to fatal error:
'dispatch/dispatch.h' file not found
------------------------+---------------------------
Reporter: kencu | Owner: jeremyhu
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: fixed | Keywords: tiger leopard
Port: clang-6.0 |
------------------------+---------------------------
Changes (by kencu):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"c35b1701f54cb5a048f8821641d8ecdf524bf989/macports-ports"
c35b1701f54cb5a048f8821641d8ecdf524bf989/macports-ports] (master):
{{{
#!ConfigurableCommitTicketReference repository="macports-ports"
revision="c35b1701f54cb5a048f8821641d8ecdf524bf989"
clang-6.0: fix build on leopard Intel

work around compiler_rt build error due to
no libdispatch on Leopard

disables santizer_common which presently doesn't build on Leopard

add fallback to clang-3.7 and clang-3.9

closes: https://trac.macports.org/ticket/55444
closes: https://trac.macports.org/ticket/57694
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57694#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...