staticfloat / homebrew-julia

small repository to install julia
221 stars 35 forks source link

Julia buid error on OS X 10.8.4 #33

Closed argoneus closed 11 years ago

argoneus commented 11 years ago

I'm building using brew install --HEAD --64-bit -v julia

Here's the error output:

fatal: No names found, cannot describe anything.
Warning: git failed in version.jl
  failed process: Process(it describe --tags --dirty --long --abbrev=10ProcessExited(128)) [128]
constants.jl
LoadError("sysimg.jl",204,LoadError("constants.jl",52,ErrorException("error compiling big: error compiling convert: error compiling BigFloat: could not load module libmpfr: dlopen(libmpfr.dylib, 1):
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. *** 
    JULIA usr/lib/julia/sys.ji
version.jl
fatal: No names found, cannot describe anything.
Warning: git failed in version.jl
  failed process: Process(it describe --tags --dirty --long --abbrev=10ProcessExited(128)) [128]
constants.jl
LoadError("sysimg.jl",204,LoadError("constants.jl",52,ErrorException("error compiling big: error compiling convert: error compiling BigFloat: could not load module libmpfr: dlopen(libmpfr.dylib, 1):
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. *** 
cp -a /private/tmp/julia-sCKF/usr/bin /usr/local/homebrew/Cellar/julia/HEAD
cd /usr/local/homebrew/Cellar/julia/HEAD/bin && ln -sf julia-release-readline julia
for suffix in julia-release julia-debug ; do \
                cp -a /private/tmp/julia-sCKF/usr/lib/lib${suffix}*.dylib* /usr/local/homebrew/Cellar/julia/HEAD/lib/julia ; \ 
        done
for suffix in amd arpack camd ccolamd cholmod colamd fftw3 fftw3f fftw3_threads fftw3f_threads gmp grisu openlibm openlibm-extras pcre random Rmath spqr suitesparse_wrapper umfpack z openblas mpfr ;
                cp -a /private/tmp/julia-sCKF/usr/lib/lib${suffix}*.dylib* /usr/local/homebrew/Cellar/julia/HEAD/lib/julia ; \ 
        done
cp: /private/tmp/julia-sCKF/usr/lib/libarpack*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libcamd*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libccolamd*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libfftw3*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libfftw3f*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libfftw3_threads*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libfftw3f_threads*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libgmp*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libpcre*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libz*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libopenblas*.dylib*: No such file or directory
cp: /private/tmp/julia-sCKF/usr/lib/libmpfr*.dylib*: No such file or directory
make: [install] Error 1 (ignored)
cp -a /private/tmp/julia-sCKF/usr/lib/libuv.a /usr/local/homebrew/Cellar/julia/HEAD/lib/julia
cp -a /private/tmp/julia-sCKF/usr/include/uv* /usr/local/homebrew/Cellar/julia/HEAD/include/julia
cp -a src/julia.h src/support/*.h /usr/local/homebrew/Cellar/julia/HEAD/include/julia
# Copy system image
cp /private/tmp/julia-sCKF/usr/lib/julia/sys.ji /usr/local/homebrew/Cellar/julia/HEAD/lib/julia
cp: /private/tmp/julia-sCKF/usr/lib/julia/sys.ji: No such file or directory
make: *** [install] Error 1
staticfloat commented 11 years ago

Can you post the output of brew doctor and brew --config please? This works fine for me with the latest everything. Can you also post the output of the following: (I've included my own output with the commands for comparison)

$ ls -la $(brew --prefix)/lib/libmpfr*
lrwxr-xr-x  1 sabae  admin  40 May 18 22:35 /usr/local/lib/libmpfr.4.dylib -> ../Cellar/mpfr/3.1.2/lib/libmpfr.4.dylib
lrwxr-xr-x  1 sabae  admin  34 May 18 22:35 /usr/local/lib/libmpfr.a -> ../Cellar/mpfr/3.1.2/lib/libmpfr.a
lrwxr-xr-x  1 sabae  admin  38 May 18 22:35 /usr/local/lib/libmpfr.dylib -> ../Cellar/mpfr/3.1.2/lib/libmpfr.dylib
$ brew info mpfr
mpfr: stable 3.1.2 (bottled)
http://www.mpfr.org/
/usr/local/Cellar/mpfr/3.1.2 (23 files, 3.3M) *
  Built from source
From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/mpfr.rb
==> Dependencies
Required: gmp
==> Options
--32-bit
        Build 32-bit only
argoneus commented 11 years ago
$ brew doctor

Warning: Your Homebrew is not installed to /usr/local
You can install Homebrew anywhere you want, but some brews may only build
correctly if you install in /usr/local. Sorry!

$ brew --config

HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: d5aa01fc985ec02d4aabcd2b702ad9159339f8c2
HOMEBREW_PREFIX: /usr/local/homebrew
HOMEBREW_CELLAR: /usr/local/homebrew/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.8.4-x86_64
Xcode: 4.6.3
CLT: 4.6.0.0.1.1358221012
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

This is strange, as my CPU is dual core, not quad core.

$  ls -la $(brew --prefix)/lib/libmpfr*
lrwxr-xr-x  1 tusr  staff  40 May 31 08:53 /usr/local/homebrew/lib/libmpfr.4.dylib@ -> ../Cellar/mpfr/3.1.2/lib/libmpfr.4.dylib
lrwxr-xr-x  1 tusr  staff  34 May 31 08:53 /usr/local/homebrew/lib/libmpfr.a@ -> ../Cellar/mpfr/3.1.2/lib/libmpfr.a
lrwxr-xr-x  1 tusr  staff  38 May 31 08:53 /usr/local/homebrew/lib/libmpfr.dylib@ -> ../Cellar/mpfr/3.1.2/lib/libmpfr.dylib

$ brew info mpfr
mpfr: stable 3.1.2 (bottled)
http://www.mpfr.org/
/usr/local/homebrew/Cellar/mpfr/3.1.1-p2 (23 files, 3.2M)
  Built from source
/usr/local/homebrew/Cellar/mpfr/3.1.2 (23 files, 3.3M) *
  Built from source
From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/mpfr.rb
==> Dependencies
Required: gmp
==> Options
--32-bit
        Build 32-bit only
staticfloat commented 11 years ago

I have pushed a (possible) fix. Please brew update and try again, and upload any logs if it still fails.

argoneus commented 11 years ago

Here's the error output with the latest update:

LoadError("sysimg.jl",204,LoadError("constants.jl",52,ErrorException("error compiling big: error compiling BigInt: error compiling BigInt: could not load module libgmp: dlopen(libgmp.dylib, 1): imag
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. ***
==> make install PREFIX=/usr/local/homebrew/Cellar/julia/HEAD USE_BLAS64=0 FC=/usr/local/homebrew/bin/gfortran USECLANG=1 LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAM
make install PREFIX=/usr/local/homebrew/Cellar/julia/HEAD USE_BLAS64=0 FC=/usr/local/homebrew/bin/gfortran USECLANG=1 LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=li
    CC src/jltypes.do
    CC src/gf.do
    CC src/ast.do
    CC src/builtins.do
    CC src/module.do
    CC src/codegen.do
    CC src/interpreter.do
    CC src/alloc.do
    CC src/dlload.do
    CC src/sys.do
    CC src/init.do
    CC src/task.do
    CC src/array.do
    CC src/dump.do
    CC src/toplevel.do
    CC src/jl_uv.do
    CC src/jlapi.do
    CC src/gc.do
    LINK usr/lib/libjulia-debug.dylib
    CC ui/repl.do
    CC ui/repl-basic.do
    CC ui/repl-readline.do
    LINK usr/bin/julia-debug-basic
    LINK usr/bin/julia-debug-readline
    JULIA usr/lib/julia/sys.ji
serialize.jl
/bin/sh: line 1: 95557 Segmentation fault: 11  /private/tmp/julia-W8oy/usr/bin/julia-debug-readline -bf sysimg.jl
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. ***
JULIA usr/lib/julia/sys.ji
constants.jl
LoadError("sysimg.jl",204,LoadError("constants.jl",52,ErrorException("error compiling big: error compiling convert: error compiling BigFloat: could not load module libmpfr: dlopen(libmpfr.dylib, 1):
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. ***
cp -a /private/tmp/julia-W8oy/usr/bin /usr/local/homebrew/Cellar/julia/HEAD
cd /usr/local/homebrew/Cellar/julia/HEAD/bin && ln -sf julia-release-readline julia
for suffix in julia-release julia-debug ; do \
                cp -a /private/tmp/julia-W8oy/usr/lib/lib${suffix}*.dylib* /usr/local/homebrew/Cellar/julia/HEAD/lib/julia ; \
        done
for suffix in amd arpack camd ccolamd cholmod colamd fftw3 fftw3f fftw3_threads fftw3f_threads gmp grisu openlibm openlibm-extras pcre random Rmath spqr suitesparse_wrapper umfpack z openblas mpfr ;
                cp -a /private/tmp/julia-W8oy/usr/lib/lib${suffix}*.dylib* /usr/local/homebrew/Cellar/julia/HEAD/lib/julia ; \
        done
cp: /private/tmp/julia-W8oy/usr/lib/libarpack*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libcamd*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libccolamd*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libfftw3*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libfftw3f*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libfftw3_threads*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libfftw3f_threads*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libgmp*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libpcre*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libz*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libopenblas*.dylib*: No such file or directory
cp: /private/tmp/julia-W8oy/usr/lib/libmpfr*.dylib*: No such file or directory
make: [install] Error 1 (ignored)
cp -a /private/tmp/julia-W8oy/usr/lib/libuv.a /usr/local/homebrew/Cellar/julia/HEAD/lib/julia
cp -a /private/tmp/julia-W8oy/usr/include/uv* /usr/local/homebrew/Cellar/julia/HEAD/include/julia
cp -a src/julia.h src/support/*.h /usr/local/homebrew/Cellar/julia/HEAD/include/julia
# Copy system image
cp /private/tmp/julia-W8oy/usr/lib/julia/sys.ji /usr/local/homebrew/Cellar/julia/HEAD/lib/julia
cp: /private/tmp/julia-W8oy/usr/lib/julia/sys.ji: No such file or directory
make: *** [install] Error 1
staticfloat commented 11 years ago

Aha, you need gmp as well. A new fix has been pushed, Rinse, lather, repeat.

argoneus commented 11 years ago

That did it! Thanks!

staticfloat commented 11 years ago

Glad we got it working!