[gdal-dev] Building GDAL on Ubuntu 22.04
Even Rouault
even.rouault at spatialys.com
Sat Jul 6 00:59:24 PDT 2024
Hi,
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
Even
Le 04/07/2024 à 08:01, Eric Knudstrup via gdal-dev a écrit :
> I'm using WEBP, so the 3.4.1 release of GDAL that Ubuntu has won't
> work for me.
>
> Is there a workaround for this?
>
> cmake ..
> -- The CXX compiler identification is Clang 13.0.0
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - failed
> -- Check for working CXX compiler: /usr/bin/clang++
> -- Check for working CXX compiler: /usr/bin/clang++ - broken
> CMake Error at
> /snap/cmake/1403/share/cmake-3.30/Modules/CMakeTestCXXCompiler.cmake:73
> (message):
> The C++ compiler
>
> "/usr/bin/clang++"
>
> is not able to compile a simple test program.
>
> It fails with the following output:
>
> Change Dir:
> '/home/me/gdal-3.9.1/build/CMakeFiles/CMakeScratch/TryCompile-hpEoYa'
>
> Run Build Command(s): /snap/cmake/1403/bin/cmake -E env VERBOSE=1
> /usr/bin/gmake -f Makefile cmTC_8efcd/fast
> /usr/bin/gmake -f CMakeFiles/cmTC_8efcd.dir/build.make
> CMakeFiles/cmTC_8efcd.dir/build
> gmake[1]: Entering directory
> '/home/me/gdal-3.9.1/build/CMakeFiles/CMakeScratch/TryCompile-hpEoYa'
> Building CXX object CMakeFiles/cmTC_8efcd.dir/testCXXCompiler.cxx.o
> /usr/bin/clang++ -MD -MT
> CMakeFiles/cmTC_8efcd.dir/testCXXCompiler.cxx.o -MF
> CMakeFiles/cmTC_8efcd.dir/testCXXCompiler.cxx.o.d -o
> CMakeFiles/cmTC_8efcd.dir/testCXXCompiler.cxx.o -c
> /home/me/gdal-3.9.1/build/CMakeFiles/CMakeScratch/TryCompile-hpEoYa/testCXXCompiler.cxx
> Linking CXX executable cmTC_8efcd
> /snap/cmake/1403/bin/cmake -E cmake_link_script
> CMakeFiles/cmTC_8efcd.dir/link.txt --verbose=1
> /usr/bin/clang++ CMakeFiles/cmTC_8efcd.dir/testCXXCompiler.cxx.o
> -o cmTC_8efcd
> /usr/bin/ld: cannot find -lstdc++: No such file or directory
> clang-13: error: linker command failed with exit code 1 (use -v to
> see invocation)
> gmake[1]: *** [CMakeFiles/cmTC_8efcd.dir/build.make:100:
> cmTC_8efcd] Error 1
> gmake[1]: Leaving directory
> '/home/me/gdal-3.9.1/build/CMakeFiles/CMakeScratch/TryCompile-hpEoYa'
> gmake: *** [Makefile:127: cmTC_8efcd/fast] Error 2
>
>
>
>
>
> CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
> CMakeLists.txt:4 (project)
>
> _______________________________________________
> 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.
More information about the gdal-dev
mailing list