Created attachment 859193 [details] emerge --info '=app-office/calligra-3.2.1-r5::gentoo' When trying to build calligra with the gsl use flag set, this error halts the build: /usr/include/gsl/algorithm: In function ‘void gsl::copy(span<ElementType, FirstExtent>, span<DestElementType, DestExtent>)’: /usr/include/gsl/algorithm:54:10: error: ‘copy_n’ is not a member of ‘std’; did you mean ‘copy’? 54 | std::copy_n(src.data(), src.size(), dest.data()); | ^~~~~~
Created attachment 859195 [details] /var/tmp/portage/app-office/calligra-3.2.1-r5/temp/build.log Gzip compressed build log.
Created attachment 859197 [details] /var/tmp/portage/app-office/calligra-3.2.1-r5/temp/environment
Created attachment 859528 [details, diff] Fix build with gsl flag The problem is related to the fact that the /usr/include/gsl directory is added to the include. As a result, the <algorithm> header file is included from gsl and not from the standard library. FindGSL should return GSL_INCLUDED_DIR without the "gsl" at the end. I didn't fix FindGSL.cmake, just removed adding -I/usr/include/gsl to the compiler options.
Thank you. Your patch allowed the build to complete.
Can you report this upstream to CMake please?
This is a problem with the old cmake module that comes with calligra. They already removed it.
(In reply to Michael Uleysky from comment #6) > This is a problem with the old cmake module that comes with calligra. They > already removed it. Ah, thanks.
I actualkly can't reproduce that build error, but I found an upstream fix for using cmake module and will test with that, anyway.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=591c90d4a4afd60e49e7b89ef42da60a0ce0de58 commit 591c90d4a4afd60e49e7b89ef42da60a0ce0de58 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2023-04-22 13:32:08 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2023-04-22 13:35:19 +0000 app-office/calligra: USE cmake FindGSL module instead of bundled one Fixes potential build issues. Upstream commit fb545574a3e3b48b937dc4f741048c7033735e04, readjusted on top of our modifications. Closes: https://bugs.gentoo.org/903343 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> app-office/calligra/calligra-3.2.1-r7.ebuild | 2 ++ .../calligra-3.2.1-use-cmake-FindGSL-module.patch | 29 ++++++++++++++++++++++ 2 files changed, 31 insertions(+)