Bug 248703 - graphics/gdal: Fails to build after poppler 20.08 update: ./pdfsdk_headers.h:53:37: error: invalid digit '8' in octal constant
Summary: graphics/gdal: Fails to build after poppler 20.08 update: ./pdfsdk_headers.h:...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Tobias C. Berner
URL:
Keywords: needs-qa, regression
Depends on:
Blocks:
 
Reported: 2020-08-17 15:10 UTC by John Hein
Modified: 2020-08-18 14:21 UTC (History)
4 users (show)

See Also:


Attachments
Patch that makes gdal build with poppler enabled (619 bytes, text/plain)
2020-08-17 22:52 UTC, russo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2020-08-17 15:10:41 UTC
In file included from pdfdataset.cpp:36:
In file included from ./gdal_pdf.h:53:
./pdfsdk_headers.h:53:37: error: invalid digit '8' in octal constant
#if !(POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 73)


POPPLER_MINOR_VERSION is set by the configure script to '08' (from 'pkgconf --modversion poppler' + sed to extract the 08 part of 20.08.0).

This error is generated from clang 8 on 11.4 (base c++).  But clang++11 doesn't like it either.  Nor does g++9.
Comment 1 John Hein 2020-08-17 15:31:57 UTC
Apparently the exp-run from bug 248419 did not catch this for some reason.

The latest released gdal 3.1.2 does not have the fix, but there is an upstream commit:

https://github.com/OSGeo/gdal/commit/2b863dbabdc2a7d724f9fdf3e6ff20a142b619f6#diff-586e3bcb3ce8ae39b270d0fababb2770
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2020-08-17 18:50:02 UTC
(In reply to John Hein from comment #0)
Moin moin 

It was not caught by the exp-run as the POPPLER-option is off by default.



mfg Tobias
Comment 3 russo 2020-08-17 22:52:59 UTC
Created attachment 217291 [details]
Patch that makes gdal build with poppler enabled

This file, dumped into graphics/gdal/files, will apply the upstream patch and make gdal build with poppler again.
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-08-18 14:20:56 UTC
A commit references this bug:

Author: tcberner
Date: Tue Aug 18 14:19:55 UTC 2020
New revision: 545232
URL: https://svnweb.freebsd.org/changeset/ports/545232

Log:
  graphics/gdal: add upstream fix for poppler 20.08.x

  - graphics poppler changed the versionsing scheme
  - add upstream patch to handle the minor-release with leading zeroes.
  - the exp-run in pr 248419 could not catch this as the option is off by default
  - obtained from upstream:
  	https://github.com/OSGeo/gdal/commit/2b863dbabdc2a7d724f9fdf3e6ff20a142b619f6.patch

  PR:		248703
  Submitted by:	russo@bogodyn.org
  Reported by:	John Hein <jcfyecrayz@liamekaens.com>

Changes:
  head/graphics/gdal/files/patch-configure
Comment 5 Tobias C. Berner freebsd_committer freebsd_triage 2020-08-18 14:21:38 UTC
Committed. Thanks.