View Ticket
Not logged in
Ticket Hash: d5c8f926be74723c7bea6d4886a54eb2daa892a2
Title: Build failure with stricter C compielrs (e.g. GCC 14)
Status: Open Type: Build_Problem
Severity: Important Priority:
Subsystem: Resolution:
Last Modified: 2023-12-05 10:50:24
Version Found In: 5.1.0
User Comments:
anonymous added on 2023-12-05 10:50:24:

When building with the following ./configure arguments:

./configure --disable-gcp --disable-examples --disable-static --enable-epsg --enable-geocallbacks --disable-rttopo --disable-geos --disable-geosadvanced --enable-iconv --enable-proj --disable-freexl --enable-libxml2

I get the following build failure:

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../. -I../.././src/headers/spatialite -I../../src/headers -I. -O3 -march=native -fno-semantic-interposition -pipe -Wa,-O2 -Wa,-mtune=znver2 -fcf-protection=none -fdiagnostics-color=always -fdiagnostics-urls=never -frecord-gcc-switches -ggdb3 -Wformat -Wformat-security -Waddress -Warray-bounds -Wfree-nonheap-object -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Wint-conversion -Wint-to-pointer-cast -Wmain -Wnonnull -Wodr -Wreturn-type -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstring-compare -Wuninitialized -Wvarargs -I/usr/include/libxml2 -DLOADABLE_EXTENSION -O3 -march=native -fno-semantic-interposition -pipe -Wa,-O2 -Wa,-mtune=znver2 -fcf-protection=none -fdiagnostics-color=always -fdiagnostics-urls=never -frecord-gcc-
switches -ggdb3 -Wformat -Wformat-security -Waddress -Warray-bounds -Wfree-nonheap-object -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Wint-conversion -Wint-to-pointer-cast -Wmain -Wnonnull -Wodr -Wreturn-type -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstring-compare -Wuninitialized -Wvarargs -c gg_advanced.c  -fPIC -DPIC -o .libs/gaiageo_la-gg_advanced.o                       gg_advanced.c: In function ‘gaiaIsToxic_r’:                                                                                                                                                                     gg_advanced.c:2311:21: error: implicit declaration of function ‘gaiaSetGeosAuxErrorMsg_r’; did you mean ‘gaiaSetProjErrorMsg_r’? [-Wimplicit-function-declaration]                                               2311 |                     gaiaSetGeosAuxErrorMsg_r                                                                                                                                                                  |                     ^~~~~~~~~~~~~~~~~~~~~~~~
      |                     gaiaSetProjErrorMsg_r
gg_advanced.c:2315:21: error: implicit declaration of function ‘gaiaSetGeosAuxErrorMsg’ [-Wimplicit-function-declaration]
 2315 |                     gaiaSetGeosAuxErrorMsg
      |                     ^~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:578: gaiageo_la-gg_advanced.lo] Error 1

GCC 14 will make implicit function declarations an error by default.