Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install (compilation) fails on debian bullseye, postgres 14 #4

Closed
wscherphof opened this issue Sep 9, 2022 · 3 comments
Closed

Install (compilation) fails on debian bullseye, postgres 14 #4

wscherphof opened this issue Sep 9, 2022 · 3 comments

Comments

@wscherphof
Copy link

On pgxn install range_agg, I get the following error:

#37 0.737 INFO: best version: range_agg 1.2.1
#37 0.967 INFO: saving /tmp/tmpaq0o71ft/range_agg-1.2.1.zip
#37 0.972 INFO: unpacking: /tmp/tmpaq0o71ft/range_agg-1.2.1.zip
#37 0.977 INFO: building extension
#37 1.003 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. -I./ -I/usr/include/postgresql/14/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2   -c -o range_agg.o range_agg.c
#37 1.060 In file included from range_agg.c:22:
#37 1.060 util.c:6:1: error: static declaration of ‘range_union_internal’ follows non-static declaration
#37 1.060     6 | range_union_internal(TypeCacheEntry *typcache, RangeType *r1, RangeType *r2,
#37 1.060       | ^~~~~~~~~~~~~~~~~~~~
#37 1.060 In file included from range_agg.c:8:
#37 1.060 /usr/include/postgresql/14/server/utils/rangetypes.h:120:19: note: previous declaration of ‘range_union_internal’ was here
#37 1.060   120 | extern RangeType *range_union_internal(TypeCacheEntry *typcache, RangeType *r1,
#37 1.060       |                   ^~~~~~~~~~~~~~~~~~~~
#37 1.073 gmake: *** [<builtin>: range_agg.o] Error 1
#37 1.073 ERROR: command returned 2: gmake PG_CONFIG=/usr/bin/pg_config all

When I search for error: static declaration of follows non-static declaration, I find: https://stackoverflow.com/questions/3148244/how-to-solve-static-declaration-follows-non-static-declaration-in-gcc-c-code/3148354#3148354

I'm not C-literate, so not really able to compile a PR with a suggested fix.

Can you help?

@wscherphof
Copy link
Author

On debian stretch, postgres 10, it succeeds.

@wscherphof
Copy link
Author

Okay, I found out that in PostgreSQL 14, a native range_agg function is available.
Since compilation of the extension succeeds up till PostgreSQL 13, there's no real issue in practice.

@pjungwir
Copy link
Owner

Hi @wscherphof, sorry for the delayed response; I was offline all week. It sounds like you are all set now, but if you still need any help, please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants