Bug 131353 - Core build fails with poppler >= 0.86.0
Summary: Core build fails with poppler >= 0.86.0
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.4.1.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Martin Whitaker
URL:
Whiteboard: target:7.1.0 target:7.0.0.1 target:6.4.5
Keywords: patch
: 133234 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-15 13:58 UTC by Martin Whitaker
Modified: 2020-06-19 14:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Suggested fix (998 bytes, patch)
2020-03-15 14:04 UTC, Martin Whitaker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Whitaker 2020-03-15 13:58:10 UTC
Description:
The libpoppler API has changed. LinkURI::getURI() now returns a std::string value.

Steps to Reproduce:
Build libreoffice core against poppler >= 0.86.0

Actual Results:
/home/iurt/rpmbuild/BUILD/libreoffice-6.4.1.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx: In member function 'virtual void pdfi::PDFOutDev::processLink(AnnotLink*)':
/home/iurt/rpmbuild/BUILD/libreoffice-6.4.1.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx:567:64: error: base operand of '->' has non-pointer type 'const string' {aka 'const std::__cxx11::basic_string<char>'}
  567 |     const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->c_str();
      |                                                                ^~

Expected Results:
No compile error.


Reproducible: Always


User Profile Reset: No



Additional Info:
N/A
Comment 1 Martin Whitaker 2020-03-15 14:04:56 UTC
Created attachment 158698 [details]
Suggested fix

This patch fixes the build error. I've not tested run-time behaviour, but it mirrors the changes made in https://gitlab.freedesktop.org/poppler/poppler/-/commit/5804f51c7cf439432082b668ba8df3b0a6048caf, so is likely correct.
Comment 2 Buovjaga 2020-03-15 15:11:59 UTC
(In reply to Martin Whitaker from comment #1)
> Created attachment 158698 [details]
> Suggested fix
> 
> This patch fixes the build error. I've not tested run-time behaviour, but it
> mirrors the changes made in
> https://gitlab.freedesktop.org/poppler/poppler/-/commit/
> 5804f51c7cf439432082b668ba8df3b0a6048caf, so is likely correct.

Could you submit the patch to gerrit for review: https://wiki.documentfoundation.org/Development/gerrit ? Thanks.

We also need a license statement: https://wiki.documentfoundation.org/Development/GetInvolved#License_statement
Comment 3 Julien Nabet 2020-05-09 15:33:34 UTC
Martin:
could you provide license statement as Buovjaga indicated with https://wiki.documentfoundation.org/Development/GetInvolved#License_statement ?
Indeed, since it's your first proposed patch, we need it.
Comment 4 Martin Whitaker 2020-05-10 16:04:14 UTC
A trivial change like that would not be subject to copyright, but I hereby place it in the public domain for anyone to use.
Comment 5 Buovjaga 2020-05-10 18:16:18 UTC
(In reply to Martin Whitaker from comment #4)
> A trivial change like that would not be subject to copyright, but I hereby
> place it in the public domain for anyone to use.

It would need to be under the MPLv2/LGPLv3+ dual license and sent to the dev list, sorry for the trouble :(
Comment 6 Xisco Faulí 2020-05-11 09:20:20 UTC
@Martin, assigning this bug to you.
Could you please send the license statement as described here https://wiki.documentfoundation.org/Development/GetInvolved#License_statement?
We can send the submit the patch to gerrit for you if you prefer so
Comment 7 Ming Hua 2020-05-21 18:03:21 UTC
*** Bug 133234 has been marked as a duplicate of this bug. ***
Comment 8 DavidO 2020-06-05 10:32:52 UTC
(In reply to Xisco Faulí from comment #6)
> @Martin, assigning this bug to you.
> Could you please send the license statement as described here
> https://wiki.documentfoundation.org/Development/
> GetInvolved#License_statement?
> We can send the submit the patch to gerrit for you if you prefer so

The patch was already sent to gerrit: [1]. Can we move it forward?
My local build is failing and it is annoying to keep the patch around.
Thanks!

[1] https://gerrit.libreoffice.org/c/core/+/93789
Comment 9 Xisco Faulí 2020-06-05 17:33:49 UTC
(In reply to DavidO from comment #8)
> (In reply to Xisco Faulí from comment #6)
> > @Martin, assigning this bug to you.
> > Could you please send the license statement as described here
> > https://wiki.documentfoundation.org/Development/
> > GetInvolved#License_statement?
> > We can send the submit the patch to gerrit for you if you prefer so
> 
> The patch was already sent to gerrit: [1]. Can we move it forward?
> My local build is failing and it is annoying to keep the patch around.
> Thanks!
> 
> [1] https://gerrit.libreoffice.org/c/core/+/93789

I've restored the patch in gerrit. See Rene's commit.
Comment 10 DavidO 2020-06-06 07:59:46 UTC
(In reply to Xisco Faulí from comment #9)
> (In reply to DavidO from comment #8)
> > (In reply to Xisco Faulí from comment #6)
> > > @Martin, assigning this bug to you.
> > > Could you please send the license statement as described here
> > > https://wiki.documentfoundation.org/Development/
> > > GetInvolved#License_statement?
> > > We can send the submit the patch to gerrit for you if you prefer so
> > 
> > The patch was already sent to gerrit: [1]. Can we move it forward?
> > My local build is failing and it is annoying to keep the patch around.
> > Thanks!
> > 
> > [1] https://gerrit.libreoffice.org/c/core/+/93789
> 
> I've restored the patch in gerrit. See Rene's commit.

Thanks. Was the license issue clarified? Can that patch be approved?
Comment 11 Commit Notification 2020-06-18 13:09:03 UTC
Martin Whitaker committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b42ab78fb871924896b3cc38a7b2f1257151f711

tdf#131353: Fix build with poppler 0.86.0

It will be available in 7.1.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.
Comment 12 Bernhard Rosenkraenzer 2020-06-18 15:16:24 UTC
Given the size (and obviousness) of the patch and the relatively large impact (is any Linux distro out there still on poppler < 0.86.0? I doubt it...), shouldn't this be fixed in the 7.0.0 branch as well?
Comment 13 Rene Engelhard 2020-06-18 20:20:59 UTC
Apparently that patch now was commited without a license statement. Ah, well.

Wrt cherry-picking: I agree, for 6.4.5 even.

https://gerrit.libreoffice.org/c/core/+/96588
https://gerrit.libreoffice.org/c/core/+/96639
https://gerrit.libreoffice.org/c/core/+/96640

(But yes, there definitely is Linux distros out there still on poppler < 0.86.0)
Comment 14 Commit Notification 2020-06-19 03:58:12 UTC
Martin Whitaker committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/0a3c7a726ee7b26ce1014083f1087747cbde9277

tdf#131353: Fix build with poppler 0.86.0

It will be available in 7.0.0.1.

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.
Comment 15 Adolfo Jayme Barrientos 2020-06-19 03:59:26 UTC
For the record, it is acceptable to us for contributors to dedicate their patches to the public domain.
Comment 16 Commit Notification 2020-06-19 14:13:07 UTC
Martin Whitaker committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/d40f36bf47814c324a1ec467c566255fb187444b

tdf#131353: Fix build with poppler 0.86.0

It will be available in 6.4.6.

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.
Comment 17 Commit Notification 2020-06-19 14:13:17 UTC
Martin Whitaker committed a patch related to this issue.
It has been pushed to "libreoffice-6-4-5":

https://git.libreoffice.org/core/commit/0c27277b90c9ddd6d16c66b895f56739c791d705

tdf#131353: Fix build with poppler 0.86.0

It will be available in 6.4.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.