mxcl/homebrew — Issue #9870: gtk+ won’t build on Lion
Author: Zearin
Created: 2012-01-30 15:40:04+00:00
State: open

First:

```
$ brew --config
HOMEBREW_VERSION: 0.8.1
HEAD: 6c7f2d822d4dff6aff57474cc816b91a7474b31b
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: dual-core 64-bit penryn
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.2
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2335
Clang: 2.1 build 163
MacPorts or Fink? false
X11 installed? true
```

And the failed installation attempt:

```
$ brew install gtk+
==> Downloading http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.8.tar.bz2
File already downloaded in /Users/amrogers/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/gtk+/2.24.8 --disable-glibtest
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/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-apple-darwin11.2.0
checking host system type... x86_64-apple-darwin11.2.0
checking for native Win32... no
checking for gcc... /usr/bin/llvm-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/llvm-g++ accepts -g... yes
checking dependency style of /usr/bin/llvm-g++... none
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/bin/sed
checking for grep that handles long lines and -e... /usr/local/bin/grep
checking for egrep... /usr/local/bin/grep -E
checking for fgrep... /usr/local/bin/grep -F
checking for ld used by /usr/bin/llvm-gcc... /usr/bin/llvm-gcc
checking if the linker (/usr/bin/llvm-gcc) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin11.2.0 file names to x86_64-apple-darwin11.2.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin11.2.0 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/llvm-gcc option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from /usr/bin/llvm-gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... /usr/bin/llvm-gcc -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 for dlfcn.h... yes
checking for objdir... .libs
checking if /usr/bin/llvm-gcc supports -fno-rtti -fno-exceptions... yes
checking for /usr/bin/llvm-gcc option to produce PIC... -fno-common -DPIC
checking if /usr/bin/llvm-gcc PIC flag -fno-common -DPIC works... yes
checking if /usr/bin/llvm-gcc static flag -static works... no
checking if /usr/bin/llvm-gcc supports -c -o file.o... yes
checking if /usr/bin/llvm-gcc supports -c -o file.o... (cached) yes
checking whether the /usr/bin/llvm-gcc linker (/usr/bin/llvm-gcc) supports shared libraries... yes
checking dynamic linker characteristics... darwin11.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... /usr/bin/llvm-g++ -E
checking for ld used by /usr/bin/llvm-g++... /usr/bin/llvm-gcc
checking if the linker (/usr/bin/llvm-gcc) is GNU ld... no
checking whether the /usr/bin/llvm-g++ linker (/usr/bin/llvm-gcc) supports shared libraries... yes
checking for /usr/bin/llvm-g++ option to produce PIC... -fno-common -DPIC
checking if /usr/bin/llvm-g++ PIC flag -fno-common -DPIC works... yes
checking if /usr/bin/llvm-g++ static flag -static works... no
checking if /usr/bin/llvm-g++ supports -c -o file.o... yes
checking if /usr/bin/llvm-g++ supports -c -o file.o... (cached) yes
checking whether the /usr/bin/llvm-g++ linker (/usr/bin/llvm-gcc) supports shared libraries... yes
checking dynamic linker characteristics... darwin11.2.0 dyld
checking how to hardcode library paths into programs... immediate
configure: creating ./config.lt
config.lt: creating libtool
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking dependency style of /usr/bin/llvm-gcc... none
checking for nm... /usr/bin/nm
checking whether to disable maintainer-specific portions of Makefiles... yes
checking for some Win32 platform... no
checking whether build environment is sane... yes
checking for library containing strerror... none required
checking for gcc... (cached) /usr/bin/llvm-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether /usr/bin/llvm-gcc accepts -g... (cached) yes
checking for /usr/bin/llvm-gcc option to accept ISO C89... (cached) none needed
checking dependency style of /usr/bin/llvm-gcc... (cached) none
checking whether /usr/bin/llvm-gcc and cc understand -c and -o together... yes
checking whether make sets $(MAKE)... (cached) yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for BASE_DEPENDENCIES... yes
checking for CAIRO_BACKEND... yes
checking Whether to write dependencies into .pc files... no
checking for perl5... no
checking for perl... /usr/local/bin/perl
checking for indent... indent
checking for lstat... yes
checking for mkstemp... yes
checking for flockfile... yes
checking for getc_unlocked... yes
checking for localtime_r... yes
checking for _NL_TIME_FIRST_WEEKDAY... no
checking for _NL_MEASUREMENT_MEASUREMENT... no
checking for _NL_PAPER_HEIGHT... no
checking for _NL_PAPER_WIDTH... no
checking for sigsetjmp... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for ngettext in libc... no
checking for bindtextdomain in -lintl... yes
checking for ngettext in -lintl... yes
checking for dgettext in -lintl... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... /usr/local/Cellar/gettext/0.18.1.1/bin/msgfmt
checking for dcgettext... yes
checking if msgfmt accepts -c... yes
checking for gmsgfmt... /usr/local/Cellar/gettext/0.18.1.1/bin/msgfmt
checking for xgettext... /usr/local/Cellar/gettext/0.18.1.1/bin/xgettext
checking for catalogs to be installed... af am ang ar as ast az az_IR be be@latin bg bn bn_IN br bs ca ca@valencia crh cs cy da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy ia id io is it ja ka kk kn ko ku li lt lv mai mi mk ml mn mr ms my nb nds ne nl nn nso oc or pa pl ps pt pt_BR ro ru rw si sk sl sq sr sr@latin sr@ije sv ta te th tk tr tt ug uk ur uz uz@cyrillic vi wa xh yi zh_CN zh_HK zh_TW
checking for extra flags to get ANSI library prototypes... none needed
checking for the BeOS... no
checking for HP-UX... no
checking for extra flags for POSIX compliance... none needed
checking for pkg-config... (cached) /usr/local/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.27.3... yes (version 2.30.2)
checking for bind_textdomain_codeset... (cached) yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking ftw.h usability... yes
checking ftw.h presence... yes
checking for ftw.h... yes
checking for GNU ftw extensions... no
checking for ANSI C header files... (cached) yes
checking for an ANSI C-conforming const... yes
checking return type of signal handlers... void
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for mallinfo... no
checking for getresuid... no
checking for uid_t in sys/types.h... yes
checking for fd_set... yes, found in sys/types.h
checking for wchar.h... yes
checking for wctype.h... yes
checking for iswalnum... yes
checking if iswalnum() and friends are properly defined... no
checking for uxtheme.h... no
checking crt_externs.h usability... yes
checking crt_externs.h presence... yes
checking for crt_externs.h... yes
checking for _NSGetEnviron... yes
checking whether to build dynamic modules... yes
checking whether dynamic modules work... yes
checking immodules to build...
checking for sys/wait.h that is POSIX.1 compatible... yes
checking return type of signal handlers... (cached) void
checking sys/systeminfo.h usability... no
checking sys/systeminfo.h presence... no
checking for sys/systeminfo.h... no
checking sys/sysinfo.h usability... no
checking sys/sysinfo.h presence... no
checking for sys/sysinfo.h... no
checking for mediaLib 2.3... checking for mlib_ImageSetStruct in -lmlib... no
checking for gdk-pixbuf-csource... /usr/local/bin/gdk-pixbuf-csource
checking for XOpenDisplay... yes
checking for XextFindDisplay... yes
checking for XRenderQueryExtension... yes
checking if is needed for xReply... no
checking for XConvertCase... yes
checking for XInternAtoms... yes
checking for XAddConnectionWatch... yes
checking for XkbQueryExtension... yes
checking for XShapeCombineMask... yes
checking for XSyncQueryExtension... yes
checking for X11/extensions/sync.h... yes
checking for XShmAttach... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking X11/extensions/XShm.h... yes
checking for Xinerama support on XFree86... yes
checking Pango flags... -D_REENTRANT -I/usr/local/Cellar/cairo/1.10.2/include/cairo -I/usr/local/Cellar/pango/1.28.4/include/pango-1.0 -I/usr/local/Cellar/glib/2.30.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.30.2/lib/glib-2.0/include -I/usr/local/Cellar/gettext/0.18.1.1/include -I/usr/local/Cellar/glib/2.30.2/include -I/usr/local/Cellar/pixman/0.24.2/include/pixman-1 -I/usr/X11/include -I/usr/X11/include/freetype2 -I/usr/X11/include/libpng15 -L/usr/local/Cellar/cairo/1.10.2/lib -L/usr/local/Cellar/pango/1.28.4/lib -L/usr/local/Cellar/glib/2.30.2/lib -L/usr/local/Cellar/gettext/0.18.1.1/lib -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl
Package libpng12 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpng12.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpng12', required by 'GdkPixbuf', not found
checking ATK flags... -D_REENTRANT -I/usr/local/Cellar/atk/2.2.0/include/atk-1.0 -I/usr/local/Cellar/glib/2.30.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.30.2/lib/glib-2.0/include -I/usr/local/Cellar/gettext/0.18.1.1/include -I/usr/local/Cellar/glib/2.30.2/include -L/usr/local/Cellar/atk/2.2.0/lib -L/usr/local/Cellar/glib/2.30.2/lib -L/usr/local/Cellar/gettext/0.18.1.1/lib -latk-1.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl
Package libpng12 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpng12.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpng12', required by 'GdkPixbuf', not found
checking for library containing gethostent... none required
checking for library containing setsockopt... none required
checking for library containing connect... none required
checking for struct sockaddr_un.sun_len... yes
checking for cups-config... /usr/bin/cups-config
checking cups/cups.h usability... yes
checking cups/cups.h presence... yes
checking for cups/cups.h... yes
checking for httpGetAuthString... yes
checking libpapi... checking for papiServiceCreate in -lpapi... no
checking cairo-pdf.h usability... no
checking cairo-pdf.h presence... no
checking for cairo-pdf.h... no
configure: error:
*** Can't find cairo-pdf.h. You must build Cairo with the pdf
*** backend enabled.
==> Exit Status: 1
http://github.com/mxcl/homebrew/blob/master/Library/Formula/gtk+.rb#L20
==> Environment
HOMEBREW_VERSION: 0.8.1
HEAD: 6c7f2d822d4dff6aff57474cc816b91a7474b31b
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: dual-core 64-bit penryn
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.2
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2335
Clang: 2.1 build 163
MacPorts or Fink? false
X11 installed? true
==> 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: -O3 -w -pipe -march=core2 -msse4.1
CXXFLAGS: -O3 -w -pipe -march=core2 -msse4.1
CPPFLAGS: -I/usr/local/Cellar/cairo/1.10.2/include -I/usr/local/Cellar/libffi/3.0.9/include -I/usr/local/Cellar/gettext/0.18.1.1/include
LDFLAGS: -L/usr/local/Cellar/cairo/1.10.2/lib -L/usr/local/Cellar/libffi/3.0.9/lib -L/usr/local/Cellar/gettext/0.18.1.1/lib
MAKEFLAGS: -j2
PKG_CONFIG_PATH: /usr/local/Cellar/cairo/1.10.2/lib/pkgconfig:/usr/local/Cellar/libffi/3.0.9/lib/pkgconfig:/usr/local/Cellar/gettext/0.18.1.1/lib/pkgconfig

Error: Failed executing: ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gtk+/2.24.8 --disable-glibtest
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/7658
Otherwise, please report the bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
We saved the configure log, please gist it if you report the issue:
~/Library/Logs/Homebrew/config.log
```