Open ArchFeh opened 1 year ago
Same issue here, but I don't think the solution is that simple as a search/replace of std=gnu11 to c++11 - for me it seems like the compiler treats these files as C, but it should be parsed as C++. Or something.
I have a similar issue on kisslinux. I assume it's the same problem.
Edit: if I downgrade qpdf
to 11.2.0 I can compile without problem. For the moment it could be a workaround.
Same error messages with building the IPFire distribution with qpdf-11.3.0
Building with qpdf-11.2.0 also allowed a problem free compile. That is what I have done at the moment as a workaround.
The IPFire build is using gcc-12.2.0
You will need -std=c++17
instead of -std=c++11
. Please test and report back here.
I did a fresh build adding -std=c++17 to the cups-filters configure and using qpdf-11.3.0 and it built successfully.
I presume then that even with the latest gcc it must still have the c++11 dialect as default.
Anyway, thanks for the help and I can confirm it worked.
With clang 15.0.7, -std=c++17
leads to filter/pdftoraster.cxx ISO C++17 does not allow dynamic exception specifications
. Building with -std=c++11
works just fine.
See also https://bugs.gentoo.org/901243 Fixed by https://github.com/OpenPrinting/cups-filters/pull/505
I assume the correct fix is to do the following modifications to have -std=c++17
added by configure.
bump version in AX_CXX_COMPILE_STDCXX
from 11 to 17 in configure.ac
:
https://github.com/OpenPrinting/cups-filters/blob/9799398713b941557642d0b2bdbef360837ece0c/configure.ac#L55
remove hard coded -std=c++0x
in Makefile.am
:
https://github.com/OpenPrinting/cups-filters/blob/9799398713b941557642d0b2bdbef360837ece0c/Makefile.am#L531
I just ran CXXFLAGS="-std=c++17" before the ./configure command and that worked fine for me.
Describe the bug
std::string_view
was introduced in c++17, and the ebuild was compiled with c++11, so the error occurs. Can see https://bugs.gentoo.org/898156. When set-std=c++17
, comile passed. To Reproduce Steps to reproduce the behavior: just compile with-std=gnu11
or-std=c++11
Expected behavior compile successfully
System Information: