staticfloat / homebrew-julia

small repository to install julia
221 stars 35 forks source link

Failure to build --HEAD due to 'Error 139' at precompilation stage #214

Closed cyberbryce closed 8 years ago

cyberbryce commented 8 years ago

(Apologies in advance if, in the course of sitting down to submit this issue several times over a few months and searching for the error code--then getting side-tracked and failing to follow through--I missed an obvious explanation for my recent build failures with Homebrew on the development branch of Julia.)

I've gotten the same 'Error 139' -- which were reported as issues #1 and #43, both of which were essentially unresolved, three or more years ago -- when trying to install the the development version via this tap roughly since April on various recent release and beta versions of both El Capitan or Sierra, on several different Macs of various vintages. I've attempted both clean installs and those with only Homebrew's version of 'cmake' present, always with a clean bill of health for brewing. Sometimes the build fails with a random osxunwind error, but when I get past that, the message and error for the furthest-along build for 'brew install julia --HEAD" is typically a bus error or segmentation fault at precompilation, something like this:

$ tail -45 /Users/cyberbryce/Library/Logs/Homebrew/julia/02.make
 cd /private/tmp/julia-20160713-6389-1vx090n/base && /private/tmp/julia-20160713-6389-1vx090n/usr/bin/julia -C native --output-ji /private/tmp/julia-20160713-6389-1vx090n/usr/lib/julia/inference.ji --startup-file=no coreimg.jl
/bin/sh: line 1: 33373 Segmentation fault: 11  /private/tmp/julia-20160713-6389-1vx090n/usr/bin/julia -C native --output-ji /private/tmp/julia-20160713-6389-1vx090n/usr/lib/julia/inference.ji --startup-file=no coreimg.jl
make[1]: *** [/private/tmp/julia-20160713-6389-1vx090n/usr/lib/julia/inference.ji] Error 139
make: *** [julia-inference] Error 2

HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: ed9bb449d1bfc837d46b2572e9ffc2a70b32f9de
Last commit: 15 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 31fc62217c8d1af993a109e4b60e08f145eb00d8
Core tap last commit: 66 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit sandybridge
Homebrew Ruby: 2.0.0-p648
Clang: 7.3 build 703
Git: 2.7.4 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: N/A
OS X: 10.11.6-x86_64
Xcode: 7.3.1
CLT: 7.3.1.0.1.1461711523
X11: 2.7.9 => /opt/X11

CC: /usr/bin/clang
CXX: /usr/bin/clang++
OBJC: /usr/bin/clang
OBJCXX: /usr/bin/clang++
CFLAGS: -Os -w -pipe -march=native -mmacosx-version-min=10.11
CXXFLAGS: -Os -w -pipe -march=native -mmacosx-version-min=10.11
CPPFLAGS: -I/usr/local/opt/suite-sparse-julia/include -I/usr/local/opt/openblas-julia/include -I/usr/local/opt/openssl/include -F/usr/local/Frameworks
LDFLAGS: -L/usr/local/opt/suite-sparse-julia/lib -L/usr/local/opt/arpack-julia/lib -L/usr/local/opt/openblas-julia/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/llvm37-julia/lib -L/usr/local/opt/libffi/lib -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names -headerpad_max_install_names
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local/opt/suite-sparse-julia:/usr/local/opt/arpack-julia:/usr/local/opt/openblas-julia:/usr/local/opt/openssl:/usr/local/opt/llvm37-julia:/usr/local/opt/libffi
CMAKE_FRAMEWORK_PATH: /usr/local/Frameworks
MACOSX_DEPLOYMENT_TARGET: 10.11
PKG_CONFIG_PATH: /usr/local/opt/arpack-julia/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/local/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.11:/usr/lib/pkgconfig
PATH: /usr/local/opt/openssl/bin:/usr/local/opt/llvm37-julia/bin:/usr/local/bin:/usr/local/sbin:/Applications/vsfm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/usr/local/Library/Taps/caskroom/homebrew-cask/cmd:/usr/local/Library/ENV/scm
CPATH: /usr/local/include

I am presently able to compile the development branch instead (after installing cmake) by following the instructions on the Julia homepage, with just the extra inconvenience of manually linking the binaries and cleaning up, so (a) this should not be seen as an emergency (perhaps especially seeing as nobody else has submitted an issue over this time-frame) and (b) it appears to be something about the build instructions in the tap that suddenly became problematic in the last several months. Most of the tests pass most of the time.

Thanks in advance for any clues.

staticfloat commented 8 years ago

Hmmmm, this is troubling. I also have had problems installing Julia master on Homebrew for a while, but I figured I'd let them shake out any problems and worry about it once we hit RC. Of course, we just v0.5.0-rc1, so I took another look and yes, I get the same thing. I don't have any good leads right now on why however.

tkoolen commented 8 years ago

This appears to still be a problem.

staticfloat commented 8 years ago

This should be fixed now! Please brew update and try again!

cyberbryce commented 8 years ago

Great, with a clean install of the dependencies this seems to have restored brew install julia --HEAD as an approach to getting master on my machines, so I'll optimistically close the issue. Thanks for this!