Skip to content

Instantly share code, notes, and snippets.

@jackiekazil
Created April 5, 2014 03:41
Show Gist options
  • Save jackiekazil/9987206 to your computer and use it in GitHub Desktop.
Save jackiekazil/9987206 to your computer and use it in GitHub Desktop.
Problem installing gdal & postgis with homebrew -- configure: error: could not find proj_api.h
jkazil@jlk:~ $ brew install postgis
==> Installing dependencies for postgis: liblwgeom, gdal
==> Installing postgis dependency: liblwgeom
==> Downloading http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/liblwgeom-2.1.1.tar.gz
==> Downloading https://gist.github.com/dakcarto/7458788/raw/8df39204eef5a1e5671828ded7f377ad0f61d4e1/postgis-config_strip-pgsql.diff
Already downloaded: /Library/Caches/Homebrew/liblwgeom--patch-3d93c9ede79439f1c683a604f9d906f5c788c690.diff
==> Patching
patching file configure.ac
==> ./autogen.sh
==> ./configure --disable-nls --with-projdir=/usr/local --with-jsondir=/usr/local/opt/json-c --without-libiconv-prefix --without-libintl-prefix --without-raster --without-topology
Using user-specified proj directory: /usr/local
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
brew install jkazil@jlk:~ $ brew install gdal
==> Installing gdal dependency: liblwgeom
==> Downloading http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/liblwgeom-2.1.1.tar.gz
==> Downloading https://gist.github.com/dakcarto/7458788/raw/8df39204eef5a1e5671828ded7f377ad0f61d4e1/postgis-config_strip-pgsql.diff
Already downloaded: /Library/Caches/Homebrew/liblwgeom--patch-3d93c9ede79439f1c683a604f9d906f5c788c690.diff
==> Patching
patching file configure.ac
==> ./autogen.sh
==> ./configure --disable-nls --with-projdir=/usr/local --with-jsondir=/usr/local/opt/json-c --without-libiconv-prefix --without-libintl-prefix --without-raster --without-topology
Using user-specified proj directory: /usr/local
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
jkazil@jlk:~ $ brew update
Updated Homebrew from d6f67ae5 to 58488460.
==> Updated Formulae
drake fits fzf gvp inkscape libdnet mcabber mdbtools osxfuse recode sdl_sound trafshow vimpc
jkazil@jlk:~ $ brew doctor
Your system is ready to brew.
jkazil@jlk:~ $ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 584884608accbf202906549b45d3f9d81abad34f
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.9.2-x86_64
Xcode: 5.1
CLT: 5.1.0.0.1.1393561416
Clang: 5.1 build 503
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/local/Cellar/ruby/2.1.1/bin/ruby
jkazil@jlk:~ $ brew install -v postgis 2>&1
/usr/bin/env python -c import numpy
==> Installing dependencies for postgis: liblwgeom, gdal
==> Installing postgis dependency: liblwgeom
==> Downloading http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/liblwgeom-2.1.1.tar.gz
==> Verifying liblwgeom-2.1.1.tar.gz checksum
tar xf /Library/Caches/Homebrew/liblwgeom-2.1.1.tar.gz
==> Downloading https://gist.github.com/dakcarto/7458788/raw/8df39204eef5a1e5671828ded7f377ad0f61d4e1/postgis-config_strip-pgsql.diff
Already downloaded: /Library/Caches/Homebrew/liblwgeom--patch-3d93c9ede79439f1c683a604f9d906f5c788c690.diff
==> Verifying liblwgeom--patch-3d93c9ede79439f1c683a604f9d906f5c788c690.diff checksum
==> Patching
/usr/bin/patch -g 0 -f -d /private/tmp/liblwgeom-FDoo/postgis-2.1.1 -p1 -i /private/tmp/liblwgeom--patch-YeWY/postgis-config_strip-pgsql.diff
patching file configure.ac
==> ./autogen.sh
* Running /usr/local/opt/libtool/bin/glibtoolize (2.4.2)
OPTIONS = --force --copy --install
glibtoolize: putting auxiliary files in `.'.
glibtoolize: copying file `./config.guess'
glibtoolize: copying file `./config.sub'
glibtoolize: copying file `./install-sh'
glibtoolize: copying file `./ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIR, `macros'.
glibtoolize: copying file `macros/libtool.m4'
glibtoolize: copying file `macros/ltoptions.m4'
glibtoolize: copying file `macros/ltsugar.m4'
glibtoolize: copying file `macros/ltversion.m4'
glibtoolize: copying file `macros/lt~obsolete.m4'
glibtoolize: Consider adding `-I macros' to ACLOCAL_AMFLAGS in Makefile.am.
* Running /usr/local/opt/automake/bin/aclocal (1.14.1)
* Running /usr/local/opt/autoconf/bin/autoconf (2.69)
======================================
Now you are ready to run './configure'
======================================
==> ./configure --disable-dependency-tracking --disable-nls --with-projdir=/usr/local --with-jsondir=/usr/local/opt/json-c --without-libiconv-prefix --without-libintl-prefix --without-raster --without-topology
configure: WARNING: unrecognized options: --disable-dependency-tracking
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... x86_64-apple-darwin13.1.0
checking how to print strings... printf
checking for gcc... clang
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 clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for a sed that does not truncate output... /usr/local/Library/ENV/4.3/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by clang... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) 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-darwin13.1.0 file names to x86_64-apple-darwin13.1.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin13.1.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
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 for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking command to parse /usr/bin/nm output from clang 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... clang -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 clang supports -fno-rtti -fno-exceptions... yes
checking for clang option to produce PIC... -fno-common -DPIC
checking if clang PIC flag -fno-common -DPIC works... yes
checking if clang static flag -static works... no
checking if clang supports -c -o file.o... yes
checking if clang supports -c -o file.o... (cached) yes
checking whether the clang linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin13.1.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... yes
checking for gcc... (cached) clang
checking whether we are using the GNU C compiler... (cached) yes
checking whether clang accepts -g... (cached) yes
checking for clang option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... clang -E
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking how to run the C++ preprocessor... clang++ -E
checking for ld used by clang++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for clang++ option to produce PIC... -fno-common -DPIC
checking if clang++ PIC flag -fno-common -DPIC works... yes
checking if clang++ static flag -static works... no
checking if clang++ supports -c -o file.o... yes
checking if clang++ supports -c -o file.o... (cached) yes
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin13.1.0 dyld
checking how to hardcode library paths into programs... immediate
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for ant... /usr/local/Library/ENV/4.3/ant
checking for cpp... /usr/local/Library/ENV/4.3/cpp
checking if clang++ supports -Wall... yes
checking if clang++ supports -Wmissing-prototypes... yes
checking if clang++ supports -ffloat-store... yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -ll
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for perl... /usr/bin/perl
checking for convert... no
configure: WARNING: ImageMagick does not seem to be installed. Documentation cannot be built
checking for xsltproc... /usr/bin/xsltproc
checking for xmllint... /usr/bin/xmllint
checking for dblatex... no
configure: WARNING: dblatex is not installed so PDF documentation cannot be built
configure: WARNING: could not locate Docbook stylesheets required to build the documentation
checking CUnit/CUnit.h usability... no
checking CUnit/CUnit.h presence... no
checking for CUnit/CUnit.h... no
configure: WARNING: could not locate CUnit required for unit tests
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... no
checking for iconv_open in -liconv... yes
checking for iconvctl... no
checking for libiconvctl... no
checking for xml2-config... /usr/bin/xml2-config
checking libxml/tree.h usability... yes
checking libxml/tree.h presence... yes
checking for libxml/tree.h... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking libxml/xpath.h usability... yes
checking libxml/xpath.h presence... yes
checking for libxml/xpath.h... yes
checking libxml/xpathInternals.h usability... yes
checking libxml/xpathInternals.h presence... yes
checking for libxml/xpathInternals.h... yes
checking for xmlInitParser in -lxml2... yes
checking for geos-config... /usr/local/opt/geos/bin/geos-config
checking GEOS version... 3.4.2
checking geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking for initGEOS in -lgeos_c... yes
checking for sfcgal-config... no
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking whether NLS is requested... no
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking for ld used by GCC... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... yes
checking for CFLocaleCopyCurrent... yes
checking whether to use NLS... no
Using user-specified proj directory: /usr/local
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir
==> Configuration
HOMEBREW_VERSION: 0.9.5
HEAD: 584884608accbf202906549b45d3f9d81abad34f
CPU: quad-core 64-bit arrandale
OS X: 10.9.2-x86_64
Xcode: 5.1
CLT: 5.1.0.0.1.1393561416
X11: N/A
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/opt/proj/lib/pkgconfig:/usr/local/opt/json-c/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.9
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/local/opt/autoconf/bin:/usr/local/opt/automake/bin:/usr/local/opt/libtool/bin:/usr/local/opt/gpp/bin:/usr/local/opt/proj/bin:/usr/local/opt/geos/bin:/usr/bin:/bin:/usr/sbin:/sbin
Error: liblwgeom did not build
Logs:
/Users/jkazil/Library/Logs/Homebrew/liblwgeom/01.autogen.sh
/Users/jkazil/Library/Logs/Homebrew/liblwgeom/02.configure
/Users/jkazil/Library/Logs/Homebrew/liblwgeom/02.configure.cc
/Users/jkazil/Library/Logs/Homebrew/liblwgeom/config.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment