[CP2K-user] [CP2K:19392] Re: cp2k compilation fail on grid_cpu_collocate.c

Ole Schütt ole.schuett at cp2k.org
Thu Oct 19 10:44:32 UTC 2023


Hi Mario,

> The variable DBL_DECIMAL_DIG; is now declared in cfloat.h not anymore in 
float.h

I believe this only applies to C++. Since grid_cpu_collocate.c is a C file, 
the float.h header should still be correct.

Your build probably fails because you selected an older standard. The 
DBL_DECIMAL_DIG macro was only added in the C11.

-Ole

On Thursday, October 19, 2023 at 5:33:12 AM UTC+2 Mario A Bianchet wrote:

> Hello 
> cp2k 2023.2 verion
> The variable  DBL_DECIMAL_DIG; is  now declared in cfloat.h not anymore in 
> float.h
> error:
>
>     327       47 |   const int D = DBL_DECIMAL_DIG;
>      328          |                 ^~~~~~~~~~~~~~~
>      329          |                 DECIMAL_DIG
>      330   
>  /tmp/mbianch1/spack-stage/spack-stage-cp2k-2023.2-du533sl6bhg7revw3abcejktx7qaqm3w/spack-src/src/grid/cpu/grid_cpu_collocate.c:47:17: 
> note: each undeclared identifier is reported only once ,,,
>
> Mario
>

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/f6eb2a2b-9ca7-431d-a64a-ff56b93d9957n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20231019/32050164/attachment.htm>


More information about the CP2K-user mailing list