pgsentinel icon indicating copy to clipboard operation
pgsentinel copied to clipboard

Postgres15 : Make command error

Open nikhil-postgres opened this issue 1 year ago • 1 comments

Hi @bdrouvot , Getting below error during make

/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-deprecated-non-prototype -O2  -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-implicit-fallthrough -Iinclude -I. -I./ -I/usr/pgsql-15/include/server -I/usr/pgsql-15/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o pgsentinel.bc pgsentinel.c
clang-15: error: optimization flag '-fexcess-precision=standard' is not supported [-Werror,-Wignored-optimization-argument]
make: *** [/usr/pgsql-15/lib/pgxs/src/makefiles/../../src/Makefile.global:1094: pgsentinel.bc] Error 1

On RHEL 8.8, could you please help

nikhil-postgres avatar Aug 01 '24 06:08 nikhil-postgres

does that help if you change the Makefile that way?

diff --git a/src/Makefile b/src/Makefile
index d6fbff0..3b45c4a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -5,9 +5,9 @@ MODULE_big = pgsentinel
 OBJS = $(patsubst %.c,%.o,$(wildcard ./*.c))

 ifeq ($(CC),gcc)
-    PG_CPPFLAGS = -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-uninitialized -Wno-implicit-fallthrough -Iinclude
+    PG_CPPFLAGS = -std=c99 -Wno-ignored-optimization-argument -Wall -Wextra -Werror -Wno-unused-parameter -Wno-uninitialized -Wno-implicit-fallthrough -Iinclude
 else
-    PG_CPPFLAGS = -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-implicit-fallthrough -Iinclude
+    PG_CPPFLAGS = -std=c99 -Wno-ignored-optimization-argument -Wall -Wextra -Werror -Wno-unused-parameter -Wno-implicit-fallthrough -Iinclude
 endif

 EXTRA_CLEAN += $(addprefix ./,*.gcno *.gcda)

bdrouvot avatar Aug 07 '24 07:08 bdrouvot