Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 914032

Summary: app-text/qpdfview-0.5 has the wrong c++ standard (-std=c++11 -> -std=c++17)
Product: Gentoo Linux Reporter: ykui <YumekuiNeru>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description ykui 2023-09-12 01:19:18 UTC
poppler-form.h uses `std::optional` which requires -std=c++17

but qpdfview.pri defines c++11


# app-text/qpdfview-0.5::gentoo  USE="djvu pdf sqlite svg -cups -dbus -fitz -postscript -synctex" 0 KiB

...
In file included from sources/formfieldwidgets.cpp:27:
/usr/include/poppler/qt5/poppler-form.h:888:6: error: ‘optional’ in namespace ‘std’ does not name a template type
  888 | std::optional<CryptoSignBackend> POPPLER_QT5_EXPORT activeCryptoSignBackend();
      |      ^~~~~~~~
/usr/include/poppler/qt5/poppler-form.h:888:1: note: ‘std::optional’ is only available from C++17 onwards
  888 | std::optional<CryptoSignBackend> POPPLER_QT5_EXPORT activeCryptoSignBackend();
      | ^~~
...
```



Reproducible: Always




it builds successfully for me if I apply this patch

```
--- a/qpdfview.pri	2023-09-12 02:55:31.906631433 +0200
+++ b/qpdfview.pri	2023-09-12 03:02:10.343610062 +0200
@@ -12,4 +12,4 @@
 win32:include(qpdfview_win32.pri)
 os2:include(qpdfview_os2.pri)
 
-CONFIG += c++11
+CONFIG += c++17
```
Comment 1 ykui 2023-09-12 01:22:41 UTC
Sorry, duplicate of #909037

did not see the closed issue when I searched

*** This bug has been marked as a duplicate of bug 909037 ***
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-12 01:22:57 UTC
Please always include the full build.log and emerge --info.

This one should be fixed?