Created attachment 243562 [details] Patch for scribus/desaxe/digester.cpp Clang 16.0.6 in recent current isn't forgiving at all. std::__unary_function must replace std::unary_function in scribus/desaxe/digester.cpp.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0df1ef7cd883e13c0b9983150913208e4a05db40 commit 0df1ef7cd883e13c0b9983150913208e4a05db40 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2023-07-26 17:20:50 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2023-07-26 17:23:41 +0000 print/scribus-devel: fix build with llvm16 PR: 272673 .../files/patch-scribus_desaxe_digester.cpp (new) | 11 +++++++++++ 1 file changed, 11 insertions(+)
(In reply to Trond Endrestøl from comment #0) > Clang 16.0.6 in recent current isn't forgiving at all. > std::__unary_function must replace std::unary_function in scribus/desaxe/digester.cpp. And break build on 13 and 12: /usr/ports/print/scribus-devel/work/scribus-1.5.8/scribus/desaxe/digester.cpp:451:37: error: no template named '__unary_function' in namespace 'std'; did you mean 'unary_function'? struct CreateDFAState : public std::__unary_function <std::set<nfa_state_t>, dfa_state_t> { ~~~~~^~~~~~~~~~~~~~~~ unary_function /usr/include/c++/v1/__functional/unary_function.h:21:29: note: 'unary_function' declared here struct _LIBCPP_TEMPLATE_VIS unary_function ^ 1 error generated. Workaround: rm /usr/ports/print/scribus-devel/files/patch-scribus_desaxe_digester.cpp
(In reply to Vladimir Druzenko from comment #2) Instead of my patch we could try enforcing the C++ standard expected by the source code. E.g. USE_CXXSTD= c++11
Sorry.
I don't have 14 to test. Only 12 and 13. IMHO, revert this commit and create other: > USE_CXXSTD= c++11 or enough: > USES= compiler:c++11-lang with testing build on all supported platforms before commit: 12.4, 13.2, 14. 13.1 will EOL tomorrow - can ignore it.
Maybe this need fix too: CMAKE_ARGS+= -DWANT_HUNSPELL=YES \ -DWANT_CPP17=YES \
Created attachment 243755 [details] Updated patch for scribus/desaxe/digester.cpp handling ISO C++ 2017 and newer and older standards
(In reply to Trond Endrestøl from comment #7) Let me know if we need to refine the patch further. Poppler and CMake insists on using ISO C++ 2017. Playing with USE_CXXSTD got me nowhere as CMake placed -std=c++17 towards the end of every command line.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=fa869802d0318071f8e48f22579a7a3d777c1189 commit fa869802d0318071f8e48f22579a7a3d777c1189 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2023-08-03 16:46:45 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2023-08-03 16:48:02 +0000 print/scribus-devel: update patch for 14 to fix build on 12 and 13 PR: 272673 Submitted by: Trond Endrestøl print/scribus-devel/files/patch-scribus_desaxe_digester.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
Tested build on 13.2 amd64. I think we can close this.