Opened 9 years ago
Closed 7 years ago
#3506 closed defect (worksforme)
build variable not defined ? configure should error out if SQL Preprocessor is not picked up
Reported by: | darkblueb | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.4.0 |
Component: | postgis | Version: | 2.2.x |
Keywords: | autotools, make | Cc: |
Description
something is mysteriously failing in the build — autotools generated environment variables ? no idea.. This is reproducible (for me) on Ubuntu 1404, with PostGIS versions tag 221, and 22branch; It could be something about this server, as it is used for other things too ! But the bug is that configure
is not failing, and a spurious error is generated later about VERSION.
—-
srcs_i7d/postgis_221$ make clean; ./autogen.sh && ./configure && make
... I../libpgcommon postgis.sql.in | grep -v '^#' | \ /usr/bin/perl -lpe "s'MODULE_PATHNAME'\$libdir/postgis-2.2'g" > postgis.sql /bin/sh: 1: I../libpgcommon: not found /usr/bin/perl ../utils/create_undef.pl postgis.sql 94 > uninstall_postgis.sql /usr/bin/perl ../utils/postgis_proc_upgrade.pl postgis.sql UNUSED > postgis_upgrade.sql.in Unable to locate target new version number in postgis.sql Makefile:161: recipe for target 'postgis_upgrade.sql.in' failed make[1]: *** [postgis_upgrade.sql.in] Error 255 make[1]: *** Deleting file 'postgis_upgrade.sql.in' make[1]: Leaving directory '/home/shared/srcs_i7d/postgis_221/postgis'
Attachments (1)
Change History (19)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
It sounds like SQLPP being missing, should be checked against output of ./configure
comment:3 by , 9 years ago
Milestone: | PostGIS 2.2.2 → PostGIS 2.2.3 |
---|
comment:4 by , 8 years ago
This still going on? Looking at configure.ac
I don't see how you could get into a state w/o SQLPP defined, it's got a guard on the empty-value case.
comment:5 by , 8 years ago
ugh - revisited today.. same bat-server, same bat-error.. It is Ubuntu 1404 and apt.postgresql.org installed pg 9.4 and pg 9.5 both.. you know, port 5433 for the second "cluster" ..
I updated my source tree with PostGIS svn version 15045, then
PG_CONFIG=/usr/lib/postgresql/9.5/bin/pg_config ./configure PG_CONFIG=/usr/lib/postgresql/9.5/bin/pg_config make
the error changes slightly if you omit the second PG_CONFIG and call make alone. Its probably me, but, this is occurring reproducibly.
here is the output
$ PG_CONFIG=/usr/lib/postgresql/9.5/bin/pg_config ./configure ... config.status: executing po-directories commands PostGIS is now configured for x86_64-unknown-linux-gnu -------------- Compiler Info ------------- C compiler: gcc -g -O2 SQL preprocessor: -------------- Dependencies -------------- GEOS config: /usr/local/bin/geos-config GEOS version: 3.5.1 GDAL config: /usr/local/bin/gdal-config GDAL version: 2.1.0 PostgreSQL config: /usr/lib/postgresql/9.5/bin/pg_config PostgreSQL version: PostgreSQL 9.5.4 PROJ4 version: 48 Libxml2 config: /usr/bin/xml2-config Libxml2 version: 2.9.1 JSON-C support: yes PCRE support: yes PostGIS debug level: 0 Perl: /usr/bin/perl --------------- Extensions --------------- PostGIS Raster: enabled PostGIS Topology: enabled SFCGAL support: disabled Address Standardizer support: enabled -------- Documentation Generation -------- xsltproc: /usr/bin/xsltproc xsl style sheets: /usr/share/xml/docbook/stylesheet/nwalsh dblatex: convert: /usr/bin/convert mathml2.dtd: http://www.w3.org/Math/DTD/mathml2/mathml2.dtd $ PG_CONFIG=/usr/lib/postgresql/9.5/bin/pg_config make ... gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -fno-omit-frame-pointer -fpic -shared -o postgis-2.3.so postgis_module.o lwgeom_accum.o lwgeom_spheroid.o lwgeom_ogc.o lwgeom_functions_analytic.o lwgeom_inout.o lwgeom_functions_basic.o lwgeom_btree.o lwgeom_box.o lwgeom_box3d.o lwgeom_geos.o lwgeom_backend_api.o lwgeom_geos_prepared.o lwgeom_geos_clean.o lwgeom_geos_relatematch.o lwgeom_export.o lwgeom_in_gml.o lwgeom_in_kml.o lwgeom_in_geohash.o lwgeom_in_geojson.o lwgeom_in_encoded_polyline.o lwgeom_triggers.o lwgeom_dump.o lwgeom_dumppoints.o lwgeom_functions_lrs.o lwgeom_functions_temporal.o long_xact.o lwgeom_sqlmm.o lwgeom_rtree.o lwgeom_transform.o lwgeom_window.o gserialized_typmod.o gserialized_gist_2d.o gserialized_gist_nd.o brin_2d.o brin_nd.o brin_common.o gserialized_estimate.o geography_inout.o geography_btree.o geography_measurement.o geography_measurement_trees.o geometry_inout.o -L/usr/lib/x86_64-linux-gnu -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed ../libpgcommon/libpgcommon.a ../liblwgeom/.libs/liblwgeom.a -L/usr/local/lib -lgeos_c -lproj -ljson-c -lxml2 -Wl,--exclude-libs,ALL I../libpgcommon postgis.sql.in | grep -v '^#' | \ /usr/bin/perl -lpe "s'MODULE_PATHNAME'\$libdir/postgis-2.3'g;s'@extschema@\.''g" > postgis.sql /bin/sh: 1: I../libpgcommon: not found I../libpgcommon postgis.sql.in | grep -v '^#' | \ /usr/bin/perl -lpe "s'MODULE_PATHNAME'\$libdir/postgis-2.3'g" > postgis_for_extension.sql /bin/sh: 1: I../libpgcommon: not found /usr/bin/perl ../utils/create_undef.pl postgis.sql 95 > uninstall_postgis.sql /usr/bin/perl ../utils/postgis_proc_upgrade.pl postgis.sql UNUSED > postgis_upgrade.sql.in Unable to locate target new version number in postgis.sql Makefile:189: recipe for target 'postgis_upgrade.sql.in' failed make[1]: *** [postgis_upgrade.sql.in] Error 255 make[1]: *** Deleting file 'postgis_upgrade.sql.in' make[1]: Leaving directory '/home/shared/srcs_i7d/postgis_trunk/postgis' GNUmakefile:16: recipe for target 'all' failed make: *** [all] Error 1
comment:6 by , 8 years ago
You have postgresql-server-dev-9.5 package installed right?
I thought that gives you a less cryptic error, like dev package required, but I forget.
comment:7 by , 8 years ago
server-dev supplies the pg_config
/var/cache/apt/archives/postgresql-server-dev-9.5_9.5.4-1.pgdg14.04+1_amd64.deb
comment:8 by , 8 years ago
darkblue_b are you all set with this. I thought you said you figured out the issue. If so put it here for posterity and close out.
comment:9 by , 8 years ago
Milestone: | PostGIS 2.2.3 → PostGIS 2.4.0 |
---|
comment:12 by , 8 years ago
VERSION is a false lead.. postgis.sql fails to build and afterwards, VERSION is not found because the whole file is empty .. looking more closely at postgis/Makefile #158 area
by , 8 years ago
Attachment: | postgis-makefile-miss0.png added |
---|
compare of an incomplete Makefile output versus stock output
comment:13 by , 8 years ago
Hey Brian,
I found this interesting tidbit of a guy having what looks like similar issue to yours. His was on Solaris, but still could be the same issue. https://lists.osgeo.org/pipermail/postgis-users/2014-March/038761.html
Thanks, but I figured out the problem after a little more digging. The problem was that on solaris 11.1, /usr/bin/gcc is a symlink pointing to /usr/gcc/4.5/bin/gcc and /usr/bin was in the PATH env var, but there is no corresponding symlink for cpp. After putting /usr/gcc/4.5/bin in the path, the configure script was able to find cpp and set SQLPP appropriately. Unfortunately the build fails further down with some linkling problems, but I'll do a little more research on my own before following up on the mailing list. Thanks again for the help! Much appreciated!
— NEVERMIND THIS NOTE, my Ubuntu 15.04 returns unknown too, but I can make and compile just fine —-
I'm not near an Ubuntu machine at moment, but I don't recall the gcc registering itself as
x86_64-unknown-linux-gnu like yours does. granted I've never paid that close attention
comment:14 by , 8 years ago
Brian,
Just curious what your cpp returns
cpp --verion return this for me: cpp (Ubuntu 4.9.2-10ubuntu13) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Anyway the ultimate problem seems to me as strk suggested is that SQL preprocessor is not being picked up which would suggest something wrong with you cpp configuration.
Note how my configure on Ubuntu returns this:
-------------- Compiler Info ------------- C compiler: gcc -g -O2 SQL preprocessor: /usr/bin/cpp -traditional-cpp -w -P -------------- Dependencies --------------
And your SQL preprocessor line reads:
-------------- Compiler Info ------------- C compiler: gcc -g -O2 SQL preprocessor:
so you got to figure out what's up with your cpp.
comment:15 by , 8 years ago
yes - this looks right .. 'SQL preprocessor' not defined would fit with the symptoms here.. Small nit - the PostGIS build is fragile in an unexpected way, rather than 'cpp broken' here, since I used the package manager to install all the dev-tools, and I build other software fairly regularly.
meanwhile,
dbb@i7d:/home/shared$ cpp --version cpp (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
comment:16 by , 8 years ago
So where is your cpp installed. I'm wondering if one of the path settings is getting in the way.
There was as I recall some funkiness with order of PGXS which sometimes kicked in a bogus Perl. I don't think that's the issue here though.
FWIW, I have 2 PostgreSQL installed on my Ubuntu box as well. 9.4 and 9.6 both installed from apt-postgresql packages.
comment:17 by , 8 years ago
Summary: | build variable not defined ? → build variable not defined ? configure should error out if SQL Preprocessor is not picked up |
---|
I notice you have
That looks pretty suspicious. So it seem slike you libpgcommon include might be missing.
I would expect Ubuntu build log to look pretty much like debbie's debian build which for 2.2. looks like this for building libpgcommon:
http://debbie.postgis.net:8080/job/PostGIS_Regress/3473/consoleFull