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

Nwchem-7.2.3 fails to compile with gcc-15 -std=gnu23 #1082

Open
marcindulak opened this issue Feb 18, 2025 · 1 comment
Open

Nwchem-7.2.3 fails to compile with gcc-15 -std=gnu23 #1082

marcindulak opened this issue Feb 18, 2025 · 1 comment
Assignees
Labels

Comments

@marcindulak
Copy link

Describe the bug

For 8701f25, the compilation fails on Fedora42, gcc version 15.0.1 20250114 (Red Hat 15.0.1-0) (GCC), with

md5wrap.c: In function ‘checksum_init’:
md5wrap.c:48:5: error: too many arguments to function ‘MD5Init’; expected 0, have 1
   48 |     MD5Init(&context);
                  ^

Attach log files

Build on fedora42 https://koji.fedoraproject.org/koji/taskinfo?taskID=129346569, the log is attached for reference build.log

After applying a fix sed -i 's|-O0 -g|-std=gnu17 -O0 -g|' src/util/md5/GNUmakefile, other errors follow up https://koji.fedoraproject.org/koji/taskinfo?taskID=129347266 build.log

clustrfix.c:140:23: error: prototype for ‘relgap’ declares fewer arguments than previous old-style definition
  140 |   DoublePrecision xj, relgap(), delta1, delta2;
      |                       ^~~~~~
...

It may be possible to silence them individually, but I only successfully tried globally with export CC='gcc -std=gnu17'.

Additional context

The errors appear to be related to https://gcc.gnu.org/gcc-15/changes.html#c

GCC 15 changes the default language version for C compilation from -std=gnu17 to -std=gnu23.

The problem looks similar to GlobalArrays/ga#359

@edoapra edoapra self-assigned this Feb 18, 2025
@edoapra
Copy link
Collaborator

edoapra commented Feb 18, 2025

Same compilation failure when using gcc-14 and -std=gnu23

This was referenced Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants