<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>GCC 8 release notes indicate that C++17 support is still be a bit
experimental for the standard library. Anyway, can you try
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/12231">https://github.com/OSGeo/gdal/pull/12231</a> ? 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.<br>
</p>
<div class="moz-cite-prefix">Le 30/04/2025 à 05:10, Fengting Chen a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:PH0PR10MB7061D51CCF43E006A8F9B85393832@PH0PR10MB7061.namprd10.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:PMingLiU;
panose-1:2 2 5 0 0 0 0 0 0 0;}@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}@font-face
{font-family:"\@PMingLiU";
panose-1:2 1 6 1 0 1 1 1 1 1;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
font-size:10.0pt;
font-family:"Courier New";}span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Consolas",serif;}span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">I am using
“c++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18.0.6)” which is
supposed to support C++17.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
style="color:black">From:
</span></b><span style="color:black">Even Rouault
<a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a><br>
<b>Date: </b>Tuesday, April 29, 2025 at 6:10</span><span
style="font-family:"Arial",sans-serif;color:black"> </span><span
style="color:black">PM<br>
<b>To: </b>Fengting Chen
<a class="moz-txt-link-rfc2396E" href="mailto:fengting.chen@oracle.com"><fengting.chen@oracle.com></a>,
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org"><gdal-dev@lists.osgeo.org></a><br>
<b>Subject: </b>[External] : Re: [gdal-dev] Build
failed with "cannot deduce template arguments" error<o:p></o:p></span></p>
</div>
<p>Which compiler and compiler version do you use ? It is
likely it is too old and doesn't fully support C++17<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 29/04/2025 à 23:18, Fengting
Chen via gdal-dev a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,
I am trying to build GDAL from the master branch,
but got the following error:
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">[
46%] Building CXX object
alg/CMakeFiles/alg.dir/gdal_interpolateatpoint.cpp.o</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">In
file included from
/scratch/gdal/gdal/alg/gdal_interpolateatpoint.cpp:20:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">/scratch/gdal/gdal/gcore/gdal_vectorx.h:
In member function ?~@~Xgdal::
VectorX<T, N>::self_type gdal::VectorX<T,
N>::operator+(T) const?~@~Y:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">/scratch/gdal/gdal/gcore/gdal_vectorx.h:173:44:
error: cannot deduce template arguments for
?~@~Xplus?~@~Y from ()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
return operatorImpl(arg, std::plus());</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">
^</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">My
configuration is: </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
Target system: Linux</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
Installation directory: /usr/local</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
C++ Compiler type: GNU</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
C compile command line: /bin/cc</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
C++ compile command line: /bin/c++</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
CMAKE_C_FLAGS: -fvisibility=hidden</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
CMAKE_CXX_FLAGS: -fvisibility=hidden</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
CMAKE_CXX17_STANDARD_COMPILE_OPTION:
-std=c++17</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
CMAKE_CXX17_EXTENSION_COMPILE_OPTION:
-std=gnu++17</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
CMAKE_EXE_LINKER_FLAGS:
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
CMAKE_MODULE_LINKER_FLAGS:
-Wl,--no-undefined</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
CMAKE_SHARED_LINKER_FLAGS:
-Wl,--no-undefined</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--
CMAKE_STATIC_LINKER_FLAGS:
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Any
idea on how to fix the error?
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks!</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>gdal-dev mailing list<o:p></o:p></pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org"
moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a
href="https://urldefense.com/v3/__https:/lists.osgeo.org/mailman/listinfo/gdal-dev__;!!ACWV5N9M2RV99hQ!OOJ0fjd1DRqARN5Zwu2h2bUnGxx24Gm7BRrjicc_T6TOWw47z1fKS1DmrwT_3UWuTnrn2lyb2-GqSG_ErtSHw1UapGVT$"
moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a
href="https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!OOJ0fjd1DRqARN5Zwu2h2bUnGxx24Gm7BRrjicc_T6TOWw47z1fKS1DmrwT_3UWuTnrn2lyb2-GqSG_ErtSHw2hmL07K$"
moz-do-not-send="true">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</div>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>