Created attachment 208931 [details]
Patch combining two upstream fixes to GDAL to allow it to compile with poppler 0.82
Poppler was updated a few days ago to 0.82.0, after which gdal from ports (version 2.4.2_3) will not compile with poppler support enabled. The specific issue is a compilation error about two functions in pdfdataset.cpp being declared "override" but not overriding any base class function.
Turns out this issue was addressed in GDAL's development branch specifically to allow it to compile with poppler 0.82.0, and these fixes were also back-ported to the 3.0 release branch, but the fix has not been backported to the branch associated with the 2.4 version present in FreeBSD ports. Neither has it been back-ported to 2.5. But the fixes are simple, are easy to find in github, are still applicable to 2.4, and are easy to apply as a patch in the ports tree.
Commits 20c3fc7c and 94dacee in the GDAL project github repo point to the patches needed to restore function in the FreeBSD port. I have combined these into the attached patch, which simply adds a const keyword in two places if and only if poppler of a late enough version is being used. Dropping this file into the files directory of the gdal port restores the ability to build with poppler.
Direct links to GDAL git commits that I combined to create this patch:
Non-Default options unfortunately do not get tested, so we did not catch that.
Thanks for the fix.
A commit references this bug:
Date: Thu Nov 7 05:44:09 UTC 2019
New revision: 516938
graphics/gdal: fix build of poppler option after poppler-0.82
Submitted by: firstname.lastname@example.org