omniti-labs / pg_amqp

AMQP Support for Postgres
https://labs.omniti.com/labs/pg_amqp
202 stars 61 forks source link

make: /usr/lib64/ccache/clang: No such file or directory (oracle linux 9) #41

Open Ars312 opened 11 months ago

Ars312 commented 11 months ago

make /usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -Xclang -no-opaque-pointers -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-deprecated-non-prototype -O2 -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 src/pg_amqp.bc src/pg_amqp.c make: /usr/lib64/ccache/clang: No such file or directory make: *** [/usr/pgsql-15/lib/pgxs/src/makefiles/../../src/Makefile.global:1081: src/pg_amqp.bc] Error 127

Ars312 commented 4 months ago

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 -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 src/pg_amqp.bc src/pg_amqp.c src/pg_amqp.c:99:10: warning: 5 enumeration values not handled in switch: 'XACT_EVENT_PARALLEL_COMMIT', 'XACT_EVENT_PARALLEL_ABORT', 'XACT_EVENT_PRE_COMMIT'... [-Wswitch] switch(event) { ^~~~~ src/pg_amqp.c:140:21: error: parameter 'broker_id' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] local_amqp_get_a_bs(broker_id) { ^ src/pg_amqp.c:152:19: error: parameter 'broker_id' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] local_amqp_get_bs(broker_id) { ^ src/pg_amqp.c:239:23: error: parameter 'broker_id' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] local_amqp_disconnect(broker_id) { ^ 1 warning and 3 errors generated. make: *** [/usr/pgsql-15/lib/pgxs/src/makefiles/../../src/Makefile.global:1094: src/pg_amqp.bc] Error 1

kumy commented 1 week ago

What about. See PR #43

diff --git a/src/pg_amqp.c b/src/pg_amqp.c
index 1e091ac..2bc03b5 100644
--- a/src/pg_amqp.c
+++ b/src/pg_amqp.c
@@ -137,7 +137,7 @@ void _PG_init() {
 }

 static struct brokerstate *
-local_amqp_get_a_bs(broker_id) {
+local_amqp_get_a_bs(int broker_id) {
   struct brokerstate *bs;
   for(bs = HEAD_BS; bs; bs = bs->next) {
     if(bs->broker_id == broker_id) return bs;
@@ -149,7 +149,7 @@ local_amqp_get_a_bs(broker_id) {
   return bs;
 }
 static struct brokerstate *
-local_amqp_get_bs(broker_id) {
+local_amqp_get_bs(int broker_id) {
   char sql[1024];
   char host_copy[300] = "";
   int tries = 0;
@@ -236,7 +236,7 @@ local_amqp_get_bs(broker_id) {
   return bs;
 }
 static void
-local_amqp_disconnect(broker_id) {
+local_amqp_disconnect(int broker_id) {
   struct brokerstate *bs = local_amqp_get_a_bs(broker_id);
   local_amqp_disconnect_bs(bs);
 }