Skip to content

Instantly share code, notes, and snippets.

@cpjobling
Created March 25, 2011 17:23
Show Gist options
  • Save cpjobling/887220 to your computer and use it in GitHub Desktop.
Save cpjobling/887220 to your computer and use it in GitHub Desktop.
As part of install of gnuplot (required by octave) dependency lua fails to build because -lreadline is missing. On checking, readline includes and is installed as a keg
me@mymac:/usr/local [git:master]
➔ brew install lua
==> Downloading http://www.lua.org/ftp/lua-5.1.4.tar.gz
File already downloaded and cached to /Users/eechris/Library/Caches/Homebrew
######################################################################## 100.0%
patching file lcode.c
patching file ldblib.c
patching file liolib.c
patching file llex.c
patching file loadlib.c
patching file lstrlib.c
patching file lvm.c
==> make macosx INSTALL_TOP=/usr/local/Cellar/lua/5.1.4 INSTALL_MAN=/usr/local/Cellar/lua/5.1
cd src && make macosx
make all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lapi.o lapi.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lcode.o lcode.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o ldebug.o ldebug.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o ldo.o ldo.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o ldump.o ldump.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lfunc.o lfunc.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lgc.o lgc.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o llex.o llex.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lmem.o lmem.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lobject.o lobject.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lopcodes.o lopcodes.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lparser.o lparser.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lstate.o lstate.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lstring.o lstring.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o ltable.o ltable.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o ltm.o ltm.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lundump.o lundump.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lvm.o lvm.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lzio.o lzio.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lauxlib.o lauxlib.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lbaselib.o lbaselib.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o ldblib.o ldblib.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o liolib.o liolib.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lmathlib.o lmathlib.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o loslib.o loslib.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o ltablib.o ltablib.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lstrlib.o lstrlib.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o loadlib.o loadlib.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o linit.o linit.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o lua.o lua.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o luac.o luac.c
/usr/bin/gcc-4.2 -march=core2 -msse4.1 -w -pipe -O3 -DLUA_USE_LINUX -c -o print.o print.c
ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o
ranlib liblua.a
/usr/bin/gcc-4.2 -o lua lua.o liblua.a -lm -lreadline
/usr/bin/gcc-4.2 -o luac luac.o print.o liblua.a -lm -lreadline
ld: library not found for -lreadline
collect2: ld returned 1 exit status
make[2]: *** [lua] Error 1
make[2]: *** Waiting for unfinished jobs....
ld: library not found for -lreadline
collect2: ld returned 1 exit status
make[2]: *** [luac] Error 1
make[1]: *** [macosx] Error 2
make: *** [macosx] Error 2
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/lua.rb#L34
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: 245b1bce08d096513ab8a8ce4af731861fd4c624
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.6.7
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.0
GCC-4.0: build 5493 (5494 or newer recommended)
GCC-4.2: build 5666
LLVM: build 2335
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/gcc-4.2
CXX: /usr/bin/g++-4.2
LD: /usr/bin/gcc-4.2
CFLAGS: -march=core2 -msse4.1 -w -pipe -O3
CXXFLAGS: -march=core2 -msse4.1 -w -pipe -O3
MAKEFLAGS: -j2
Error: Failed executing: make macosx INSTALL_TOP=/usr/local/Cellar/lua/5.1.4 INSTALL_MAN=/usr/local/Cellar/lua/5.1.4/share/man/man1
Please report this bug: https://github.com/mxcl/homebrew/wiki/new-issue
These existing issues may help you:
http://github.com/mxcl/homebrew/issues/#issue/4857
Also try:
`brew doctor` to check your setup for common problems.
`brew missing` to check installed packages for missing deps.
me@mymac:/usr/local [git:master]
➔ brew doctor
Your gcc 4.0.x version is older than the recommended version. It may be advisable
to upgrade to the latest release of Xcode.
me@mymac:/usr/local [git:master]
➔ brew missing
me@mymac:/usr/local [git:master]
@dcreager
Copy link

dcreager commented May 5, 2011

For those who are still seeing this problem, the issue is with a missing symlink in /usr/lib. Please see Homebrew/legacy-homebrew#4857 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment