Opened 7 months ago
Last modified 6 days ago
#5733 new defect
Mixed use of compilers to build sources
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.6.0 |
Component: | build | Version: | 3.4.x |
Keywords: | Cc: |
Description
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.
Change History (8)
comment:1 by , 7 months ago
comment:4 by , 6 months ago
@strk we need to remove PGXS from our logic. We should do so before PostGIS 3.5. I thought I had this ticketed somewhere.
The plan of PostgreSQL group is to get rid of PGXS and autoconf in favor of Meson. They've already switched most of their buildfarms to test using meson. E.g there msys/mingw no longer tests with autoconf, uses meson strictly. Last I checked they are working out some kinks with VS Studio (the usual problem child).
That said I believe Meson is the official build tool for PG17 and up. Come PG18 or later, they plan to completely remove autoconf.
follow-up: 7 comment:5 by , 6 months ago
ah yes have it ticketed at #5281.
I've set to do for 3.5.0 milestone
comment:6 by , 4 months ago
Milestone: | PostGIS 3.4.3 → PostGIS 3.4.4 |
---|
comment:7 by , 3 months ago
comment:8 by , 6 days ago
Milestone: | PostGIS 3.4.4 → PostGIS 3.6.0 |
---|
A possible way to disable llvm: https://www.postgresql.org/message-id/CACpMh%2BBAM9j6ML%3DeaS3i7uW%3DzOzkzOuwv%3D%2BfHiMhstKhCt%3DwvQ%40mail.gmail.com
Whether or not we want to do that I'm not sure.