Opened 13 years ago
Closed 13 years ago
#33362 closed defect (fixed)
clang-3.1 build fails to find dispatch/dispatch.h on Leopard
Reported by: | yaseppochi (Stephen J. Turnbull) | Owned by: | jeremyhu (Jeremy Huddleston Sequoia) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.99 |
Keywords: | Cc: | jeremyhu (Jeremy Huddleston Sequoia) | |
Port: | clang-3.1 |
Description (last modified by neverpanic (Clemens Lang))
I'd be really sad if the answer "recent clang isn't going to support Leopard".
Mac OS X 10.5.8 port 2.0.99
error like this:
:info:build make[4]: Entering directory `/opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/projects/compiler-rt :info:build COMPILE: clang_darwin/asan_osx/i386: /opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/projects/compiler-rt/lib/asan/asan_interceptors.cc :info:build /opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/Release+Debug+Asserts/bin/clang -no-integrated-as -ccc-install-dir /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ -arch i386 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -Werror -O3 -fomit-frame-pointer -mmacosx-version-min=10.5 -c -fno-exceptions -fPIC -funwind-tables -o /opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/asan_osx/i386/SubDir.lib__asan/asan_interceptors.o /opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/projects/compiler-rt/lib/asan/asan_interceptors.cc :info:build In file included from /opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/projects/compiler-rt/lib/asan/asan_interceptors.cc:19: :info:build /opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/projects/compiler-rt/lib/asan/asan_mac.h:22:10: fatal error: 'dispatch/dispatch.h' file not found :info:build #include <dispatch/dispatch.h> :info:build ^ :info:build 1 error generated. :info:build make[4]: *** [/opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/asan_osx/i386/SubDir.lib__asan/asan_interceptors.o] Error 1 :info:build make[4]: Leaving directory `/opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/projects/compiler-rt' :info:build make[3]: *** [BuildRuntimeLibraries] Error 2 :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/tools/clang/runtime/compiler-rt' :info:build make[2]: *** [compiler-rt/.makeall] Error 2 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/tools/clang/runtime' :info:build make[1]: *** [all] Error 1 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk/tools/clang' :info:build make: *** [all] Error 1 :info:build make: Leaving directory `/opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk' :info:build shell command " cd "/opt/local/var/macports/build/_Users_steve_src_MacPorts_dports_lang_clang-3.1/clang-3.1/work/trunk" && /usr/bin/make -w clang-only VERBOSE=1 " returned error 2
Change History (8)
comment:1 Changed 13 years ago by neverpanic (Clemens Lang)
Description: | modified (diff) |
---|
comment:2 Changed 13 years ago by neverpanic (Clemens Lang)
comment:3 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Owner: | changed from macports-tickets@… to jeremyhu@… |
---|---|
Status: | new → assigned |
This failure is in the compiler runtime. It may be the case that 3.1 will work on Leopard with 3.0's compiler runtime, so I suggest you give that a try... change the compiler-rt fetch to:
system "cd ${worksrcpath}/projects && svn co -r ${compiler_rt_rev} http://llvm.org/svn/llvm-project/compiler-rt/branches/release_30 compiler-rt"
We might also just be able to conditionalize the runtime
comment:4 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Actually, it looks like this was fixed in recent trunk:
http://llvm.org/viewvc/llvm-project?view=rev&revision=151044
I'll bump our revision
comment:5 follow-up: 6 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:6 Changed 13 years ago by yaseppochi (Stephen J. Turnbull)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to jeremyhu@…:
Executive summary: nice try, but this was never a fix, since the relevant upstream change was reverted almost immediately.
All revision numbers below refer to the upstream repository.
The change in r151044 was reverted (apparently without recognizing that it was a regression) in r153182 (by the same person who made the change in r151044 :-/ ). Doing
sudo port clean clang-3.1 sudo port patch clang-3.1 pushd dports/lang/clang-3.1/work/trunk/compiler-rt/lib/asan svn diff -r 153182:153641 asan_mac.cc | sudo patch -p0 popd sudo port -u upgrade clang-3.1
gave me a successful build but I don't have complete confidence that this is a correct compiler. (FWIW, there's only one patch to asan_mac.cc between r153182 and r153754, and this procedure applies that patch.)
I suppose that
sudo port patch clang-3.1 pushd dports/lang/clang-3.1/work/trunk/compiler-rt/lib/asan svn diff -r 153179:153182 | sudo patch -R -p0 popd sudo port -u upgrade clang-3.1
would have had the same effect but I didn't test it.
comment:7 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
I sent an email to Alexey asking for a comment on this.
commit a28aa80ad371d5ab8d7ddd244ad1d695ded29a7e Author: Alexey Samsonov <samsonov@google.com> Date: Wed Mar 21 13:00:04 2012 +0000 [asan]: substitute extern decls with system header in asan_mac.cc git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153182 91177308-0d34-0410-b5e6-96231b3b80d8 ... commit ebdbf7bbbbfdd881703a0d0d69f8ce2461a3d1c1 Author: Alexey Samsonov <samsonov@google.com> Date: Tue Feb 21 08:30:57 2012 +0000 AddressSanitizer: Don't include GrandCentralDispatch headers in asan headers on Mac git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151044 91177308-0d34-0410-b5e6-96231b3b80d8
comment:8 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
r91724, and I'll try to get it fixed in mainline.
dispatch.h
is obviously part of grand central dispatch, available since Snow Leopard. However, since clang can be compiled fine on Linux, where GCD isn't available, it probably is possible to deactivate that on Leopard, too. From what I saw there is no configure switch to do this, however.