JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
44.95k stars 5.42k forks source link

error during bootstrap on OS X #1089

Closed staticfloat closed 11 years ago

staticfloat commented 11 years ago

Hey there, updated to 10.8 and I'm doublechecking that OSX 10.8 can still handle Julia's awesomeness. Everything looked good up until the JULIA usr/lib/julia/sys.ji buildstep. At that point, stuff just dies with error during bootstrap.

I ran make debug, and got a slightly more informative error message:

    JULIA usr/lib/julia/sys.ji
Stack dump:
0.      Running pass 'X86 Machine Code Emitter' on function '@anonymous'
/bin/sh: line 1: 71674 Segmentation fault: 11  /private/tmp/homebrew-julia-HEAD-wSGe/usr/bin/julia-debug-readline -b sysimg.jl

Next debugging steps?

timema commented 11 years ago

it has been fine for me for the last 3 weeks

staticfloat commented 11 years ago

Progress! I've discovered that copying Homebrew's fftw libraries into Julia's usr/lib directory before compilation (and specifying USE_SYSTEM_FFTW=1) fixes the error, so it's not that Homebrew's FFTW binaries are wack, it's that Julia is having a hard time finding them for whatever reason. Will update as I narrow down the cause.

staticfloat commented 11 years ago

Alright, I'm closing this issue as I've managed to solve it, finally! I have to symlink in the libfftw libraries into Julia's usr/lib/ location, and I am one of the few people who has this problem because my libraries are not in a standard place, therefore dyld is able to find them for pretty much everyone else.

samueljohn commented 11 years ago

Ah interesting, @staticfloat, that "homebrew not in /usr/local" was the difference, why julia works on my Mac and not on yours. Ok good to know it's solved now.

I somehow wished julia would respect LDFLAGS and CFLAGS, so that all the libs homebrew provides (btw. currently llvm 3.1 with the option to have the --HEAD revision) can be just reused by julia without copying and such :-)

staticfloat commented 11 years ago

It's not an LDFLAGS problem, it's actually a DYLD_LIBRARY_PATH problem, and more specifically, that julia loads the dynamic libraries at runtime and thus has no idea what the LDFLAGS were. On Aug 25, 2012 5:48 PM, "Samuel John" notifications@github.com wrote:

Ah interesting, @staticfloat https://github.com/staticfloat, that "homebrew not in /usr/local" was the difference, why julia works on my Mac and not on yours. Ok good to know it's solved now.

I somehow wished julia would respect LDFLAGS and CFLAGS, so that all the libs homebrew provides (btw. currently llvm 3.1 with the option to have the --HEAD revision) can be just reused by julia without copying and such :-)

— Reply to this email directly or view it on GitHubhttps://github.com/JuliaLang/julia/issues/1089#issuecomment-8028996.