(apologies for 'hijacking' the thread) On Tue, 08 Mar 2022 12:02:04 +0100 dieter wrote:
On Tue, 08 Mar 2022 09:32:39 +0100 Axel Braun wrote:
gdcm is a graphics library for DICOM images. It builds fine for Leap 15.3 and TW, but fails for 15.4: From https://build.opensuse.org/build/home:DocB:Orthanc/15.4/x86_64/gdcm/_log Error: https://paste.opensuse.org/20682002
The issue seems to be related to libpoppler (22.01). Can one of the C++ experts explain why it fails just for Leap 15.4?
just some hints: /usr/include/poppler/Form.h:320:10: error: 'optional' in namespace 'std' does not name a template type std::optional<GooString> getCheckedSignature(Goffset *checkedFileSize); ^~~~~~~~
Application:Geo/gdal build for 15.4 fails with identical error, while trying to build (optional) SpatialPDF driver, for which poppler is the dependency.
"std::optional" is defined in the C++ standard C++17. GCC-7 (of openSUSE Leap 15.4) up to GCC-10 use the standard C++14 by default.
AFAICT, poppler is built with gcc11 on 15.4, due to some other issue with gcc-7.5.0
The used gcc7-7.5.0 should support "optional", but C++17 support has to be enabled explicitly with the option: -std=c++17 (or -std=gnu++17 if GNU extensions are wanted).
https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2017
So, what's the 'proper', least intrusive way to deal with this, apart from disabling SpatialPDF driver for 15.4? Explicitly set '-std=c++17' in gdal build? Use gcc-11(that would be overkill, I presume)? Any gotchas to be aware of with any of these? Pedja