-
Notifications
You must be signed in to change notification settings - Fork 16
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
ISO C90 forbids variable length array ‘arr’ [-Werror=vla] #17
Comments
I’m not affiliated with the pgsphere team. I just happen to watch this repo. Anyway, I just wanted to suggest that you try adding By the way, there’s also a pgsphere/pgsphere repo. I’m not sure which repo is the best one to open issues with these days, but that repo has shown some activity recently. |
Thanks for helping out. I'll try the pgsphere/pgsphere repo instead. |
@joelonsql did the @esabol 's suggestion work? I'm trying to upgrade from 9.2 to 13.4 and I'm getting the same error. thanks |
What have you tried exactly, @carlosadean ? Are you asking how to add the |
@esabol how shoud I use this flag in the compilation command? |
Try this:
If that doesn't work, replace |
@esabol unfortunately the command and its parameters didn't work and the result is always the same for both. make[1]: Entering directory `/data/PostgreSQL/13.4/src/postgresql-13.4/src/backend'
make -C catalog distprep generated-header-symlinks
make[2]: Entering directory `/data/PostgreSQL/13.4/src/postgresql-13.4/src/backend/catalog'
make[2]: Nothing to be done for `distprep'.
make[2]: Nothing to be done for `generated-header-symlinks'.
make[2]: Leaving directory `/data/PostgreSQL/13.4/src/postgresql-13.4/src/backend/catalog'
make -C utils distprep generated-header-symlinks
make[2]: Entering directory `/data/PostgreSQL/13.4/src/postgresql-13.4/src/backend/utils'
make[2]: Nothing to be done for `distprep'.
make[2]: Nothing to be done for `generated-header-symlinks'.
make[2]: Leaving directory `/data/PostgreSQL/13.4/src/postgresql-13.4/src/backend/utils'
make[1]: Leaving directory `/data/PostgreSQL/13.4/src/postgresql-13.4/src/backend'
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o sscan.o sscan.c
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o sparse.o sparse.c
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o sbuffer.o sbuffer.c
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o vector3d.o vector3d.c
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o point.o point.c
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o euler.o euler.c
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o circle.o circle.c
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o line.o line.c
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o ellipse.o ellipse.c
gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I. -I. -I/data/PostgreSQL/13.4/src/postgresql-13.4/src/include -D_GNU_SOURCE -c -o polygon.o polygon.c
polygon.c: In function ‘spherepoly_in’:
polygon.c:827:3: error: variable length array ‘arr’ is used [-Werror=vla]
SPoint arr[nelem];
^
polygon.c: In function ‘spherepoly_area’:
polygon.c:895:2: error: variable length array ‘s’ is used [-Werror=vla]
SPoint s[poly->npts + 2];
^
cc1: some warnings being treated as errors
make: *** [polygon.o] Error 1 |
I just noticed that the directory in which you are compiling Compiling the source code in the correct location still won't solve the compilation error you are seeing, I think. Two possible solutions:
Or maybe this:
https://github.com/akorotkov/pgsphere/pull/14/files Hope this helps! |
Hi, not sure if this is useful but we have made a docker container for postgres 14, using the fix from https://github.com/mdgomes/pgsphere. It also includes the pg_healpix extension. You will find instructions here. Cheers, |
Hi, some further information, that might be useful. pgSphere is maintained at postgrespro repo. It should work on PostgreSQL 10+ directly. |
Build fails on Ubuntu 20.04.2 LTS running Ubuntu 13.2-1.pgdg20.04+1:
The text was updated successfully, but these errors were encountered: