[PostGIS] #5880: compile errors on PostGIS 3.1
PostGIS
trac at osgeo.org
Mon Apr 14 20:45:13 PDT 2025
#5880: compile errors on PostGIS 3.1
----------------------+----------------------------
Reporter: robe | Owner: robe
Type: defect | Status: assigned
Priority: blocker | Milestone: PostGIS 3.1.13
Component: postgis | Version: 3.1.x
Resolution: | Keywords:
----------------------+----------------------------
Comment (by robe):
Looks like gha is complaining about this lwerror too, I tried running the
PG13/geos3.8 job
{{{
-------------- Compiler Info -------------
C compiler: gcc -std=gnu99 -g -O2 -mtune=generic -fno-omit-
frame-pointer -Werror -Wall -Wextra -Wformat -Werror=format-security -Wno-
unused-parameter -Wno-implicit-fallthrough -Wno-unknown-warning-option
-Wno-cast-function-type -fno-math-errno -fno-signed-zeros
C++ compiler (Wagyu): gcc -std=c++11 -x c++
CPPFLAGS: -I/usr/local/include -I/usr/local/include
-I/usr/include/libxml2 -I/usr/local/include -I/usr/include/json-c
-DNDEBUG
LDFLAGS: -Wl,-Bsymbolic-functions -Wl,-z,relro -lm
SQL preprocessor: /usr/bin/cpp -traditional-cpp -w -P -Upixel -Ubool
-------------- Additional Info -------------
Interrupt Tests: DISABLED use: --with-interrupt-tests to enable
-------------- Dependencies --------------
GEOS config: /usr/local/bin/geos-config
GEOS version: 3.8.2dev
GDAL config: /usr/local/bin/gdal-config
GDAL version: 3.1.4
SFCGAL config: /usr/local/bin/sfcgal-config
SFCGAL version: 1.3.9
PostgreSQL config: /usr/local/pgsql/bin/pg_config
PostgreSQL version: PostgreSQL 13.1
PROJ4 version: 71
Libxml2 config: /usr/bin/xml2-config
Libxml2 version: 2.9.10
JSON-C support: yes
protobuf support: yes
protobuf-c version: 1003003
PCRE support: yes
Perl: /usr/bin/perl
Wagyu: yes
--------------- Extensions ---------------
PostGIS Raster: enabled
PostGIS Topology: enabled
SFCGAL support: enabled
Address Standardizer support: enabled
math-errno -fno-signed-zeros -fPIC -DPIC -DRYU_NO_TRAILING_ZEROS -c -o
d2s.lo d2s.c
lwgeom_api.c:139:3: error: implicit declaration of function 'lerror'; did
you mean 'perror'? [-Werror=implicit-function-declaration]
139 | lerror("%s [%d] called with n=%d and npoints=%d", __FILE__,
__LINE__, n, pa->npoints);
| ^~~~~~
| perror
}}}
woodie is also not happy:
https://woodie.osgeo.org/repos/30/pipeline/2965/6
{{{
-------------- Compiler Info -------------
C compiler: gcc -std=gnu99 -g -O2 -fno-math-errno -fno-signed-
zeros
C++ compiler (Wagyu): gcc -std=c++11 -x c++
CPPFLAGS: -I/usr/local/include -I/usr/local/include
-I/usr/include/libxml2 -I/usr/include -I/usr/include/json-c -DNDEBUG
LDFLAGS: -lm
SQL preprocessor: /usr/bin/cpp -traditional-cpp -w -P -Upixel -Ubool
-------------- Additional Info -------------
Interrupt Tests: DISABLED use: --with-interrupt-tests to enable
-------------- Dependencies --------------
GEOS config: /usr/local/bin/geos-config
GEOS version: 3.10.6
GDAL config: /usr/local/bin/gdal-config
GDAL version: 3.4.3
SFCGAL config: /usr/bin/sfcgal-config
SFCGAL version: 1.3.7
PostgreSQL config: /usr/lib/postgresql/13/bin/pg_config
PostgreSQL version: PostgreSQL 13.18 (Ubuntu 13.18-1.pgdg20.04+1)
PROJ4 version: 63
Libxml2 config: /usr/bin/xml2-config
Libxml2 version: 2.9.10
JSON-C support: yes
protobuf support: yes
protobuf-c version: 1004001
PCRE support: no
Perl: /usr/bin/perl
Wagyu: yes
--------------- Extensions ---------------
PostGIS Raster: enabled
PostGIS Topology: enabled
SFCGAL support: enabled
Address Standardizer support: disabled
libtool: link: ranlib .libs/liblwgeom.a
libtool: link: rm -fr .libs/liblwgeom.lax
libtool: link: ( cd ".libs" && rm -f "liblwgeom.la" && ln -s
"../liblwgeom.la" "liblwgeom.la" )
make[3]: Leaving directory
'/woodpecker/src/git.osgeo.org/gitea/postgis/postgis/liblwgeom'
gcc -I../../../liblwgeom -std=gnu99 -g -O2 -fno-math-errno -fno-signed-
zeros -c -o styles.o styles.c
gcc -I../../../liblwgeom -std=gnu99 -g -O2 -fno-math-errno -fno-signed-
zeros -c -o generator.o generator.c
In file included from /usr/include/string.h:495,
from generator.c:33:
In function 'strncat',
inlined from 'main' at generator.c:355:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning:
'__builtin_strncat' specified bound depends on the length of the source
argument [-Wstringop-overflow=]
136 | return __builtin___strncat_chk (__dest, __src, __len, __bos
(__dest));
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
generator.c: In function 'main':
generator.c:355:30: note: length computed here
355 | strncat( filename, argv[1], strlen(argv[1])-3 );
| ^~~~~~~~~~~~~~~
/bin/bash ../../../libtool --mode=link \
gcc -o generator styles.o generator.o ../../../liblwgeom/liblwgeom.la -lm
-lcunit
libtool: link: gcc -o generator styles.o generator.o
../../../liblwgeom/.libs/liblwgeom.a -L/usr/local/lib -lgeos_c
/usr/lib/x86_64-linux-gnu/libproj.so -ljson-c -L/usr/lib/x86_64-linux-gnu
-lSFCGAL -lgmpxx -lm -lcunit
/usr/bin/ld: ../../../liblwgeom/.libs/liblwgeom.a(lwgeom_api.o): in
function `getPoint4d_p':
/woodpecker/src/git.osgeo.org/gitea/postgis/postgis/liblwgeom/lwgeom_api.c:139:
undefined reference to `lerror'
collect2: error: ld returned 1 exit status
make[2]: Leaving directory
'/woodpecker/src/git.osgeo.org/gitea/postgis/postgis/doc/html/image_src'
make[1]: Leaving directory
'/woodpecker/src/git.osgeo.org/gitea/postgis/postgis/doc'
make[2]: *** [Makefile:196: generator] Error 1
make[1]: *** [Makefile:347: images] Error 2
make: *** [GNUmakefile:130: docs] Error 2
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5880#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list