tvondra / tdigest

PostgreSQL extension for estimating percentiles using t-digest
PostgreSQL License
88 stars 13 forks source link

PostgreSQL 16 support #25

Closed devrimgunduz closed 1 year ago

devrimgunduz commented 1 year ago

Hi,

tdigest 1.4.0 fails to build against v16 beta1. Can you please take a look? Thanks! Devrim

/usr/lib64/ccache/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 -O2 -I. -I./ -I/usr/pgsql-16/include/server -I/usr/pgsql-16/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o tdigest.bc tdigest.c tdigest.c: In function 'tdigest_in': tdigest.c:2662:33: warning: declaration of 'mean' shadows a previous local [-Wshadow=compatible-local] 2662 double mean = digest->centroids[i].mean; ^~~~ tdigest.c:2642:25: note: shadowed declaration is here 2642 double mean; ^~~~ tdigest.c: In function 'tdigest_add_double_count_trimmed': tdigest.c:3061:41: warning: declaration of 'i' shadows a previous local [-Wshadow=compatible-local] 3061 int i; ^ tdigest.c:2995:25: note: shadowed declaration is here 2995 int i; ^ In file included from /usr/pgsql-16/include/server/utils/array.h:64, from tdigest.c:17: tdigest.c: In function 'double_to_array': tdigest.c:3420:31: warning: passing argument 1 of 'PointerGetDatum' makes pointer from integer without a cast [-Wint-conversion] 3420 PG_RETURN_ARRAYTYPE_P(makeArrayResult(astate, ^~~~~~~
Datum {aka long unsigned int}
3421 CurrentMemoryContext));
~~~~~

/usr/pgsql-16/include/server/fmgr.h:361:53: note: in definition of macro 'PG_RETURN_POINTER' 361 | #define PG_RETURN_POINTER(x) return PointerGetDatum(x) | ^ tdigest.c:3420:9: note: in expansion of macro 'PG_RETURN_ARRAYTYPE_P' 3420 | PG_RETURN_ARRAYTYPE_P(makeArrayResult(astate, | ^~~~~ In file included from tdigest.c:15: /usr/pgsql-16/include/server/postgres.h:322:29: note: expected 'const void ' but argument is of type 'Datum' {aka 'long unsigned int'} 322 | PointerGetDatum(const void X) | ~~~~^ gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -fPIC -fvisibility=hidden -shared -o tdigest.so tdigest.o -L/usr/pgsql-16/lib -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-16/lib',--enable-new-dtags -fvisibility=hidden -fvisibility=hidden tdigest.c:3420:24: error: incompatible integer to pointer conversion passing 'Datum' (aka 'unsigned long') to parameter of type 'const void *' [-Wint-conversion] PG_RETURN_ARRAYTYPE_P(makeArrayResult(astate, ^~~~~~~ /usr/pgsql-16/include/server/utils/array.h:258:54: note: expanded from macro 'PG_RETURN_ARRAYTYPE_P'

define PG_RETURN_ARRAYTYPE_P(x) PG_RETURN_POINTER(x)

                                                        ^

/usr/pgsql-16/include/server/fmgr.h:361:53: note: expanded from macro 'PG_RETURN_POINTER'

define PG_RETURN_POINTER(x) return PointerGetDatum(x)

                                                ^

/usr/pgsql-16/include/server/postgres.h:322:29: note: passing argument to parameter 'X' here PointerGetDatum(const void *X) ^ 1 error generated. make[1]: *** [/usr/pgsql-16/lib/pgxs/src/makefiles/.

devrimgunduz commented 1 year ago

Ping

devrimgunduz commented 1 year ago

@tvondra ping

devrimgunduz commented 1 year ago

Can you please release a new version, so that I can build packages? Thanks!

thanodnl commented 1 year ago

I have tagged as v1.4.1. Thanks for packaging!

Let me know if there are any more problems.