Verified that your change worked for my compiler. Thank you!

From: Even Rouault <even.roua...@spatialys.com>
Date: Wednesday, April 30, 2025 at 6:17 AM
To: Fengting Chen <fengting.c...@oracle.com>, gdal-dev@lists.osgeo.org 
<gdal-dev@lists.osgeo.org>
Subject: Re: [External] : Re: [gdal-dev] Build failed with "cannot deduce 
template arguments" error

GCC 8 release notes indicate that C++17 support is still be a bit experimental 
for the standard library. Anyway, can you try 
https://github.com/OSGeo/gdal/pull/12231<https://urldefense.com/v3/__https:/github.com/OSGeo/gdal/pull/12231__;!!ACWV5N9M2RV99hQ!LLypbO_HDg16BnOo4IDARi1zrLUzkmyWhmjNTbwBoT0ieGdQEl9YHkmMpYB1ld6UKWExDemX6KdmuKiu28xp8Ye6fs7T$>
 ? I don't have access to your compiler so I couldn't check with it, but I'd 
assume it should make template deduction easier for the compiler.
Le 30/04/2025 à 05:10, Fengting Chen a écrit :
I am using “c++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18.0.6)” which is supposed 
to support C++17.

From: Even Rouault 
<even.roua...@spatialys.com><mailto:even.roua...@spatialys.com>
Date: Tuesday, April 29, 2025 at 6:10 PM
To: Fengting Chen <fengting.c...@oracle.com><mailto:fengting.c...@oracle.com>, 
gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org> 
<gdal-dev@lists.osgeo.org><mailto:gdal-dev@lists.osgeo.org>
Subject: [External] : Re: [gdal-dev] Build failed with "cannot deduce template 
arguments" error

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@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev<https://urldefense.com/v3/__https:/lists.osgeo.org/mailman/listinfo/gdal-dev__;!!ACWV5N9M2RV99hQ!OOJ0fjd1DRqARN5Zwu2h2bUnGxx24Gm7BRrjicc_T6TOWw47z1fKS1DmrwT_3UWuTnrn2lyb2-GqSG_ErtSHw1UapGVT$>

--

http://www.spatialys.com<https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!OOJ0fjd1DRqARN5Zwu2h2bUnGxx24Gm7BRrjicc_T6TOWw47z1fKS1DmrwT_3UWuTnrn2lyb2-GqSG_ErtSHw2hmL07K$>

My software is free, but my time generally not.

--

http://www.spatialys.com<https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!LLypbO_HDg16BnOo4IDARi1zrLUzkmyWhmjNTbwBoT0ieGdQEl9YHkmMpYB1ld6UKWExDemX6KdmuKiu28xp8WvOW-ur$>

My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to