Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766656 - app-office/libreoffice- fails with gcc11 lru_map.hxx needs std::size_t in a few places
Summary: app-office/libreoffice- fails with gcc11 lru_map.hxx needs std::size_t...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
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: ---

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- [] USE="-base% -clang% -custom-cflags% -vulkan%"

Here's the flags

[ebuild   R    ] app-office/libreoffice-  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-,
                 from /var/tmp/portage/app-office/libreoffice-
/var/tmp/portage/app-office/libreoffice- 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:
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):

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

    app-office/libreoffice: Fix build with GCC-11
    Reported-by: Geoff Leach <>
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Andreas Sturmlechner <>

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