Skip to content

Instantly share code, notes, and snippets.

@fish2000
Created February 22, 2012 05:40
Show Gist options
  • Select an option

  • Save fish2000/1881735 to your computer and use it in GitHub Desktop.

Select an option

Save fish2000/1881735 to your computer and use it in GitHub Desktop.
Homebrew Gifsicle '-lX11' Error and Fix
ASIO-OTUS:tmp$ brew -v install gifsicle
Homebrew 0.8.1
==> Downloading http://www.lcdf.org/gifsicle/gifsicle-1.61.tar.gz
/usr/bin/curl -qf#LA Homebrew 0.8.1 (Ruby 1.8.7-249; Mac OS X 10.7.3) http://www.lcdf.org/gifsicle/gifsicle-1.61.tar.gz -o /Users/fish/Library/Caches/Homebrew/gifsicle-1.61.tar.gz
######################################################################## 100.0%
/usr/bin/tar xf /Users/fish/Library/Caches/Homebrew/gifsicle-1.61.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gifsicle/1.61 --enable-all
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gifsicle/1.61 --enable-all
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/llvm-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/llvm-gcc accepts -g... yes
checking for /usr/bin/llvm-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /usr/bin/llvm-gcc... none
checking how to run the C preprocessor... /usr/bin/llvm-gcc -E
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for X... libraries /usr/local/lib, headers
checking whether -R must be followed by a space... no
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... no
checking for gettimeofday prototype... 2
checking for random... yes
checking for strerror... yes
checking for strtoul... yes
checking for mkstemp... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for inttypes.h... (cached) yes
checking for unistd.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for uintptr_t... yes
checking size of void *... 8
checking size of unsigned long... 8
checking size of unsigned int... 4
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
==> make install
make install
Making install in src
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c clp.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c giffunc.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c gifread.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c gifunopt.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c merge.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c optimize.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c quantize.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c support.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c xform.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c gifsicle.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c gifwrite.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c fmalloc.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c gifx.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c gifview.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -Os -w -pipe -march=core2 -msse4 -c gifdiff.c
/usr/bin/llvm-gcc -Wall -Os -w -pipe -march=core2 -msse4 -o gifsicle clp.o giffunc.o gifread.o gifunopt.o merge.o optimize.o quantize.o support.o xform.o gifsicle.o fmalloc.o gifwrite.o
/usr/bin/llvm-gcc -Wall -Os -w -pipe -march=core2 -msse4 -o gifdiff clp.o giffunc.o gifread.o gifdiff.o fmalloc.o
/usr/bin/llvm-gcc -Wall -Os -w -pipe -march=core2 -msse4 -o gifview clp.o giffunc.o gifread.o gifx.o gifview.o fmalloc.o -L/usr/local/lib -R/usr/local/lib -lX11
ld: library not found for -lX11
collect2: ld returned 1 exit status
make[1]: *** [gifview] Error 1
make: *** [install-recursive] Error 1
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/gifsicle.rb#L12
==> Environment
HOMEBREW_VERSION: 0.8.1
HEAD: b41287425d7845bd8b889aead5326453907c75aa
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: quad-core 64-bit sandybridge
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.2.1
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
Clang: 3.0 build 211
MacPorts or Fink? false
X11 installed? true
System Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Which Perl: /usr/bin/perl
Which Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.2/bin/python
Which Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/1.9.3-p0/bin/ruby
==> Build Flags
CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -Os -w -pipe -march=core2 -msse4
CXXFLAGS: -Os -w -pipe -march=core2 -msse4
MAKEFLAGS: -j4
Error: Failed executing: make install
If `brew doctor' does not help diagnose the issue, please report the bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
ASIO-OTUS:tmp$ brew edit gifsicle ### <--(added ENV.x11 to Gifsicle#install)
ASIO-OTUS:tmp$ brew -v install gifsicle
Homebrew 0.8.1
==> Downloading http://www.lcdf.org/gifsicle/gifsicle-1.61.tar.gz
File already downloaded in /Users/fish/Library/Caches/Homebrew
/usr/bin/tar xf /Users/fish/Library/Caches/Homebrew/gifsicle-1.61.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gifsicle/1.61 --enable-all
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gifsicle/1.61 --enable-all
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/llvm-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/llvm-gcc accepts -g... yes
checking for /usr/bin/llvm-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /usr/bin/llvm-gcc... none
checking how to run the C preprocessor... /usr/bin/llvm-gcc -E
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for X... libraries /usr/local/lib, headers
checking whether -R must be followed by a space... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for gettimeofday prototype... 2
checking for random... yes
checking for strerror... yes
checking for strtoul... yes
checking for mkstemp... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for inttypes.h... (cached) yes
checking for unistd.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for uintptr_t... yes
checking size of void *... 8
checking size of unsigned long... 8
checking size of unsigned int... 4
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
==> make install
make install
Making install in src
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c clp.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c giffunc.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c gifread.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c gifunopt.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c merge.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c optimize.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c quantize.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c support.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c xform.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c gifsicle.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c gifwrite.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c fmalloc.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c gifx.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c gifview.c
/usr/bin/llvm-gcc -Wall -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/X11/include -Os -w -pipe -march=core2 -msse4 -c gifdiff.c
/usr/bin/llvm-gcc -Wall -Os -w -pipe -march=core2 -msse4 -L/usr/X11/lib -o gifsicle clp.o giffunc.o gifread.o gifunopt.o merge.o optimize.o quantize.o support.o xform.o gifsicle.o fmalloc.o gifwrite.o
/usr/bin/llvm-gcc -Wall -Os -w -pipe -march=core2 -msse4 -L/usr/X11/lib -o gifview clp.o giffunc.o gifread.o gifx.o gifview.o fmalloc.o -L/usr/local/lib -R/usr/local/lib -lSM -lICE -lX11
/usr/bin/llvm-gcc -Wall -Os -w -pipe -march=core2 -msse4 -L/usr/X11/lib -o gifdiff clp.o giffunc.o gifread.o gifdiff.o fmalloc.o
test -z "/usr/local/Cellar/gifsicle/1.61/bin" || /usr/local/bin/gmkdir -p "/usr/local/Cellar/gifsicle/1.61/bin"
make[2]: Nothing to be done for `install-data-am'.
/usr/local/bin/ginstall -c gifsicle gifview gifdiff '/usr/local/Cellar/gifsicle/1.61/bin'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/Cellar/gifsicle/1.61/share/man/man1" || /usr/local/bin/gmkdir -p "/usr/local/Cellar/gifsicle/1.61/share/man/man1"
/usr/local/bin/ginstall -c -m 644 gifsicle.1 gifview.1 gifdiff.1 '/usr/local/Cellar/gifsicle/1.61/share/man/man1'
strip /usr/local/Cellar/gifsicle/1.61/bin/gifview
strip /usr/local/Cellar/gifsicle/1.61/bin/gifsicle
strip /usr/local/Cellar/gifsicle/1.61/bin/gifdiff
==> Finishing up
ln /usr/local/bin/gifview
ln /usr/local/bin/gifsicle
ln /usr/local/bin/gifdiff
ln /usr/local/share/man/man1/gifview.1
ln /usr/local/share/man/man1/gifsicle.1
ln /usr/local/share/man/man1/gifdiff.1
==> Summary
/usr/local/Cellar/gifsicle/1.61: 9 files, 312K, built in 5 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment