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

Build error on OX 10.9 #54

Closed
argoneus opened this issue Nov 19, 2013 · 12 comments
Closed

Build error on OX 10.9 #54

argoneus opened this issue Nov 19, 2013 · 12 comments

Comments

@argoneus
Copy link

I'm running brew reinstall --64bit -v julia and receive the following error:

dyld: Library not loaded: /usr/local/homebrew/homebrew/opt/readline/lib/libreadline.6.2.dylib
Referenced from: /private/tmp/julia-M0N2/usr/bin/julia-readline
Reason: image not found
/bin/sh: line 1: 68667 Trace/BPT trap: 5       /private/tmp/julia-M0N2/usr/bin/julia-readline -bf sysimg.jl
make[1]: *** [/private/tmp/julia-M0N2/usr/lib/julia/sys0.ji] Error 133 
make: *** [release] Error 2
Error: Failed executing: make release PREFIX=/usr/local/homebrew/Cellar/julia/0.2.0 USE_BLAS64=1 FC=/usr/local/homebrew/bin/gfortran USECLANG=1 LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lo
ln -s ../Cellar/julia/HEAD/bin/julia-release-readline julia-release-readline
ln -s ../Cellar/julia/HEAD/bin/julia-release-basic julia-release-basic
ln -s ../Cellar/julia/HEAD/bin/julia-debug-readline julia-debug-readline
ln -s ../Cellar/julia/HEAD/bin/julia-debug-basic julia-debug-basic
ln -s ../Cellar/julia/HEAD/bin/julia julia
ln -s ../Cellar/julia/HEAD/include/julia julia
ln -s ../Cellar/julia/HEAD/share/julia julia
ln -s ../Cellar/julia/HEAD/lib/julia julia
ln -s ../../Cellar/julia/HEAD julia
ln -s ../Cellar/julia/HEAD julia
Error: Reinstall failed.
@argoneus argoneus reopened this Nov 19, 2013
@staticfloat
Copy link
Owner

Interesting. Do you have readline installed in brew? Is there anything in this directory: /usr/local/homebrew/homebrew/opt/readline/lib/? What does brew doctor say? What does brew --config say?

@argoneus
Copy link
Author

Yes, readline appears to be installed:

$ ls /usr/local/homebrew/opt/readline/lib
  libhistory.6.2.dylib   libhistory.6.dylib@    libhistory.a           libhistory.dylib@      libreadline.6.2.dylib      
  libreadline.6.dylib@   libreadline.a          libreadline.dylib@

$ brew doctor
Warning: Your XQuartz (2.7.4) is outdated
Please install XQuartz 2.7.5:
  https://xquartz.macosforge.org

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libmacfuse_i32.2.dylib
    /usr/local/lib/libmacfuse_i64.2.dylib
    /usr/local/lib/libosxfuse_i32.2.dylib
    /usr/local/lib/libosxfuse_i64.2.dylib
    /usr/local/lib/libtcl8.6.dylib
    /usr/local/lib/libtk8.6.dylib

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
    /usr/local/lib/libosxfuse_i32.la
    /usr/local/lib/libosxfuse_i64.la

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
    /usr/local/lib/pkgconfig/osxfuse.pc
    /usr/local/lib/pkgconfig/tcl.pc
    /usr/local/lib/pkgconfig/tk.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
    /usr/local/lib/libtclstub8.6.a
    /usr/local/lib/libtkstub8.6.a

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.5
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: 8bb5da947942a6cb483ac8c556254e0db7fe05f8
HOMEBREW_PREFIX: /usr/local/homebrew
HOMEBREW_CELLAR: /usr/local/homebrew/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.9-x86_64
Xcode: 5.0.2
CLT: 5.0.1.0.1.1382131676
GCC-4.2: build 5666
Clang: 5.0 build 500 
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/2.0/usr/bin/ruby

@staticfloat
Copy link
Owner

What does this output:

$ otool -L /usr/local/homebrew/homebrew/opt/readline/lib/libreadline.6.2.dylib

@argoneus
Copy link
Author

There's no /usr/local/homebrew/homebrew dir. But the lib is in /usr/local/homebrew/opt/readline/lib:

 $ otool -L /usr/local/homebrew/opt/readline/lib/libreadline.6.2.dylib 
 /usr/local/homebrew/opt/readline/lib/libreadline.6.2.dylib:
 /usr/local/homebrew/homebrew/opt/readline/lib/libreadline.6.2.dylib (compatibility version 6.0.0, current version 6.2.0)
 /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
 /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 2577.0.0)

@staticfloat
Copy link
Owner

Oh, well there's the problem. brew reinstall is trying to find a /usr/local/homebrew/homebrew folder for some reason. Could you post the full output of brew install --64bit -v julia please? You can gist the result as it is likely to be quite long.

@argoneus
Copy link
Author

@staticfloat
Copy link
Owner

@argoneus That's really interesting. I have no idea why your readline has that double homebrew in it. Can you try reinstalling readline?

@argoneus
Copy link
Author

I think I'd tried that earlier but I went ahead and ran brew rm readline and brew install readline. Here's the output:

$ brew install readline
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/readline-6.2.4.mavericks.bottle.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/readline-6.2.4.mavericks.bottle.1.tar.gz
==> Pouring readline-6.2.4.mavericks.bottle.1.tar.gz
==> Caveats
This formula is keg-only, so it was not symlinked into /usr/local/homebrew.

OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are 
defaulting this GNU Readline installation to keg-only.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/homebrew/opt/readline/lib
    CPPFLAGS: -I/usr/local/homebrew/opt/readline/include

==> Summary
  /usr/local/homebrew/Cellar/readline/6.2.4: 31 files, 1.6M

@staticfloat
Copy link
Owner

Aha, so you're installing this from a bottle. My guess is that the phase where homebrew relocates your bottle is screwing up for some reason, although I cannot reproduce on this end. Can you please try this: brew install --build-from-source readline and then post the output of otool -L again? (You could also see if Julia automagically works after the reinstallation of readline from source)

@argoneus
Copy link
Author

Building readline from source fixed the issue with Julia... thanks!

@staticfloat
Copy link
Owner

No problem! I'm going to close this issue then. Unless this pops up again, I wouldn't open an issue with mainline homebrew, but if it does, they might appreciate hearing about it!

@argoneus
Copy link
Author

Sounds good, thanks!

Sent from my iPhone

On Nov 21, 2013, at 1:32 AM, Elliot Saba [email protected] wrote:

No problem! I'm going to close this issue then. Unless this pops up again, I wouldn't open an issue with mainline homebrew, but if it does, they might appreciate hearing about it!


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants