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

[Bug] Use -std=c99 for centos:7 build #1709

Closed
marisn opened this issue Jul 4, 2021 · 4 comments
Closed

[Bug] Use -std=c99 for centos:7 build #1709

marisn opened this issue Jul 4, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@marisn
Copy link
Contributor

marisn commented Jul 4, 2021

As C99 is now considered to be OK, we need to adjust our automatic tests to accept C99 (should it be -std=gnu99 to match other tests?). This change is only needed if GRASS is compiled with GCC older than 5.1.0.
From GitHub automatic build error log (PR #1501):

iclass_signatures.c:52:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (unsigned int i = refer->nfiles; i--;) {
     ^
iclass_signatures.c:52:5: note: use option -std=c99 or -std=gnu99 to compile your code
@marisn marisn added the bug Something isn't working label Jul 4, 2021
@nilason
Copy link
Contributor

nilason commented Jul 4, 2021

I stumbled upon this too in #1401 (comment).

@marisn
Copy link
Contributor Author

marisn commented Jul 8, 2021

It seems that we must upgrade autotools to more recent version where automatic switch to C11 is done by default. Although a separate check to fail if compiler does not support C11 might be needed.

@wenzeslaus
Copy link
Member

We can also switch to CentOS 8 if that helps or follow CentOS Stream (I'm not sure how useful testing on latest CentOS is) or remove the CentOS build completely (it is partially Conda anyway, so again, I'm not sure if it is worth it, it seemed like the only way when I initially wrote it). Opinions?

@marisn
Copy link
Contributor Author

marisn commented Aug 24, 2021

There is a workaround in the master. Closing as autotools upgrade is tracked in #560

@marisn marisn closed this as completed Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants