Description: With (the development version of) GCC 14 (after commit https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=940645cec50 ), building of Libre Office (master commit 86828ea2e323) fails with: In file included from /home/mjambor/lo/libreoffice/store/source/storpage.hxx:27, from /home/mjambor/lo/libreoffice/store/source/storpage.cxx:20: /home/mjambor/lo/libreoffice/store/source/storbase.hxx: In static member function ‘static void* store::OStorePageObject::operator new(size_t)’: /home/mjambor/lo/libreoffice/store/source/storbase.hxx:525:21: error: ‘malloc’ is not a member of ‘std’ 525 | return std::malloc(sal_uInt32(n)); | ^~~~~~ /home/mjambor/lo/libreoffice/store/source/storbase.hxx: In static member function ‘static void store::OStorePageObject::operator delete(void*)’: /home/mjambor/lo/libreoffice/store/source/storbase.hxx:529:14: error: ‘free’ is not a member of ‘std’ 529 | std::free (p); Adding the missing include allows the compilation to proceed further: mjambor@ryzen4:~/lo/libreoffice$ git diff diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx index feac0db96227..207cbf40a8d3 100644 --- a/store/source/storbase.hxx +++ b/store/source/storbase.hxx @@ -32,6 +32,7 @@ #include <store/types.h> +#include <cstdlib> #include <memory> #include <utility> Steps to Reproduce: 1.Build gcc from the master branch and install it somewhere 2.Set the PATH to where you installed the gcc from step 1 3.Try to build LibreOffice and ponder about the build failure Actual Results: Build failure Expected Results: Build succeeds Reproducible: Always User Profile Reset: No Additional Info: Cheetah is the fastest mammal on the planet, they say.
Stephan, could you please look at it?
@Martin Jambor: Please either submit a patch (see <https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch>), or wait until I'll run into the same issue early next week with my local build against GCC trunk and provide a similar fix :)
OK, thanks for the pointer, I tried and produced https://gerrit.libreoffice.org/c/core/+/152712 But in case something is not quite right, I'm definitely fine with waiting for a week or a few.
Martin Jambor committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/db98a3f1b1a703ea8e1284b8815eea2274abb2db Add cstdlib include necessary to build with gcc14 libstdc++ (tdf#155715) It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Martin Jambor from comment #3) > OK, thanks for the pointer, I tried and produced > https://gerrit.libreoffice.org/c/core/+/152712 That's great, thanks!
(In reply to Stephan Bergmann from comment #5) > (In reply to Martin Jambor from comment #3) > > OK, thanks for the pointer, I tried and produced > > https://gerrit.libreoffice.org/c/core/+/152712 > > That's great, thanks! Though this is arguably a minor modification, it would still be great if you could also do the <https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch#Add_yourself_to_the_contributor_list> part and send a license statement to the developer mailing list.
I see, thanks, I have just sent the email: https://lists.freedesktop.org/archives/libreoffice/2023-June/090450.html
*** Bug 160464 has been marked as a duplicate of this bug. ***