Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766656 - app-office/libreoffice-7.0.4.2 fails with gcc11 lru_map.hxx needs std::size_t in a few places
Summary: app-office/libreoffice-7.0.4.2 fails with gcc11 lru_map.hxx needs std::size_t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-01-23 11:58 UTC by Geoff Leach
Modified: 2021-01-24 13:02 UTC (History)
1 user (show)

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


Attachments
patch to change bare size_t to std::size_t (loffice-gcc11-size_t.patch,810 bytes, patch)
2021-01-23 11:58 UTC, Geoff Leach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff Leach 2021-01-23 11:58:02 UTC
Created attachment 684210 [details, diff]
patch to change bare size_t to std::size_t

Had just one issue building libreoffice with gcc11.

In  lru_map.hxx needed std::size_t instead of bare size_t in a couple of places. Patch attached. (Or alternatively #include <cstddef> I suppose).

I'm not sure this issue is actually specific to gcc11 / C++17, but that's the compiler I'm using and at the moment don't have gcc10 installed. It might have been a change between
[ebuild     U  ] app-office/libreoffice-7.0.4.2 [7.0.0.2] USE="-base% -clang% -custom-cflags% -vulkan%"

Here's the flags

[ebuild   R    ] app-office/libreoffice-7.0.4.2::gentoo  USE="bluetooth branding cups dbus eds googledrive gstreamer gtk java ldap mariadb pdfimport -accessibility -base -clang -coinmp -custom-cflags -debug -firebird -kde -odk -postgres -test -vulkan" LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python3_7 -python3_8 -python3_9" 0 KiB

I have pdfimport and googledrive enabled.

Here's the error reported 

[CXX] vcl/source/window/accessibility.cxx
In file included from /var/tmp/portage/app-office/libreoffice-7.0.4.2/work/libreoffice-7.0.4.2/vcl/inc/svdata.hxx:25,
                 from /var/tmp/portage/app-office/libreoffice-7.0.4.2/work/libreoffice-7.0.4.2/vcl/source/window/brdwin.cxx:21:
/var/tmp/portage/app-office/libreoffice-7.0.4.2/work/libreoffice-7.0.4.2/include/o3tl/lru_map.hxx:51:11: error: ‘size_t’ does not name a type
   51 |     const size_t mMaxSize;
      |
Comment 1 Andreas Sturmlechner gentoo-dev 2021-01-24 12:50:18 UTC
Upstream have this simple header change merged:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=8830cf86b146b1252ac37f351a23246088d569b0
Comment 2 Larry the Git Cow gentoo-dev 2021-01-24 13:02:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d807dbc22e70f8bcce8fd99637b0464686d26fd

commit 5d807dbc22e70f8bcce8fd99637b0464686d26fd
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-01-24 12:56:37 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-01-24 12:59:09 +0000

    app-office/libreoffice: Fix build with GCC-11
    
    Reported-by: Geoff Leach <gl@cs.rmit.edu.au>
    Closes: https://bugs.gentoo.org/766656
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../files/libreoffice-7.0.4.2-gcc11.patch          | 31 ++++++++++++++++++++++
 app-office/libreoffice/libreoffice-7.0.4.2.ebuild  |  3 +++
 2 files changed, 34 insertions(+)