Skip to content

Instantly share code, notes, and snippets.

@mriddle
Last active December 16, 2015 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mriddle/5359180 to your computer and use it in GitHub Desktop.
Save mriddle/5359180 to your computer and use it in GitHub Desktop.
Installing postgis via Boxen fails during Make
$ sudo -E -u dev /opt/boxen/homebrew/bin/brew boxen-install boxen/brews/postgis -v
==> Downloading http://postgis.refractions.net/download/postgis-1.5.3.tar.gz
Already downloaded: /opt/boxen/cache/homebrew/postgis-1.5.3-boxen1.tar.gz
Warning: MD5 support is deprecated and will be removed in a future version.
Please switch this formula to SHA1 or SHA256.
tar xf /opt/boxen/cache/homebrew/postgis-1.5.3-boxen1.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/opt/boxen/homebrew/Cellar/postgis/1.5.3-boxen1 --with-projdir=/opt/boxen/homebrew
./configure --disable-dependency-tracking --prefix=/opt/boxen/homebrew/Cellar/postgis/1.5.3-boxen1 --with-projdir=/opt/boxen/homebrew
configure: WARNING: unrecognized options: --disable-dependency-tracking
checking build system type... x86_64-apple-darwin12.2.0
checking host system type... x86_64-apple-darwin12.2.0
checking how to print strings... printf
checking for gcc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /opt/boxen/homebrew/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 cc... /usr/bin/ld
checking if the linker (/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-darwin12.2.0 file names to x86_64-apple-darwin12.2.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin12.2.0 file names to toolchain format... func_convert_file_noop
checking for /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 cc 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... cc -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 cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common -DPIC
checking if cc PIC flag -fno-common -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin12.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... yes
checking for gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... cc -E
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking how to run the C++ preprocessor... c++ -E
checking for ld used by c++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking for c++ option to produce PIC... -fno-common -DPIC
checking if c++ PIC flag -fno-common -DPIC works... yes
checking if c++ static flag -static works... no
checking if c++ supports -c -o file.o... yes
checking if c++ supports -c -o file.o... (cached) yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin12.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking if c++ supports -Wall... yes
checking if c++ supports -Wmissing-prototypes... yes
checking if c++ supports -ffloat-store... no
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
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 for convert... no
configure: WARNING: ImageMagick does not seem to be installed. Documentation cannot be built
checking for xsltproc... /usr/bin/xsltproc
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 liblwgeom 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 pg_config... /opt/boxen/homebrew/opt/postgresql/bin/pg_config
checking PostgreSQL version... PostgreSQL 9.2.4
checking libpq-fe.h usability... yes
checking libpq-fe.h presence... yes
checking for libpq-fe.h... yes
checking for PQserverVersion in -lpq... yes
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... /opt/boxen/homebrew/opt/geos/bin/geos-config
checking GEOS version... 3.3.8
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
Using user-specified proj directory: /opt/boxen/homebrew
checking proj_api.h usability... yes
checking proj_api.h presence... yes
checking for proj_api.h... yes
checking for pj_get_release in -lproj... yes
configure: creating ./config.status
config.status: creating liblwgeom/Makefile
config.status: creating liblwgeom/cunit/Makefile
config.status: creating postgis/Makefile
config.status: creating postgis/sqldefines.h
config.status: creating loader/Makefile
config.status: creating topology/Makefile
config.status: creating regress/Makefile
config.status: creating doc/Makefile
config.status: creating doc/Makefile.comments
config.status: creating doc/html/image_src/Makefile
config.status: creating postgis_config.h
config.status: executing libtool commands
configure: WARNING: unrecognized options: --disable-dependency-tracking
PostGIS is now configured for x86_64-apple-darwin12.2.0
-------------- Compiler Info -------------
C compiler: cc -g -O2
C++ compiler: c++ -g -O2
-------------- Dependencies --------------
GEOS config: /opt/boxen/homebrew/opt/geos/bin/geos-config
GEOS version: 3.3.8
PostgreSQL config: /opt/boxen/homebrew/opt/postgresql/bin/pg_config
PostgreSQL version: PostgreSQL 9.2.4
PROJ4 version: 48
Libxml2 config: /usr/bin/xml2-config
Libxml2 version: 2.7.8
PostGIS debug level: 0
-------- Documentation Generation --------
xsltproc: /usr/bin/xsltproc
xsl style sheets:
dblatex:
convert:
==> make install
make install
/usr/bin/make -C liblwgeom
...... # Removed some cruft to make the gist/error a little easier to read
In file included from postgis.sql.in.c:6168:
./sqlmm.sql.in.c:14:29: warning: missing terminating ' character [-Winvalid-pp-token]
-- currently defined by ESRI's ArcSDE). Since these functions already exist
^
./sqlmm.sql.in.c:17:15: warning: missing terminating ' character [-Winvalid-pp-token]
-- follow ESRI's ArcSDE SQL Specifications and not SQL/MM standards where
^
./sqlmm.sql.in.c:22:12: warning: missing terminating ' character [-Winvalid-pp-token]
-- ESRI's ArcSDE SQL specifications, not SQL/MM specifications.
^
./sqlmm.sql.in.c:31:24: warning: missing terminating ' character [-Winvalid-pp-token]
-- TODO: Implement ESRI's Shape constructors
^
371 warnings generated.
sed 's,MODULE_PATHNAME,$libdir/postgis-1.5,g' postgis.sql.in >postgis.sql
cc -E -traditional-cpp uninstall_postgis.sql.in.c | grep -v '^#' > uninstall_postgis.sql.in
sed 's,MODULE_PATHNAME,$libdir/postgis-1.5,g' uninstall_postgis.sql.in >uninstall_postgis.sql
'/usr/bin/perl' ../utils/postgis_proc_upgrade.pl postgis.sql 1.5 > postgis_upgrade_15_minor.sql
'/usr/bin/perl' ../utils/postgis_proc_upgrade.pl postgis.sql 1.4 > postgis_upgrade_14_to_15.sql
'/usr/bin/perl' ../utils/postgis_proc_upgrade.pl postgis.sql 1.3 > postgis_upgrade_13_to_15.sql
cc -I/opt/boxen/homebrew/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/opt/boxen/homebrew/Cellar/geos/3.3.8/include -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I../liblwgeom -I. -I. -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/server -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o lwgeom_pg.o lwgeom_pg.c
brew: superenv removed: -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I/usr/include/libxml2
cc -I/opt/boxen/homebrew/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/opt/boxen/homebrew/Cellar/geos/3.3.8/include -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I../liblwgeom -I. -I. -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/server -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o lwgeom_debug.o lwgeom_debug.c
brew: superenv removed: -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I/usr/include/libxml2
cc -I/opt/boxen/homebrew/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/opt/boxen/homebrew/Cellar/geos/3.3.8/include -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I../liblwgeom -I. -I. -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/server -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o lwgeom_accum.o lwgeom_accum.c
brew: superenv removed: -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I/usr/include/libxml2
cc -I/opt/boxen/homebrew/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/opt/boxen/homebrew/Cellar/geos/3.3.8/include -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I../liblwgeom -I. -I. -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/server -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o lwgeom_spheroid.o lwgeom_spheroid.c
brew: superenv removed: -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I/usr/include/libxml2
cc -I/opt/boxen/homebrew/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/opt/boxen/homebrew/Cellar/geos/3.3.8/include -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I../liblwgeom -I. -I. -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/server -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o lwgeom_ogc.o lwgeom_ogc.c
brew: superenv removed: -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I/usr/include/libxml2
cc -I/opt/boxen/homebrew/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/opt/boxen/homebrew/Cellar/geos/3.3.8/include -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I../liblwgeom -I. -I. -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/server -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o lwgeom_functions_analytic.o lwgeom_functions_analytic.c
brew: superenv removed: -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I/usr/include/libxml2
cc -I/opt/boxen/homebrew/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/opt/boxen/homebrew/Cellar/geos/3.3.8/include -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I../liblwgeom -I. -I. -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/server -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o lwgeom_inout.o lwgeom_inout.c
brew: superenv removed: -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I/usr/include/libxml2
cc -I/opt/boxen/homebrew/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I/opt/boxen/homebrew/Cellar/geos/3.3.8/include -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I../liblwgeom -I. -I. -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/server -I/opt/boxen/homebrew/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o lwgeom_estimate.o lwgeom_estimate.c
brew: superenv removed: -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -I/opt/boxen/homebrew/include -I/usr/include/libxml2 -I/usr/include/libxml2
lwgeom_estimate.c:318:3: error: use of undeclared identifier 'Form_pg_class'
Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple);
^
lwgeom_estimate.c:319:17: error: use of undeclared identifier 'reltup'
num1_tuples = reltup->reltuples;
^
lwgeom_estimate.c:330:3: error: use of undeclared identifier 'Form_pg_class'
Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple);
^
lwgeom_estimate.c:331:17: error: use of undeclared identifier 'reltup'
num2_tuples = reltup->reltuples;
^
4 errors generated.
make[1]: *** [lwgeom_estimate.o] Error 1
make: *** [postgis] Error 2
==> Configuration
HOMEBREW_VERSION: 0.9.4
HEAD: 0e8ed301a532368b2c2ced0e4e5259143ab7f6be
HOMEBREW_PREFIX: /opt/boxen/homebrew
CPU: 8-core 64-bit nehalem
OS X: 10.8.2-x86_64
CLT: 1.0.0.9000000000.1.1249367152
X11: 2.7.2 => /opt/X11
==> ENV
CC: cc
CXX: c++
CMAKE_PREFIX_PATH: /opt/boxen/homebrew/opt/readline:/opt/boxen/homebrew/opt/ossp-uuid:/opt/boxen/homebrew
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: /opt/boxen/homebrew/opt/ossp-uuid/lib/pkgconfig:/opt/boxen/homebrew/opt/proj/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/boxen/homebrew/Library/ENV/pkgconfig/10.8
OBJC: cc
PATH: /opt/boxen/homebrew/Library/ENV/4.3:/opt/boxen/homebrew/opt/ossp-uuid/bin:/opt/boxen/homebrew/opt/postgresql/bin:/opt/boxen/homebrew/opt/proj/bin:/opt/boxen/homebrew/opt/geos/bin:/usr/bin:/bin:/usr/sbin:/sbin
Error: postgis did not build
Logs: /Users/dev/Library/Logs/Homebrew/postgis/config.log
These open issues may also help:
https://github.com/mxcl/homebrew/issues/19068
https://github.com/mxcl/homebrew/issues/18262
@mriddle
Copy link
Author

mriddle commented Apr 10, 2013

Only seems to blow up on first clean boxen run, running boxen again installs postgis successfully.

Steps to reproduce

./script/boxen --nuke --force
./script/boxen
# Blows up
./script/boxen 
# Works fine

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