OSGeo / gdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.
https://gdal.org
Other
4.91k stars 2.56k forks source link

extensions/gdal_array_wrap.cpp missing #9608

Closed waarmond closed 7 months ago

waarmond commented 7 months ago

What is the bug?

When building current git sources with the same build recipe I've successfully built on 22 February (Python 3.10 unchanged) it fails now in the Python extension step:

gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wformat -w -Wno-deprecated-declarations -ffat-lto-objects -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wformat -w -Wno-deprecated-declarations -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wformat -w -Wno-deprecated-declarations -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wformat -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I./build/port -I./gdal/port -I./build/gcore -I./gdal/gcore -I./gdal/alg -I./gdal/ogr/ -I./gdal/ogr/ogrsf_frmts -I./gdal/gnm -I./gdal/apps -I/usr/include/python3.10 -I/usr/lib/python3.10/site-packages/numpy/core/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-cpython-310/extensions/gdal_wrap.o
cc1plus: fatal error: extensions/gdal_array_wrap.cpp: No such file or directory

numpy 1.26.4 swig 4.1.1

My CFLAGS are getting duplicated, even triplicated; but this seems to be unrelated.

Steps to reproduce the issue

    cmake -LA -B build -S ./$gdal \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DBUILD_TESTING=OFF \
        -DENABLE_IPO=ON \
        -DBUILD_PYTHON_BINDINGS=ON
    make -C build

Versions and provenance

ArchLinux // GDAL not built yet

Additional context

Recent updates: Cython to 3.0.10

rouault commented 7 months ago

@waarmond I suspect this might be related to the PR #8926 changes. Perhaps make sure setuptools and wheel are installed

waarmond commented 7 months ago

Basically I could not live without setuptools and used . GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=YES fixed the build, probably have to forgo array support.

Another issue: After the build I run a separate package step, which builds & links the whole project again (new behavior).

make -C build already complete

make -C build DESTDIR="${pkgdir}" install

[..] [ 98%] Linking CXX executable sozip [ 98%] Built target gnmmanage [100%] Built target ogr_Parquet [100%] Built target test_ogrsf [100%] Built target sozip Install the project... -- Install configuration: "" [..]

rouault commented 7 months ago

After the build I run a separate package step, which builds & links the whole project again

is that a problem and really new (as far as I can remember this is not new) ? It must just re-check that the targets are up-to-date