Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.96k stars 11.34k forks source link

SDL should error nicely about X11 not being installed #2983

Closed nvie closed 14 years ago

nvie commented 14 years ago
$ brew install gource
==> Downloading http://www.libsdl.org/release/SDL-1.2.14.tar.gz
File already downloaded and cached to /Users/nvie/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/sdl/1.2.14 --disable-nasm
==> make install
/bin/sh build-scripts/mkinstalldirs build
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL.c  -o build/SDL.lo
mkdir -p -- build
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL_error.c  -o build/SDL_error.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL.c  -fno-common -DPIC -o build/.libs/SDL.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL_error.c  -fno-common -DPIC -o build/.libs/SDL_error.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL.c -o build/SDL.o >/dev/null 2>&1
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL_error.c -o build/SDL_error.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL_fatal.c  -o build/SDL_fatal.lo
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_audio.c  -o build/SDL_audio.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL_fatal.c  -fno-common -DPIC -o build/.libs/SDL_fatal.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_audio.c  -fno-common -DPIC -o build/.libs/SDL_audio.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL_fatal.c -o build/SDL_fatal.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_audiocvt.c  -o build/SDL_audiocvt.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_audiocvt.c  -fno-common -DPIC -o build/.libs/SDL_audiocvt.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_audio.c -o build/SDL_audio.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_audiodev.c  -o build/SDL_audiodev.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_audiodev.c  -fno-common -DPIC -o build/.libs/SDL_audiodev.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_audiodev.c -o build/SDL_audiodev.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer.c  -o build/SDL_mixer.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer.c  -fno-common -DPIC -o build/.libs/SDL_mixer.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer.c -o build/SDL_mixer.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer_MMX.c  -o build/SDL_mixer_MMX.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_audiocvt.c -o build/SDL_audiocvt.o >/dev/null 2>&1
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer_MMX.c  -fno-common -DPIC -o build/.libs/SDL_mixer_MMX.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer_MMX.c -o build/SDL_mixer_MMX.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer_MMX_VC.c  -o build/SDL_mixer_MMX_VC.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer_MMX_VC.c  -fno-common -DPIC -o build/.libs/SDL_mixer_MMX_VC.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer_MMX_VC.c -o build/SDL_mixer_MMX_VC.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer_m68k.c  -o build/SDL_mixer_m68k.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer_m68k.c  -fno-common -DPIC -o build/.libs/SDL_mixer_m68k.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_mixer_m68k.c -o build/SDL_mixer_m68k.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_wave.c  -o build/SDL_wave.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_wave.c  -fno-common -DPIC -o build/.libs/SDL_wave.o
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/cdrom/SDL_cdrom.c  -o build/SDL_cdrom.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/cdrom/SDL_cdrom.c  -fno-common -DPIC -o build/.libs/SDL_cdrom.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/audio/SDL_wave.c -o build/SDL_wave.o >/dev/null 2>&1
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/cdrom/SDL_cdrom.c -o build/SDL_cdrom.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/cpuinfo/SDL_cpuinfo.c  -o build/SDL_cpuinfo.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/cpuinfo/SDL_cpuinfo.c  -fno-common -DPIC -o build/.libs/SDL_cpuinfo.o
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/events/SDL_active.c  -o build/SDL_active.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/events/SDL_active.c  -fno-common -DPIC -o build/.libs/SDL_active.o
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/events/SDL_active.c -o build/SDL_active.o >/dev/null 2>&1
/bin/sh ./libtool --mode=compile /usr/bin/cc -O3 -march=core2 -w -pipe  -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/events/SDL_events.c  -o build/SDL_events.lo
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/cpuinfo/SDL_cpuinfo.c -o build/SDL_cpuinfo.o >/dev/null 2>&1
libtool: compile:  /usr/bin/cc -O3 -march=core2 -w -pipe -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/events/SDL_events.c  -fno-common -DPIC -o build/.libs/SDL_events.o
In file included from ./src/events/SDL_events.c:27:
./include/SDL_syswm.h:58:22: error: X11/Xlib.h: No such file or directory
./include/SDL_syswm.h:59:23: error: X11/Xatom.h: No such file or directory
In file included from ./src/events/SDL_events.c:27:
./include/SDL_syswm.h:76: error: expected specifier-qualifier-list before ‘XEvent’
./include/SDL_syswm.h:89: error: expected specifier-qualifier-list before ‘Display’
make: *** [build/SDL_events.lo] Error 1
make: *** Waiting for unfinished jobs....
Exit status: 2

http://github.com/mxcl/homebrew/blob/master/Library/Formula/sdl.rb#L22

==> Environment
HOMEBREW_VERSION: 0.7
HEAD: 49a52c9f1f3e2f74111ffff019051499f818d941
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 core2
OS X: 10.6.4
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.2.3
GCC-4.0: build 5494 
GCC-4.2: build 5664 
LLVM: build 2326 
MacPorts or Fink? false
X11 installed? false

==> Build Flags
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -w -pipe
CXXFLAGS: -O3 -march=core2 -w -pipe
MAKEFLAGS: -j2
Error: Failure while executing: make install 
Please report this bug at http://github.com/mxcl/homebrew/issues

Also try:
  `brew doctor` to check your setup for common problems.
  `brew missing` to check installed packages for missing deps.
adamv commented 14 years ago

Looks like it is SDL that's assuming X11 is there.

adamv commented 14 years ago

Possibly fixed in c861ac8d8f6fa12184254c5b3698b33a5dc5fb56