JuliaLang / julia

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

fresh install dies on mac OS 10.7: "make: *** [release] Error 2" related to gmp #3010

Closed timema closed 11 years ago

timema commented 11 years ago

I tried to do a git pull origin master then make clean && make a couple hours ago and it killed over on me (Mac OS 10.7). I decided to do a clean install so I got rid of my julia folder and did a fresh git clone and make. It died on me so I tried the same thing again and got the same results. It looks like it has something to do with dyld: Library not loaded: @rpath/libgmp.dylib. I have been keeping up with the master most days and it has worked fine until now.

Here are the last lines:

dyld: Library not loaded: @rpath/libgmp.dylib
  Referenced from: /Users/madmax/julia/deps/mpfr-3.1.2/tests/.libs/tversion
  Reason: image not found
/bin/sh: line 1: 44344 Trace/BPT trap: 5       MPFR_QUIET=1 ${dir}$tst
FAIL: tversion
=======================
161 of 161 tests failed
=======================
make[5]: *** [check-TESTS] Error 1
make[4]: *** [check-am] Error 2
make[3]: *** [check-recursive] Error 1
make[2]: *** [mpfr-3.1.2/checked] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

farther up the output I found:

checking if gmp.h version and libgmp version are the same... no
configure: WARNING: ==========================================================
configure: WARNING: 'gmp.h' and 'libgmp' seem to have different versions or
configure: WARNING: we cannot run a program linked with GMP (if you cannot
configure: WARNING: see the version numbers above). A cause may be different
configure: WARNING: GMP versions with different ABI's or the use of --with-gmp
configure: WARNING: or --with-gmp-include with a system include directory
configure: WARNING: (such as /usr/include or /usr/local/include).
configure: WARNING: However since we can't use 'libtool' inside the configure,
configure: WARNING: we can't be sure. See 'config.log' for details.
configure: WARNING: ==========================================================

[pao: formatting]

johnmyleswhite commented 11 years ago

The build is dead on Mac 10.8 as well.

milktrader commented 11 years ago

Same thing on my Mac 10.8. It must be recent. I just got it to build on commit 3749d7ca59464751a9e0494d02aff8bc12521bc1 fix a type intersection bug, closes #2997, which is only a couple days old.

JeffBezanson commented 11 years ago

This is definitely caused by the mpfr merge. Mpfr also depends on libgmp. Maybe there are some more configure options we can pass to it? The problem is that it should use the gmp we build, but that library is not in the standard path, and its test programs won't have an rpath set of course. On May 3, 2013 9:37 PM, "milktrader" notifications@github.com wrote:

Same thing on my Mac 10.8. It must be recent. I just got it to build on commit 3749d7chttps://github.com/JuliaLang/julia/commit/3749d7ca59464751a9e0494d02aff8bc12521bc1fix a type intersection bug, closes

2997 https://github.com/JuliaLang/julia/issues/2997, which is only a

couple days old.

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

ViralBShah commented 11 years ago

Seems like 167f125b29d052e754741a6809701e9f191dda2d has fixed it. The build worked for me. d44408cb46cd8a5ff201743a10b45f19568468ba also moves the mpfr build to stage 2.

Ideally, the MPFR build should also depend on GMP being built.

johnmyleswhite commented 11 years ago

The build is still completely broken for me.

It starts going wrong here:

Making check in doc
Making check in src
Making check in tests
dyld: Library not loaded: @rpath/libgmp.dylib
  Referenced from: /Users/johnmyleswhite/julia/deps/mpfr-3.1.2/tests/.libs/tversion

and crashes here:

dyld: Library not loaded: @rpath/libgmp.dylib
  Referenced from: /Users/johnmyleswhite/julia/deps/mpfr-3.1.2/tests/.libs/tversion
  Reason: image not found
/bin/sh: line 1: 53318 Trace/BPT trap: 5       MPFR_QUIET=1 ${dir}$tst
FAIL: tversion
=======================
161 of 161 tests failed
=======================
make[5]: *** [check-TESTS] Error 1
make[4]: *** [check-am] Error 2
make[3]: *** [check-recursive] Error 1
make[2]: *** [mpfr-3.1.2/checked] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2
ViralBShah commented 11 years ago

Could you clean gmp and mpfr and try again?

johnmyleswhite commented 11 years ago

Cleaning just gmp and mpfr didn't do it. Doing a complete clean now.

johnmyleswhite commented 11 years ago

Still fails after a clean rebuild of everything in deps.

ViralBShah commented 11 years ago

Are you doing a parallel make by any chance?

johnmyleswhite commented 11 years ago

No, unless the default make is parallel without my knowledge.

timema commented 11 years ago

Still failed after complete clean rebuild but this time I got a different error. In the previous instances I did not do a parallel build but I did this time. Below is the error:

WARNING: If you plan to use the dynamic library libopenblas_sandybridgep-r0.2.6.dylib, you must run:

"make PREFIX=/your_installation_path/ install".

(or set PREFIX in Makefile.rule and run make install. If you want to move the .dylib to a new location later, make sure you change the internal name of the dylib with:

install_name_tool -id /new/absolute/path/to/libopenblas_sandybridgep-r0.2.6.dylib libopenblas_sandybridgep-r0.2.6.dylib

To install the library, you can run "make PREFIX=/path/to/your/installation install".

100 21.4M 100 21.4M 0 0 42183 0 0:08:54 0:08:54 --:--:-- 80886 make[1]: * [julia-release] Error 2 make: * [release] Error 2

ViralBShah commented 11 years ago

@johnmyleswhite Relooking at your error, it seems that the tests are failing due to them not being able to find the correct libgmp, which is expected, given that the tests will not be compiled with the correct rpath.

The weird thing is that it does not crash for me.

timema commented 11 years ago

back to the same expected error "dyld: Library not loaded: @rpath/libgmp.dylib" if clean rebuild without parallel make

ViralBShah commented 11 years ago

What if you do make -k? Does it go to completion?

johnmyleswhite commented 11 years ago

Nope.

vtjnash commented 11 years ago

You will need to delete your deps/gmp folder to rebuild the tests with the missing rpath flag

timema commented 11 years ago

Thanks, it works for me.

milktrader commented 11 years ago

10.8 too, thanks.