<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>The original post/current issue really points at a missing
libstdc++ dev package.</p>
<div class="moz-cite-prefix">
<div class="moz-cite-prefix">For the past build issues, it is
almost never exactly "missing libstdc++" but actually needing
the C++ linker. Recognizing C++ linkage is a problem when you
cannot rely on CMake config files for static library linkage.
The library which needs C++ linkage can be behind a library with
C interface, and subject to configuration.<br>
</div>
</div>
<div class="moz-cite-prefix">Example: lerc behind tiff.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">(In vpckg ports, I add the difference
of CMAKE_CXX_IMPLICIT_LINK_LIBRARIES and
CMAKE_C_IMPLICIT_LINK_LIBRARIES to the pkg-config file when I need
to pass on C++ linkage. Resolving it at the root. But I know a lot
of ugly hacks downstream...)</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Am 06.07.24 um 12:39 schrieb Even
Rouault:<br>
</div>
<blockquote type="cite"
cite="mid:7cddc00b-b5fd-4348-8e49-f04f1b63c01b@spatialys.com">I
definitely ran into build issues in that past related to missing
libstdc++ (perhaps related to using older CMake and/or clang?).
But looking closer, we only add -lstdc++ when building a test
program fails without this explicit addition. Cf
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/master/cmake/helpers/GdalCompilationFlags.cmake#L165">https://github.com/OSGeo/gdal/blob/master/cmake/helpers/GdalCompilationFlags.cmake#L165</a>
to L183
<br>
<br>
Le 06/07/2024 à 12:02, Kai Pastor, DG0YT via gdal-dev a écrit :
<br>
<blockquote type="cite">Why does it have to force anything at all?
CMake normally knows how to setup
CMAKE_CXX_IMPLICIT_LINK_LIBRARIES.
<br>
<br>
(Right now fixing hard-coded libstdc++ assumptions in ffmpeg and
dependencies in vcpkg, breaking Android.)
<br>
<br>
Kai
<br>
<br>
Am 06.07.24 um 09:59 schrieb Even Rouault via gdal-dev:
<br>
<blockquote type="cite">Hi,
<br>
<br>
when using CLang, GDAL forces the use of libstdc++ for
linking, so seeing "cannot find -lstdc++", I suspect you might
lack the installation of libstdc++-11-dev package
<br>
<br>
Even
<br>
</blockquote>
<br>
<br>
_______________________________________________
<br>
gdal-dev mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
<br>
</blockquote>
<br>
</blockquote>
<p><br>
</p>
</body>
</html>