[gdal-dev] Build failed with "cannot deduce template arguments" error

Even Rouault even.rouault at spatialys.com
Tue Apr 29 15:09:59 PDT 2025


Which compiler and compiler version do you use ? It is likely it is too 
old and doesn't fully support C++17

Le 29/04/2025 à 23:18, Fengting Chen via gdal-dev a écrit :
>
> Hi, I am trying to build GDAL from the master branch, but got the 
> following error:
>
> [ 46%] Building CXX object 
> alg/CMakeFiles/alg.dir/gdal_interpolateatpoint.cpp.o
>
> In file included from 
> /scratch/gdal/gdal/alg/gdal_interpolateatpoint.cpp:20:
>
> /scratch/gdal/gdal/gcore/gdal_vectorx.h: In member function 
> ?~@~Xgdal::         VectorX<T, N>::self_type gdal::VectorX<T, 
> N>::operator+(T) const?~@~Y:
>
> /scratch/gdal/gdal/gcore/gdal_vectorx.h:173:44: error: cannot deduce 
> template   arguments for ?~@~Xplus?~@~Y from ()
>
> return operatorImpl(arg, std::plus());
>
> ^
>
> My configuration is:
>
> --   Target system:             Linux
>
> -- Installation directory:    /usr/local
>
> --   C++ Compiler type:         GNU
>
> --   C compile command line:     /bin/cc
>
> --   C++ compile command line:   /bin/c++
>
> -- 
>
> -- CMAKE_C_FLAGS:               -fvisibility=hidden
>
> -- CMAKE_CXX_FLAGS:               -fvisibility=hidden
>
> -- CMAKE_CXX17_STANDARD_COMPILE_OPTION:              -std=c++17
>
> -- CMAKE_CXX17_EXTENSION_COMPILE_OPTION: -std=gnu++17
>
> -- CMAKE_EXE_LINKER_FLAGS:
>
> -- CMAKE_MODULE_LINKER_FLAGS:               -Wl,--no-undefined
>
> -- CMAKE_SHARED_LINKER_FLAGS:               -Wl,--no-undefined
>
> -- CMAKE_STATIC_LINKER_FLAGS:
>
> Any idea on how to fix the error?
>
> Thanks!
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250430/61e739be/attachment-0001.htm>


More information about the gdal-dev mailing list