Skip to content

Compilation fails on GCC 14 #53

@tikk3r

Description

@tikk3r

I may be out of officially supported territory with this, but thought I'd just note it. Updating my containers I ran into the following crash when trying to build the current master (5cec4db) with GCC 14 on Fedora 40:

      -- Configuring done (0.8s)
      -- Generating done (0.0s)
      -- Build files have been written to: /opt/lofar/DDFacet/DDFacet/cbuild
      *** Building project with Ninja...
      [1/11] Building C object Gridder/old_c_gridder/CMakeFiles/_pyGridderSmearPolsClassic3x.dir/GridderSmearPols.c.o
      FAILED: Gridder/old_c_gridder/CMakeFiles/_pyGridderSmearPolsClassic3x.dir/GridderSmearPols.c.o
      /usr/bin/gcc -D_pyGridderSmearPolsClassic3x_EXPORTS -I/usr/include/python3.12 -I/tmp/pip-build-env-9_iwrnj4/overlay/lib64/python3.12/site-packages/numpy/_core/include -I/tmp/pip-build-env-9_iwrnj4/overlay/lib64/python3.12/site-packages/numpy/_core/include/numpy -I/tmp/pip-build-env-9_iwrnj4/overlay/lib/python3.12/site-packages/pybind11/include -w -march=sandybridge -mtune=sandybridge -mno-avx512f -O3 -DNDEBUG -ggdb3 -fopenmp -fmax-errors=1 -Wconversion -W -Wall -std=c99    -ffast-math -fPIC -MD -MT Gridder/old_c_gridder/CMakeFiles/_pyGridderSmearPolsClassic3x.dir/GridderSmearPols.c.o -MF Gridder/old_c_gridder/CMakeFiles/_pyGridderSmearPolsClassic3x.dir/GridderSmearPols.c.o.d -o Gridder/old_c_gridder/CMakeFiles/_pyGridderSmearPolsClassic3x.dir/GridderSmearPols.c.o -c /opt/lofar/DDFacet/DDFacet/Gridder/old_c_gridder/GridderSmearPols.c
      In file included from /opt/lofar/DDFacet/DDFacet/Gridder/old_c_gridder/GridderSmearPols.c:33:
      /opt/lofar/DDFacet/DDFacet/Gridder/old_c_gridder/JonesServer.c: In function ‘initJonesServer’:
      /opt/lofar/DDFacet/DDFacet/Gridder/old_c_gridder/JonesServer.c:276:33: error: assignment to ‘int *’ from incompatible pointer type ‘long int *’ [-Wincompatible-pointer-types]
        276 |     ptrTimeMappingJonesMatrices = p_int32(npTimeMappingJonesMatrices);
            |                                 ^
      compilation terminated due to -fmax-errors=1.
      [2/11] Building C object Gridder/old_c_gridder/CMakeFiles/_pyGridder3x.dir/Gridder.c.o
      [3/11] Building CXX object Gridder/CMakeFiles/_pyArrays3x.dir/Arrays.cc.o
      [4/11] Building CXX object Gridder/CMakeFiles/_pyGridderSmearPols3x.dir/Semaphores.cc.o
      [5/11] Building CXX object Gridder/CMakeFiles/_pyGridderSmearPols3x.dir/DecorrelationHelper.cc.o
      [6/11] Building CXX object Gridder/CMakeFiles/_pyGridderSmearPols3x.dir/JonesServer.cc.o
      [7/11] Building CXX object Gridder/CMakeFiles/_pyGridderSmearPols3x.dir/GridderSmearPols.cc.o
      ninja: build stopped: subcommand failed.
      
      *** CMake build failed
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for DDFacet
Failed to build DDFacet

I can temporarily work around it by adding -Wno-error=incompatible-pointer-types to the CFLAGS/CXXFLAGS, so at least build-wise it doesn't seem like a major show stopper at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions