Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916621 - app-office/libreoffice-7.5.6.2 fails to compile with gcc 14
Summary: app-office/libreoffice-7.5.6.2 fails to compile with gcc 14
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: gcc-14
  Show dependency tree
 
Reported: 2023-11-01 11:44 UTC by Kostadin Shishmanov
Modified: 2023-11-03 23:58 UTC (History)
1 user (show)

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


Attachments
build log for first missing include (build.log.xz,153.58 KB, application/x-xz)
2023-11-01 11:44 UTC, Kostadin Shishmanov
Details
build log for second missing include (build2.log.xz,167.41 KB, application/x-xz)
2023-11-01 11:44 UTC, Kostadin Shishmanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin Shishmanov 2023-11-01 11:44:37 UTC
Created attachment 873815 [details]
build log for first missing include

app-office/libreoffice-7.5.x fails to compile with gcc 14, fix is apparently as simple as adding #include <cstdlib> to store/source/storbase.hxx and #include <algorithm> to libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx. I can make a PR if needed.


In file included from /var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/stordata.hxx:30,
                 from /var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/stordata.cxx:20:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx: In static member function ‘static void* store::OStorePageObject::operator new(size_t)’:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx:525:21: error: ‘malloc’ is not a member of ‘std’
  525 |         return std::malloc(sal_uInt32(n));
      |                     ^~~~~~
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx: In static member function ‘static void store::OStorePageObject::operator delete(void*)’:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx:529:14: error: ‘free’ is not a member of ‘std’
  529 |         std::free (p);
      |              ^~~~
In file included from /var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbios.hxx:28,
                 from /var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbios.cxx:22:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx: In static member function ‘static void* store::OStorePageObject::operator new(size_t)’:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx:525:21: error: ‘malloc’ is not a member of ‘std’
  525 |         return std::malloc(sal_uInt32(n));
      |                     ^~~~~~
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx: In static member function ‘static void store::OStorePageObject::operator delete(void*)’:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx:529:14: error: ‘free’ is not a member of ‘std’
  529 |         std::free (p);
      |              ^~~~
In file included from /var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/stordir.hxx:29,
                 from /var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/stordir.cxx:20:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx: In static member function ‘static void* store::OStorePageObject::operator new(size_t)’:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx:525:21: error: ‘malloc’ is not a member of ‘std’
  525 |         return std::malloc(sal_uInt32(n));
      |                     ^~~~~~
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx: In static member function ‘static void store::OStorePageObject::operator delete(void*)’:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx:529:14: error: ‘free’ is not a member of ‘std’
  529 |         std::free (p);
      |              ^~~~
In file included from /var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.cxx:20:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx: In static member function ‘static void* store::OStorePageObject::operator new(size_t)’:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx:525:21: error: ‘malloc’ is not a member of ‘std’
  525 |         return std::malloc(sal_uInt32(n));
      |                     ^~~~~~
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx: In static member function ‘static void store::OStorePageObject::operator delete(void*)’:
/var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/store/source/storbase.hxx:529:14: error: ‘free’ is not a member of ‘std’
  529 |         std::free (p);
      |              ^~~~
      
      /var/tmp/portage/app-office/libreoffice-7.5.6.2/work/libreoffice-7.5.6.2/libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx:279:20: error: ‘find_if’ is not a member of ‘std’; did you mean ‘find’?
  279 |     auto it = std::find_if(priv->m_pRecentUnoCommands.begin(), priv->m_pRecentUnoCommands.end(),
      |                    ^~~~~~~
      |                    find
Comment 1 Kostadin Shishmanov 2023-11-01 11:44:55 UTC
Created attachment 873816 [details]
build log for second missing include
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-01 11:47:31 UTC
Please do. Also, thanks for digging up the upstream refs.
Comment 3 Larry the Git Cow gentoo-dev 2023-11-03 23:58:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87f7190edb773b267fe88529b36a442583e09435

commit 87f7190edb773b267fe88529b36a442583e09435
Author:     Kostadin Shishmanov <kocelfc@tutanota.com>
AuthorDate: 2023-11-01 15:48:29 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-11-03 23:56:24 +0000

    app-office/libreoffice: fix build with gcc 14 for 7.5.x
    
    Closes: https://bugs.gentoo.org/916621
    Signed-off-by: Kostadin Shishmanov <kocelfc@tutanota.com>
    Closes: https://github.com/gentoo/gentoo/pull/33623
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/libreoffice-7.5.6.2-gcc-14.patch         | 64 ++++++++++++++++++++++
 app-office/libreoffice/libreoffice-7.5.6.2.ebuild  |  1 +
 app-office/libreoffice/libreoffice-7.5.7.1.ebuild  |  1 +
 app-office/libreoffice/libreoffice-7.5.8.2.ebuild  |  1 +
 app-office/libreoffice/libreoffice-7.5.9999.ebuild |  1 +
 5 files changed, 68 insertions(+)