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

Does not build anymore on my ArchLinux #121

Open
Gonzo2O28 opened this issue Aug 4, 2021 · 7 comments
Open

Does not build anymore on my ArchLinux #121

Gonzo2O28 opened this issue Aug 4, 2021 · 7 comments

Comments

@Gonzo2O28
Copy link

While running make on my nginx i am now getting this:

/tmp/ngx_brotli/deps/brotli/c/enc/encode.c:1473:20: error: argument 5 of type ‘const uint8_t *’ {aka ‘const unsigned char *’} declared as a pointer [-Werror=vla-parameter]

1473 | const uint8_t* input_buffer, size_t* encoded_size,

314 | const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)],

316 | uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]);

Any help/ideas?

@chrme
Copy link

chrme commented Aug 4, 2021

@Gonzo2O28 you have GCC v11? As a temporary solution you can add -Wno-vla-parameter to this command until it's fixed

something like

cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -Wno-vla-parameter -g  -Wno-deprecated-declarations  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules -I src/http/v2 -I ../ngx_brotli/deps/brotli/c/include -o objs/addon/enc/encode.o ../ngx_brotli/deps/brotli/c/enc/encode.c

@Gonzo2O28
Copy link
Author

Yup, gcc11 on ArchLinux here.
Where should i add this?
i am running "./configure" on nginx with --add-module and then "make".

@chrme
Copy link

chrme commented Aug 9, 2021

@Gonzo2O28 after "make" you'll see the last command with error, add to this command "-Wno-vla-parameter" and execute, then run "make" again

@Gonzo2O28
Copy link
Author

That did it!
Thank you ;).

Will it be fixed soon?

@chrme
Copy link

chrme commented Aug 13, 2021

@Gonzo2O28 i don't know, i'm also use this workaround

@Sembiance
Copy link

To those building nginx from source, against ngx_brotli src, with GCC v11, to solve the build error:

  1. Unpack nginx src
  2. cd nginx-*
  3. ./configure --add-module=/path/to/ngx_brotli/ as you normally do
  4. Modify nginx's objs/Makefile and add -Wno-vla-parameter to the end of the CFLAGS line at the top
  5. make && make install as usual

@eustas
Copy link
Collaborator

eustas commented Jan 10, 2022

I believe it was fixed in brotli. Going to pick-up fresh commit in this repo.

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

4 participants