Opened 8 years ago

Closed 7 years ago

#3695 closed defect (invalid)

Compiler warnings when building raster

Reported by: dbaston Owned by: dbaston
Priority: medium Milestone: PostGIS 2.5.0
Component: postgis Version: master
Keywords: Cc:

Description

Here's a short excerpt:

In file included from /usr/include/postgresql/9.6/server/c.h:53:0,
                 from /usr/include/postgresql/9.6/server/postgres.h:47,
                 from rtpostgis.c:132:
/usr/include/postgresql/9.6/server/pg_config.h:734:0: note: this is the location of the previous definition
 #define PACKAGE_TARNAME "postgresql"
 ^
In file included from /usr/include/gdal/cpl_port.h:81:0,
                 from /usr/include/gdal/gdal.h:42,
                 from /usr/include/gdal/gdal_alg.h:41,
                 from ../rt_core/librtcore.h:138,
                 from rtpostgis.h:31,
                 from rtpostgis.c:140:
/usr/include/gdal/cpl_config.h:215:0: warning: "PACKAGE_VERSION" redefined
 #define PACKAGE_VERSION ""
 ^
In file included from /usr/include/postgresql/9.6/server/c.h:53:0,
                 from /usr/include/postgresql/9.6/server/postgres.h:47,
                 from rtpostgis.c:132:
/usr/include/postgresql/9.6/server/pg_config.h:740:0: note: this is the location of the previous definition
 #define PACKAGE_VERSION "9.6.1"
 ^
gcc "-I../../liblwgeom"  -fpic -I/usr/include  -I/usr/include/libxml2     -I/usr/include/gdal "-I../../libpgcommon"  -I../rt_core -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o rtpg_internal.o rtpg_internal.c
In file included from /usr/include/gdal/cpl_port.h:81:0,
                 from /usr/include/gdal/gdal.h:42,
                 from /usr/include/gdal/gdal_alg.h:41,
                 from ../rt_core/librtcore.h:138,
                 from rtpostgis.h:31,
                 from rtpg_internal.h:33,
                 from rtpg_internal.c:34:
/usr/include/gdal/cpl_config.h:200:0: warning: "PACKAGE_BUGREPORT" redefined
 #define PACKAGE_BUGREPORT ""
 ^
In file included from /usr/include/postgresql/9.6/server/c.h:53:0,
                 from /usr/include/postgresql/9.6/server/postgres.h:47,
                 from rtpg_internal.c:31:
/usr/include/postgresql/9.6/server/pg_config.h:725:0: note: this is the location of the previous definition
 #define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org"
 ^
In file included from /usr/include/gdal/cpl_port.h:81:0,
                 from /usr/include/gdal/gdal.h:42,
                 from /usr/include/gdal/gdal_alg.h:41,
                 from ../rt_core/librtcore.h:138,
                 from rtpostgis.h:31,
                 from rtpg_internal.h:33,
                 from rtpg_internal.c:34:
/usr/include/gdal/cpl_config.h:203:0: warning: "PACKAGE_NAME" redefined
 #define PACKAGE_NAME ""
 ^
In file included from /usr/include/postgresql/9.6/server/c.h:53:0,
                 from /usr/include/postgresql/9.6/server/postgres.h:47,
                 from rtpg_internal.c:31:
/usr/include/postgresql/9.6/server/pg_config.h:728:0: note: this is the location of the previous definition
 #define PACKAGE_NAME "PostgreSQL"
 ^
In file included from /usr/include/gdal/cpl_port.h:81:0,
                 from /usr/include/gdal/gdal.h:42,
                 from /usr/include/gdal/gdal_alg.h:41,
                 from ../rt_core/librtcore.h:138,
                 from rtpostgis.h:31,
                 from rtpg_internal.h:33,
                 from rtpg_internal.c:34:
/usr/include/gdal/cpl_config.h:206:0: warning: "PACKAGE_STRING" redefined
 #define PACKAGE_STRING ""
 ^
In file included from /usr/include/postgresql/9.6/server/c.h:53:0,
                 from /usr/include/postgresql/9.6/server/postgres.h:47,
                 from rtpg_internal.c:31:
/usr/include/postgresql/9.6/server/pg_config.h:731:0: note: this is the location of the previous definition
 #define PACKAGE_STRING "PostgreSQL 9.6.1"
 ^
In file included from /usr/include/gdal/cpl_port.h:81:0,
                 from /usr/include/gdal/gdal.h:42,
                 from /usr/include/gdal/gdal_alg.h:41,
                 from ../rt_core/librtcore.h:138,
                 from rtpostgis.h:31,
                 from rtpg_internal.h:33,
                 from rtpg_internal.c:34:
/usr/include/gdal/cpl_config.h:209:0: warning: "PACKAGE_TARNAME" redefined
 #define PACKAGE_TARNAME ""
 ^
In file included from /usr/include/postgresql/9.6/server/c.h:53:0,
                 from /usr/include/postgresql/9.6/server/postgres.h:47,
                 from rtpg_internal.c:31:
/usr/include/postgresql/9.6/server/pg_config.h:734:0: note: this is the location of the previous definition
 #define PACKAGE_TARNAME "postgresql"
 ^
In file included from /usr/include/gdal/cpl_port.h:81:0,
                 from /usr/include/gdal/gdal.h:42,
                 from /usr/include/gdal/gdal_alg.h:41,
                 from ../rt_core/librtcore.h:138,
                 from rtpostgis.h:31,
                 from rtpg_internal.h:33,
                 from rtpg_internal.c:34:
/usr/include/gdal/cpl_config.h:215:0: warning: "PACKAGE_VERSION" redefined
 #define PACKAGE_VERSION ""
 ^
In file included from /usr/include/postgresql/9.6/server/c.h:53:0,
                 from /usr/include/postgresql/9.6/server/postgres.h:47,
                 from rtpg_internal.c:31:
/usr/include/postgresql/9.6/server/pg_config.h:740:0: note: this is the location of the previous definition
 #define PACKAGE_VERSION "9.6.1"
 ^
gcc "-I../../liblwgeom"  -fpic -I/usr/include  -I/usr/include/libxml2     -I/usr/include/gdal "-I../../libpgcommon"  -I../rt_core -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.6  -c -o rtpg_spatial_relationship.o rtpg_spatial_relationship.c
In file included from /usr/include/gdal/cpl_port.h:81:0,
                 from /usr/include/gdal/gdal.h:42,
                 from /usr/include/gdal/gdal_alg.h:41,
                 from ../rt_core/librtcore.h:138,
                 from rtpostgis.h:31,
                 from rtpg_spatial_relationship.c:36:
/usr/include/gdal/cpl_config.h:200:0: warning: "PACKAGE_BUGREPORT" redefined
 #define PACKAGE_BUGREPORT ""
 ^
In file included from /usr/include/postgresql/9.6/server/c.h:53:0,
                 from /usr/include/postgresql/9.6/server/postgres.h:47,
                 from rtpg_spatial_relationship.c:30:
/usr/include/postgresql/9.6/server/pg_config.h:725:0: note: this is the location of the previous definition
 #define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org"
 ^
In file included from /usr/include/gdal/cpl_port.h:81:0,
                 from /usr/include/gdal/gdal.h:42,
                 from /usr/include/gdal/gdal_alg.h:41,
                 from ../rt_core/librtcore.h:138,
                 from rtpostgis.h:31,
                 from rtpg_spatial_relationship.c:36:
/usr/include/gdal/cpl_config.h:203:0: warning: "PACKAGE_NAME" redefined
 #define PACKAGE_NAME ""
 ^
In file included from /usr/include/postgresql/9.6/server/c.h:53:0,
                 from /usr/include/postgresql/9.6/server/postgres.h:47,
                 from rtpg_spatial_relationship.c:30:
/usr/include/postgresql/9.6/server/pg_config.h:728:0: note: this is the location of the previous definition
 #define PACKAGE_NAME "PostgreSQL"
 ^
In file included from /usr/include/gdal/cpl_port.h:81:0,
                 from /usr/include/gdal/gdal.h:42,
                 from /usr/include/gdal/gdal_alg.h:41,
                 from ../rt_core/librtcore.h:138,
                 from rtpostgis.h:31,
                 from rtpg_spatial_relationship.c:36:
/usr/include/gdal/cpl_config.h:206:0: warning: "PACKAGE_STRING" redefined

Change History (4)

comment:1 by dbaston, 7 years ago

Milestone: PostGIS 2.4.0PostGIS 2.5.0
Owner: changed from pramsey to dbaston

comment:3 by dbaston, 7 years ago

Trying to figure out why these variables are defined in "/usr/include/gdal/cpl_port.h", when they were apparently removed in 2007:

https://github.com/OSGeo/gdal/commit/a0eae4a9f18388953bfb33af040d066db8a21774

and my system install is from 2015:

gdalinfo --version
GDAL 1.11.3, released 2015/09/16

comment:4 by dbaston, 7 years ago

Resolution: invalid
Status: newclosed

Not clear why my GDAL headers have this stuff, but either way it's not a PostGIS issue.

Note: See TracTickets for help on using tickets.