[PostGIS] #5733: Mixed use of compilers to build sources

PostGIS trac at osgeo.org
Tue May 21 13:10:27 PDT 2024


#5733: Mixed use of compilers to build sources
--------------------+---------------------------
 Reporter:  strk    |      Owner:  strk
     Type:  defect  |     Status:  new
 Priority:  medium  |  Milestone:  PostGIS 3.4.3
Component:  build   |    Version:  3.4.x
 Keywords:          |
--------------------+---------------------------
 As odd as it seems, running `make` ends up using a mix of `gcc` and
 `clang-14` on my system. Even for the same file.
 For example, under raster/rt_pg, an extract of the build logs:

 grep rtpg_pixel.c build.log # returns:
 {{{
 gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-
 statement -Werror=vla -Wendif-labels -Wmissing-format-attribute
 -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-
 strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation
 -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -fno-omit-frame-pointer -fPIC -I../../liblwgeom
 -I../../liblwgeom -I/usr/local/include  -I/usr/include/x86_64-linux-gnu
 -I/usr/include/libxml2  -I/usr/include/json-c   -DNDEBUG -std=gnu99 -O2 -g
 -Wall -Wsuggest-attribute=format -fno-math-errno -fno-signed-zeros -Wall
 -O2 -I/usr/local/include -I../../libpgcommon -I/usr/include/x86_64-linux-
 gnu -I./../rt_core -I. -I./.. -I../.. -I. -I./
 -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal
 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c
 -o rtpg_pixel.o rtpg_pixel.c
 /usr/bin/clang-14 -Wno-ignored-attributes -fno-strict-aliasing -fwrapv
 -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2
 -I../../liblwgeom -I../../liblwgeom -I/usr/local/include
 -I/usr/include/x86_64-linux-gnu   -I/usr/include/libxml2
 -I/usr/include/json-c   -DNDEBUG -std=gnu99 -O2 -g -Wall -Wsuggest-
 attribute=format -fno-math-errno -fno-signed-zeros -Wall -O2
 -I/usr/local/include -I../../libpgcommon -I/usr/include/x86_64-linux-gnu
 -I./../rt_core -I. -I./.. -I../.. -I. -I./
 -I/usr/include/postgresql/15/server -I/usr/include/postgresql/internal
 -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2
 -flto=thin -emit-llvm -c -o rtpg_pixel.bc rtpg_pixel.c
 }}}

 It does look like something about LLVM but I don't see where that line
 comes from. I guess it's from PGXS.

 The problem with this mix of compilers is that the same CFLAGS are passed
 to both but some flags are only supported by one compiler and not the
 other.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5733>
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