Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libosxunwind to v0.0.4 #30153

Merged
merged 1 commit into from
Nov 29, 2018
Merged

Update libosxunwind to v0.0.4 #30153

merged 1 commit into from
Nov 29, 2018

Conversation

ararslan
Copy link
Member

Fixes #29912.

@ararslan ararslan added domain:building Build system, or building Julia or its dependencies system:mac Affects only macOS external dependencies Involves LLVM, OpenBLAS, or other linked libraries labels Nov 25, 2018
@ararslan
Copy link
Member Author

It sure would be nice to have working macOS CI for this.

@iamed2
Copy link
Contributor

iamed2 commented Nov 26, 2018

Is there an open issue for the macOS CI or is this a new problem?

@ararslan
Copy link
Member Author

It's relatively new, not introduced here, but I don't think there's an open issue for it. Not sure what the issue actually is. Looking at the raw Travis log, the build and all tests actually completed successfully.

@ararslan
Copy link
Member Author

Looks like macOS CI is working again, and tests here are passing on it.

@StefanKarpinski
Copy link
Sponsor Member

Cool, any reason not to merge?

@ararslan
Copy link
Member Author

Not as far as I'm concerned, just figured having another set of eyes on it before we bump a dependency version would be worthwhile. The changes in this most recent tag of libosxunwind are incredibly minimal though.

@staticfloat staticfloat merged commit 5221fed into master Nov 29, 2018
@StefanKarpinski StefanKarpinski deleted the aa/update-libosxunwind branch November 29, 2018 20:23
@StefanKarpinski
Copy link
Sponsor Member

This is causing build problems on macOS, specifically:

make[2]: Circular src/libuwind.cxx <- src/libuwind.cxx.o dependency dropped.
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command
      line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
src/libuwind.cxx:28:10: fatal error: 'new' file not found
#include <new>
         ^~~~~
1 warning and 1 error generated.
make[2]: *** [src/libuwind.cxx.o] Error 1
make[1]: *** [scratch/libosxunwind-0.0.4/build-compiled] Error 2
make: *** [julia-deps] Error 2

@staticfloat
Copy link
Sponsor Member

What version of MacOS and what version of Xcode do you have installed?

@StefanKarpinski
Copy link
Sponsor Member

10.14.1 and I have updated all the things.

@staticfloat
Copy link
Sponsor Member

Okay the problem here is that the Julia build system is shoe-horning -std=libc++ into CC, which fights with libosxunwind and ends up with compiler invocations like:

clang++ -std=libc++ -mmacosx-version-min=10.8 -m64 -I/Users/sabae/src/julia-master/deps/scratch/libosxunwind-0.0.4/src -I/Users/sabae/src/julia-master/deps/scratch/libosxunwind-0.0.4/include -DNDEBUG  -std=c++11 -stdlib=libstdc++ -Wall -O3 -ggdb3 -O0 -c src/libuwind.cxx -o src/libuwind.cxx.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]

Note the cavalcade of problems here: two (incompatible) standard libraries being requested, an incorrect clang error message (-std=libc++ is an error, you need to use -stdlib=libc++) and a build system that coldly enforces its will upon lesser projects.

The reason that CI didn't catch this is that Julia only enforces this on OSX 10.13+. The reason that Alex and I didn't catch this is that we built libosxunwind in isolation, which doesn't have the CC/CXX bludgeoning that Julia does. So you really needed to build this inside of Julia, on a recent mac to see the problem.

I think the proper way to fix this is to patch libosxunwind to not try adding those flags by itself if those flags are already present within the variables it has inherited from upstream. I'll create a patch to do this. For now let's revert this PR, then move to the newer release in a future PR.

@staticfloat
Copy link
Sponsor Member

PR to fix this in libosxunwind is here: JuliaLang/libosxunwind#14

staticfloat added a commit that referenced this pull request Nov 30, 2018
This reverts commit 5221fed.  A bad
interaction between libosxunwind's Makefiles and Julia's makefiles broke
this for newer macs, see #30153
for more details.
staticfloat added a commit that referenced this pull request Nov 30, 2018
This reverts commit 5221fed.  A bad
interaction between libosxunwind's Makefiles and Julia's makefiles broke
this for newer macs, see #30153
for more details.
@wsshin
Copy link
Contributor

wsshin commented Jan 4, 2019

I ran into this problem while building Julia 0.7 on a new Mac as @staticfloat pointed out. Couldn't figure out how to solve it (because I had no problem building 0.7 on my previous Mac). After reading this thread I tried building master and it succeeded.

Is it possible to backport this fix to 0.7? I still prefer using 0.7 to get deprecation warnings.

@ViralBShah
Copy link
Member

As of now, there are no new 0.7 releases planed.

@ararslan
Copy link
Member Author

ararslan commented Jan 4, 2019

You should be able to use the official 0.7 binaries for Mac available at https://julialang.org/downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:building Build system, or building Julia or its dependencies external dependencies Involves LLVM, OpenBLAS, or other linked libraries system:mac Affects only macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants