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

Compiling with GCC 14 #1360

Open
papoteur-mga opened this issue Aug 21, 2024 · 0 comments
Open

Compiling with GCC 14 #1360

papoteur-mga opened this issue Aug 21, 2024 · 0 comments

Comments

@papoteur-mga
Copy link

Hello,
I'm trying to build netcdf4 -python in for Mageia Cauldron.
I get this errors:

 gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -DNC_COMPLEX_NO_EXPORT=1 -I/usr/include -I/usr/lib64/python3.12/site-packages/numpy/_core/include -Iinclude -Iexternal/nc_complex/include -Iexternal/nc_complex/include/generated_fallbacks -I/usr/include/python3.12 -c external/nc_complex/src/nc_complex.c -o build/temp.linux-x86_64-cpython-312/external/nc_complex/src/nc_complex.o
  gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wformat -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -m64 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection=full -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -DNC_COMPLEX_NO_EXPORT=1 -I/usr/include -I/usr/lib64/python3.12/site-packages/numpy/_core/include -Iinclude -Iexternal/nc_complex/include -Iexternal/nc_complex/include/generated_fallbacks -I/usr/include/python3.12 -c src/netCDF4/_netCDF4.c -o build/temp.linux-x86_64-cpython-312/src/netCDF4/_netCDF4.o
  In file included from include/mpi-compat.h:7,
                   from src/netCDF4/_netCDF4.c:1285:
  include/netcdf-compat.h:183:19: error: static declaration of ‘nc_def_var_bzip2’ follows non-static declaration
    183 | static inline int nc_def_var_bzip2(int ncid, int varid, int level) { return NC_EINVAL; }
        |                   ^~~~~~~~~~~~~~~~
  In file included from include/netcdf-compat.h:132:
  /usr/include/netcdf_filter.h:103:13: note: previous declaration of ‘nc_def_var_bzip2’ with type ‘int(int,  int,  int)’
    103 | EXTERNL int nc_def_var_bzip2(int ncid, int varid, int level);
        |             ^~~~~~~~~~~~~~~~
  include/netcdf-compat.h:184:19: error: static declaration of ‘nc_inq_var_bzip2’ follows non-static declaration
    184 | static inline int nc_inq_var_bzip2(int ncid, int varid, int* hasfilterp, int *levelp) { return NC_EINVAL; }
        |                   ^~~~~~~~~~~~~~~~
  /usr/include/netcdf_filter.h:104:13: note: previous declaration of ‘nc_inq_var_bzip2’ with type ‘int(int,  int,  int *, int *)’
    104 | EXTERNL int nc_inq_var_bzip2(int ncid, int varid, int* hasfilterp, int *levelp);
        |             ^~~~~~~~~~~~~~~~
  include/netcdf-compat.h:194:19: error: static declaration of ‘nc_def_var_blosc’ follows non-static declaration
    194 | static inline int nc_def_var_blosc(int ncid, int varid, unsigned subcompressor, unsigned level, unsigned blocksize, unsigned addshuffle) {
        |                   ^~~~~~~~~~~~~~~~
  /usr/include/netcdf_filter.h:110:13: note: previous declaration of ‘nc_def_var_blosc’ with type ‘int(int,  int,  unsigned int,  unsigned int,  unsigned int,  unsigned int)’
    110 | EXTERNL int nc_def_var_blosc(int ncid, int varid, unsigned subcompressor, unsigned level, unsigned blocksize, unsigned addshuffle);
        |             ^~~~~~~~~~~~~~~~
  include/netcdf-compat.h:197:19: error: static declaration of ‘nc_inq_var_blosc’ follows non-static declaration
    197 | static inline int nc_inq_var_blosc(int ncid, int varid, int* hasfilterp, unsigned* subcompressorp, unsigned* levelp, unsigned* blocksizep, unsigned* addshufflep) {
        |                   ^~~~~~~~~~~~~~~~
  /usr/include/netcdf_filter.h:111:13: note: previous declaration of ‘nc_inq_var_blosc’ with type ‘int(int,  int,  int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *)’
    111 | EXTERNL int nc_inq_var_blosc(int ncid, int varid, int* hasfilterp, unsigned* subcompressorp, unsigned* levelp, unsigned* blocksizep, unsigned* addshufflep);
        |             ^~~~~~~~~~~~~~~~
  src/netCDF4/_netCDF4.c: In function ‘__pyx_pf_7netCDF4_8_netCDF4_7_MemBuf_4__dealloc__’:
  src/netCDF4/_netCDF4.c:13578:20: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  13578 |   free(__pyx_v_self->memory);
        |        ~~~~~~~~~~~~^~~~~~~~
  In file included from /usr/include/python3.12/Python.h:23,
                   from src/netCDF4/_netCDF4.c:65:
  /usr/include/stdlib.h:687:25: note: expected ‘void *’ but argument is of type ‘const void *’
    687 | extern void free (void *__ptr) __THROW;
        |                   ~~~~~~^~~~~
  src/netCDF4/_netCDF4.c: In function ‘__pyx_f_7netCDF4_8_netCDF4__read_compound’:
  src/netCDF4/_netCDF4.c:87425:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
  87425 |   for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_9; __pyx_t_2+=1) {
        |                                 ^
  src/netCDF4/_netCDF4.c: In function ‘__pyx_f_7netCDF4_8_netCDF4__read_enum’:
  src/netCDF4/_netCDF4.c:91641:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
  91641 |   for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_13; __pyx_t_2+=1) {
        |                                 ^
  src/netCDF4/_netCDF4.c: In function ‘__pyx_pymod_exec__netCDF4’:
  src/netCDF4/_netCDF4.c:117173:18: error: implicit declaration of function ‘nc_rc_set’ [-Wimplicit-function-declaration]
  117173 |     __pyx_t_6 = (nc_rc_set(((char *)"HTTP.SSL.CAINFO"), __pyx_t_5) != 0);
         |                  ^~~~~~~~~

This is with:
GCC 14
numpy 2.1.0
cython 3.0.11

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

1 participant