Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903343 - app-office/calligra-3.2.1-r5::gentoo - /.../algorithm: error: copy_n is not a member of std (sci-libs/gsl bug?)
Summary: app-office/calligra-3.2.1-r5::gentoo - /.../algorithm: error: copy_n is not ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-28 16:00 UTC by Allan Bjorklund
Modified: 2023-04-23 09:59 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=app-office/calligra-3.2.1-r5::gentoo' (file_903343.txt,7.83 KB, text/plain)
2023-03-28 16:00 UTC, Allan Bjorklund
Details
/var/tmp/portage/app-office/calligra-3.2.1-r5/temp/build.log (build.log.gz,161.19 KB, application/gzip)
2023-03-28 16:07 UTC, Allan Bjorklund
Details
/var/tmp/portage/app-office/calligra-3.2.1-r5/temp/environment (environment,124.48 KB, text/plain)
2023-03-28 16:08 UTC, Allan Bjorklund
Details
Fix build with gsl flag (calligra-3.2.1-fix.patch,645 bytes, patch)
2023-04-05 04:00 UTC, Michael Uleysky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Bjorklund 2023-03-28 16:00:06 UTC
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());
      |          ^~~~~~
Comment 1 Allan Bjorklund 2023-03-28 16:07:25 UTC
Created attachment 859195 [details]
/var/tmp/portage/app-office/calligra-3.2.1-r5/temp/build.log

Gzip compressed build log.
Comment 2 Allan Bjorklund 2023-03-28 16:08:59 UTC
Created attachment 859197 [details]
/var/tmp/portage/app-office/calligra-3.2.1-r5/temp/environment
Comment 3 Michael Uleysky 2023-04-05 04:00:38 UTC
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.
Comment 4 Allan Bjorklund 2023-04-11 17:25:41 UTC
Thank you.  Your patch allowed the build to complete.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-20 19:28:16 UTC
Can you report this upstream to CMake please?
Comment 6 Michael Uleysky 2023-04-20 22:45:16 UTC
This is a problem with the old cmake module that comes with calligra. They already removed it.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-20 22:58:28 UTC
(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.
Comment 8 Andreas Sturmlechner gentoo-dev 2023-04-22 13:29:44 UTC
I actualkly can't reproduce that build error, but I found an upstream fix for using cmake module and will test with that, anyway.
Comment 9 Larry the Git Cow gentoo-dev 2023-04-22 13:35:25 UTC
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(+)