Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 681338 - app-text/texlive-core-2017-r4 fails to build with app-text/poppler 0.75.*: pdftoepdf.cc:290:31: error: use of deleted function 'Object& Object::operator=(const Object&)'
Summary: app-text/texlive-core-2017-r4 fails to build with app-text/poppler 0.75.*: pd...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: poppler-0.75.0 685284
  Show dependency tree
 
Reported: 2019-03-23 00:32 UTC by Andreas Sturmlechner
Modified: 2019-05-08 22:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (app-text:texlive-core-2017-r4:20190322-232315.log,717.37 KB, text/x-log)
2019-03-23 00:32 UTC, Andreas Sturmlechner
Details
texlive-core-2017-poppler075.patch (texlive-core-2017-poppler075.patch,7.07 KB, patch)
2019-03-31 11:53 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
texlive-core-2017-luatex-poppler-0.75.patch (texlive-core-2017-luatex-poppler-0.75.patch,5.88 KB, patch)
2019-05-08 01:57 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
texlive-core-2017-pdftex-poppler-0.75.patch (texlive-core-2017-pdftex-poppler-0.75.patch,5.68 KB, patch)
2019-05-08 02:01 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sturmlechner gentoo-dev 2019-03-23 00:32:27 UTC
Created attachment 570330 [details]
build.log

Brought to you by masked app-text/poppler-0.75.0.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2019-03-31 10:04:13 UTC
Many *NF functions have been changed to return 'const Object' objects, instead of 'Object' objects:

--- poppler-0.74.0/poppler/Array.h
+++ poppler-0.75.0/poppler/Array.h
@@ -71 +71,2 @@
-  Object getNF(int i) const;
+  Object get(int i, Ref *returnRef, int recursion = 0) const;
+  const Object &getNF(int i) const;
--- poppler-0.74.0/poppler/Dict.h
+++ poppler-0.75.0/poppler/Dict.h
@@ -79 +79,2 @@
-  Object lookupNF(const char *key) const;
+  Object lookup(const char *key, Ref *returnRef, int recursion = 0) const;
+  const Object &lookupNF(const char *key) const;
@@ -85 +86 @@
-  Object getValNF(int i) const { return entries[i].second.copy(); }
+  const Object &getValNF(int i) const { return entries[i].second; }
--- poppler-0.74.0/poppler/Object.h
+++ poppler-0.75.0/poppler/Object.h
@@ -273 +273 @@
-  Object arrayGetNF(int i) const;
+  const Object &arrayGetNF(int i) const;
@@ -283 +283 @@
-  Object dictLookupNF(const char *key) const;
+  const Object &dictLookupNF(const char *key) const;
@@ -286 +286 @@
-  Object dictGetValNF(int i) const;
+  const Object &dictGetValNF(int i) const;


Another type of error:

/var/tmp/portage/app-text/texlive-core-2017-r4/work/texlive-20170524-source/texk/web2c/luatexdir/lua/lepdflib.cc: In function ‘int m_Object_initRef(lua_State*)’:
/var/tmp/portage/app-text/texlive-core-2017-r4/work/texlive-20170524-source/texk/web2c/luatexdir/lua/lepdflib.cc:1503:43: error: no matching function for call to ‘Object::Object(int&, int&)’
     *((Object *) uin->d) = Object(num, gen);
                                           ^

Relevant change:
--- poppler-0.74.0/poppler/Object.h
+++ poppler-0.75.0/poppler/Object.h
@@ -175,2 +175,2 @@
-  Object(int numA, int genA)
-    { type = objRef; ref.num = numA; ref.gen = genA; }
+  explicit Object(const Ref r)
+    { type = objRef; ref.num = r.num; ref.gen = r.gen; }

struct Ref exists also in older Poppler and is declared:
struct Ref {
  int num;                      // object number
  int gen;                      // generation number
};

So Object::Object(const Ref) should be called.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2019-03-31 11:53:18 UTC
Created attachment 571372 [details, diff]
texlive-core-2017-poppler075.patch

This patch replaces problematic calls to *NF functions with calls to non-*NF functions.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2019-03-31 15:17:26 UTC
texk/web2c/luatexdir directory contains copy of LuaTeX (dev-tex/luatex).
Recently LuaTeX upstream replaced usage of Poppler with a new library called pplib and this will be included in TeX Live 2019:

https://tug.org/svn/texlive?view=revision&revision=48591
https://tug.org/svn/texlive?view=revision&revision=48592
https://tug.org/svn/texlive?view=revision&revision=48593
https://tug.org/svn/texlive?view=revision&revision=48594

https://tug.org/pipermail/luatex/2018-October/006981.html
https://tug.org/pipermail/luatex/2018-October/006982.html
"""
We have a new pdf parser (pplib from Paweł Jackowski) that replaces
poppler.  It is much smaller, a bit faster and it's written in pure C
so it fits also well with our idea of "stable" wrt to the compiler
versions. It also removes a dependency on a large library set. We are
actively testing it but appreciate testing from "power users" (like
Hraban did at the ctx meeting). Of course our powerful buildbot farm
helps a lot in the process.
"""


texk/web2c/pdftexdir directory contains copy of pdfTeX (formerly dev-tex/pdftex).
pdfTeX still uses Poppler and unfortunately seems still incompatible with newest Poppler.
Comment 4 Andreas Sturmlechner gentoo-dev 2019-05-04 16:32:55 UTC
Unless we can update the bundled luatexdir alone we are stuck with waiting for the 2019 bump then.
Comment 5 Arfrever Frehtes Taifersar Arahesis 2019-05-08 01:57:37 UTC
Created attachment 575486 [details, diff]
texlive-core-2017-luatex-poppler-0.75.patch
Comment 6 Arfrever Frehtes Taifersar Arahesis 2019-05-08 02:01:17 UTC
Created attachment 575488 [details, diff]
texlive-core-2017-pdftex-poppler-0.75.patch

Patches need to be applied conditionally:
--- app-text/texlive-core/texlive-core-2017-r4.ebuild
+++ app-text/texlive-core/texlive-core-2017-r4.ebuild
@@ -169,3 +169,11 @@ src_prepare() {
 	if has_version ">=app-text/poppler-0.69.0"; then
 		epatch "${FILESDIR}"/${P}-poppler0{69,71,72,73}.patch # bugs #672854, 675448
 	fi
+	if has_version ">=app-text/poppler-0.75.0"; then
+		epatch "${FILESDIR}/${P}-luatex-poppler-0.75.patch"
+		epatch "${FILESDIR}/${P}-pdftex-poppler-0.75.patch"
+	fi
+	if has_version ">=app-text/poppler-0.76.0"; then
+		epatch "${FILESDIR}/${P}-luatex-poppler-0.76.patch"
+		epatch "${FILESDIR}/${P}-pdftex-poppler-0.76.patch"
+	fi
Comment 7 Larry the Git Cow gentoo-dev 2019-05-08 22:56:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a790d0f672d6f7f2e2afc0ec6c0f69fe77b86644

commit a790d0f672d6f7f2e2afc0ec6c0f69fe77b86644
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-05-08 22:45:17 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-05-08 22:56:15 +0000

    app-text/texlive-core: Fix build w/ poppler-0.75 and poppler-0.76
    
    Closes: https://bugs.gentoo.org/681338
    Closes: https://bugs.gentoo.org/685284
    Thanks-to: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-text/texlive-core/Manifest                     |   1 +
 .../files/texlive-core-2017-poppler064.patch       | 118 ---------
 .../files/texlive-core-2017-poppler069.patch       | 216 ----------------
 .../files/texlive-core-2017-poppler071.patch       | 281 ---------------------
 .../files/texlive-core-2017-poppler072.patch       | 157 ------------
 .../files/texlive-core-2017-poppler073.patch       |  74 ------
 app-text/texlive-core/texlive-core-2017-r4.ebuild  |  11 +-
 7 files changed, 10 insertions(+), 848 deletions(-)