Created attachment 201269 [details] Patch for LO 25.2.4.X that permits it to build using clang 20.1.6 or 20.1.7 I'm unable to build LibreOffice 25.2.4.2 or 25.2.4.3 using clang 20.1.6 or 20.1.7 unless a recent commit to LibreOffice is partly reverted. The patch that I'm using is attached. If the patch is used, the build issue doesn't occur. The issue might be due to clang 20.1.6 and 20.1.7 being more strict than 20.1.5. If LibreOffice isn't patched, builds of the types listed above fail with multiple occurrences of the following error message: error: invalid argument type 'void' to unary expression The errors occur in "pdfioutdev_gpl.cxx" and "pnghelper.cxx". They're related to code of the following form: if (!something->reset()) ... "clang" objects to "!" being applied to the "something". For more information, see the attached patch. I regret that I've misplaced the commit ID for the LibreOffice commit that was responsible for the issue.
Comment on the dev chat: that is likely not about clang, but about poppler API
The whole build log would be nice, if you attached it here.
(In reply to Buovjaga from comment #1) > Comment on the dev chat: that is likely not about clang, but about poppler > API It's about clang in that the issue is a recent commit to LO that was intended to address a poppler API issue. The commit modified LO so that a build could be done against a newer poppler API but it seems to have broken compatibility with the next older poppler API. To put it another way, the combination listed below worked before, and would work now, if the LO commit was partly reverted as indicated in the attached patch. However, this would probably break compatibility with the newer API again. The proper fix is presumably to update the recent LO change so that LO can be built against either of the poppler APIs. (a) LO 25.2.4.X (b) clang 20.1.6 or 20.1.7 (c) poppler 24.08.X The attached patch therefore isn't submitted as correct and to be merged. It only indicates the minimum change that is presently needed in order for the combination to be able to build. poppler 24 is only one major release back from the currently recommended major release of 25. It's therefore believed to still be in wide use and support by LO in the context of newer clang releases is recommended.
Created attachment 201316 [details] A build log related to the issue as requested
(In reply to Buovjaga from comment #2) > The whole build log would be nice, if you attached it here. Here you go Request for log of build is fulfilled No tale of woe You'll find that to comply this coder is thrilled
P.S. To see the issue, grep the build log for the word "unary".
Looking again, my wording that starts with "It's about clang in that ..." is a little tangled. Excuse me. The point is simpler. A recent LO git commit should be modified so as to permit LO to build in a distro configuration that is likely to be common.
Nothing to do with compiler at all. Regression after commit 4f13305178c1bf88dffceb42ec15d0944b808a5c. Respective #if POPPLER_CHECK_VERSION(x, y, z) are needed, as usual, when we have changes in poppler like those; we must not just assume everyone uses the new version.
The connection to the compiler is that upstream there modified it to be more strict as of release 20.1.6. However, yes, this is a problem per se with LO. If a LO person who is more experienced than I am doesn't integrate the call suggested by the previous poster, I'll attempt to do so in due course.
(In reply to Mike Kaganski from comment #8) > Nothing to do with compiler at all. Regression after commit > 4f13305178c1bf88dffceb42ec15d0944b808a5c. Respective #if > POPPLER_CHECK_VERSION(x, y, z) are needed, as usual, when we have changes in > poppler like those; we must not just assume everyone uses the new version. yep, sorry for that. I'll submit a fix
@OldCoder, https://gerrit.libreoffice.org/c/core/+/186599 should fix it. Could you please give it a try and give me feedback ? Thanks in advance
(In reply to Xisco Faulí from comment #11) > @OldCoder, https://gerrit.libreoffice.org/c/core/+/186599 should fix it. > Could you please give it a try and give me feedback ? Thanks in advance Certainly. It's about 4:00am local time and I should catch some Z's first. But I'll try to complete the test either today or tomorrow [in my time zone].
(In reply to Xisco Faulí from comment #11) > @OldCoder, https://gerrit.libreoffice.org/c/core/+/186599 should fix it. > Could you please give it a try and give me feedback ? Thanks in advance I downloaded "de68ee1.diff.zip", replaced my patch with the one in the ZIP, and built LO 25.2.4.3 using clang 20.1.7 and poppler 24.08.0. There were no build errors and the resulting copy of LO runs for me. Thumbs up. Thank you for the patch.
(In reply to OldCoder from comment #13) > (In reply to Xisco Faulí from comment #11) > > @OldCoder, https://gerrit.libreoffice.org/c/core/+/186599 should fix it. > > Could you please give it a try and give me feedback ? Thanks in advance > > I downloaded "de68ee1.diff.zip", replaced my patch with the one in the ZIP, > and built LO 25.2.4.3 using clang 20.1.7 and poppler 24.08.0. There were no > build errors and the resulting copy of LO runs for me. > > Thumbs up. Thank you for the patch. Thanks for testing it. Pushing the patch then
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/04b92e6eab3d58e90efa04165dec4f04e9131690 tdf#167010: fix build when poppler is older than 25.2.0 It will be available in 26.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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/1d09352fc7a49e177375ce753f2cf99c89062ac9 tdf#167010: fix build when poppler is older than 25.2.0 It will be available in 25.8.0.0.beta2. 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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/dd67bacd021916952008ac15955628f2dc9ad1c2 tdf#167010: fix build when poppler is older than 25.2.0 It will be available in 25.2.5. 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.