View Issue Details

IDProjectCategoryView StatusLast Update
0017308ScribusBuild Systempublic2024-12-08 11:41
Reporterbrobr Assigned Tojghali  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version1.7.0.svn 
Fixed in Version1.6.3.svn 
Summary0017308: After poppler-update to 24.11 compilation stalls on importpdf (using revision 26402 )
Descriptionsee https://www.linuxquestions.org/questions/slackware-14/sbo-scripts-not-building-on-current-read-1st-post-pls-4175561999/page421.html#post6537308


Building CXX object scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o
/tmp/SBo/scribus-r26402/scribus/plugins/import/pdf/importpdf.cpp:26:10:
fatal error: poppler/ViewerPreferences.h: No such file or directory
Steps To ReproduceTry to compile from source on linux Slackware64-current of 7/11/2024

Also did not work on 1.6.2 patched for preceding poppler.
TagsNo tags attached.
PatchNo

Relationships

has duplicate 0017307 closedjghali Scribus 1.6.2 fails to build against poppler 24.11.0 

Activities

jghali

2024-11-09 08:59

administrator   ~0051548

You need to install poppler private development headers. On Ubuntu they are provided by the libpoppler-private-dev package, no idea on Slackware.

brobr

2024-11-09 17:30

reporter   ~0051549

Slackware does not split up packages into user/development; they just are as they come/are published by upstream. That file is then not published or no longer used by poppler causing a problem on scribus (which might still look for it?); a patch for inkscape for this poppler version is working (https://gitlab.com/inkscape/inkscape/-/issues/5370) but did repair a different problem, for another header: "FoFiTrueType.h".

ponce

2024-11-09 17:59

reporter   ~0051550

hi jghali,

make install doesn't seem to install the private headers: is there a cmake switch that could be missing? or do we have to install the private headers manually?

presently Slackware builds poppler with the following cmake options:

cmake \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_INSTALL_MANDIR=/usr/man \
  -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
  -DBUILD_SHARED_LIBS=ON \
  -DENABLE_QT5=ON \
  -DENABLE_XPDF_HEADERS=ON \
  -DENABLE_CMS=lcms2 \
  -DENABLE_DCTDECODER=libjpeg \
  -DENABLE_GTK_DOC=ON \
  -DENABLE_LIBOPENJPEG=openjpeg2 \
  -DENABLE_XPDF_HEADERS=ON \
  -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
  -DENABLE_ZLIB=ON \
  -DENABLE_QT6=ON \
  ..

then

make
make install

ponce

2024-11-09 20:23

reporter   ~0051551

FWIW, if I understood correctly, some poppler headers aren't installed anymore with poppler 24.11, see

https://cgit.freedesktop.org/poppler/poppler/commit/?id=38da08b
https://cgit.freedesktop.org/poppler/poppler/commit/?id=4a7665d

it could be also that as ubuntu isn't shipping 24.11 (they're still at 24.08) they probably haven't hit this yet...

jghali

2024-11-09 21:50

administrator   ~0051553

Arghh! I did not notice the ViewerPreferences.h header was not installed anymore because I build poppler on Windows and as a static library.

However it appears the issue is on poppler side because the ViewerPreferences.h should not have been removed from installed headers:
- we access ViewerPreferences class from poppler Catalog class which is exported (it is tagged with POPPLER_PRIVATE_EXPORT)
- ViewerPreferences class is accessed using the public method Catalog::getViewerPreferences()

As a consequence:
- ViewerPreferences class should also be exported and tagged with POPPLER_PRIVATE_EXPORT (it is not)
- ViewerPreferences header should be installed

ponce

2024-11-10 13:00

reporter   ~0051554

looks like the archlinux folks decided to add back to the poppler package a few needed headers...

https://gitlab.archlinux.org/archlinux/packaging/packages/poppler/-/commit/2887a34

( ref.: https://bugs.scribus.net/view.php?id=17307 )

in the meantime I opened an issue on freedesktop's gitlab

https://gitlab.freedesktop.org/poppler/poppler/-/issues/1531

ponce

2024-11-11 08:51

reporter   ~0051558

it seems the poppler devs reinstated the ViewerPreferences.h header

https://gitlab.freedesktop.org/poppler/poppler/-/commit/b9620f7
https://gitlab.freedesktop.org/poppler/poppler/-/commit/30117b1

but compilation of scribus still stops after a while

[ 79%] Building CXX object scribus/plugins/import/uniconvertor/CMakeFiles/uniconvertorplugin.dir/uniconvertorplugin_autogen/mocs_compilation.cpp.o
In file included from /tmp/SBo/scribus-1.6.2/scribus/plugins/import/pdf/pdftextrecognition.h:16,
                 from /tmp/SBo/scribus-1.6.2/scribus/plugins/import/pdf/importpdf.cpp:34:
/tmp/SBo/scribus-1.6.2/scribus/plugins/import/pdf/slaoutput.h:48:10: fatal error: poppler/CharCodeToUnicode.h: No such file or directory
   48 | #include <poppler/CharCodeToUnicode.h>
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I can confirm that building with the archlinux patch that reinstates more headers is successful.

brobr

2024-11-11 11:17

reporter   ~0051559

My excuses for having created a duplicate report; had missed the archlinux one 0017307

ponce

2024-11-13 07:47

reporter   ~0051571

Albert Astals Cid, on the poppler issue, commented about the missing headers

https://gitlab.freedesktop.org/poppler/poppler/-/issues/1531#note_2653454

I've done some tests and actually looks like some headers included by the scribus sources should not be needed and could actually be removed
```
diff -Naur scribus-1.6.2.orig/scribus/plugins/import/pdf/pdftextrecognition.h scribus-1.6.2/scribus/plugins/import/pdf/pdftextrecognition.h
--- scribus-1.6.2.orig/scribus/plugins/import/pdf/pdftextrecognition.h 2024-06-15 16:22:26.000000000 +0200
+++ scribus-1.6.2/scribus/plugins/import/pdf/pdftextrecognition.h 2024-11-13 08:44:41.003939000 +0100
@@ -16,7 +16,6 @@
 #include "slaoutput.h"
 
 #include <poppler/GfxState.h>
-#include <poppler/CharCodeToUnicode.h>
 
 /* PDF TextBox Framework */
 /*
diff -Naur scribus-1.6.2.orig/scribus/plugins/import/pdf/slaoutput.h scribus-1.6.2/scribus/plugins/import/pdf/slaoutput.h
--- scribus-1.6.2.orig/scribus/plugins/import/pdf/slaoutput.h 2024-06-15 16:22:26.000000000 +0200
+++ scribus-1.6.2/scribus/plugins/import/pdf/slaoutput.h 2024-11-13 08:44:47.075939000 +0100
@@ -45,8 +45,6 @@
 #include <poppler/Form.h>
 #include <poppler/Page.h>
 #include <poppler/Catalog.h>
-#include <poppler/CharCodeToUnicode.h>
-#include <poppler/FontEncodingTables.h>
 #include <poppler/splash/SplashFontFileID.h>
 #include <poppler/splash/SplashFontFile.h>
 #include <poppler/splash/SplashFontEngine.h>
```
while splash/SplashFont.h (in addition to ViewerPreferences.h, already reinstated) is actually used.

see https://gitlab.freedesktop.org/poppler/poppler/-/issues/1531#note_2653766

ponce

2024-11-13 20:45

reporter   ~0051572

Albert Astals Cid kindly reinstated also the SplashFont.h header

https://gitlab.freedesktop.org/poppler/poppler/-/commit/6a87cf2
https://gitlab.freedesktop.org/poppler/poppler/-/commit/5ec4d46

so, after the above patch which removes non-necessary deprecated headers is applied, scribus should build ok with the newest poppler code.

jghali

2024-11-14 00:07

administrator   ~0051573

I removed the CharCodeToUnicode.h and FontEncodingTables.h which were indeed unnecessarily included, but I still think there is an inconsistency on poppler side related to CharCodeToUnicode.h header. The GfxFont class, which is exported, has indeed a public virtual method, named getToUnicode(), enabling access to a CharCodeToUnicode object. As a consequence I think that the CharCodeToUnicode class should be exported and its header installed.

Issue History

Date Modified Username Field Change
2024-11-08 22:02 brobr New Issue
2024-11-09 08:59 jghali Note Added: 0051548
2024-11-09 17:30 brobr Note Added: 0051549
2024-11-09 17:59 ponce Note Added: 0051550
2024-11-09 20:23 ponce Note Added: 0051551
2024-11-09 21:50 jghali Note Added: 0051553
2024-11-10 13:00 ponce Note Added: 0051554
2024-11-10 17:50 jghali Relationship added has duplicate 0017307
2024-11-11 08:51 ponce Note Added: 0051558
2024-11-11 11:17 brobr Note Added: 0051559
2024-11-13 07:47 ponce Note Added: 0051571
2024-11-13 20:45 ponce Note Added: 0051572
2024-11-14 00:07 jghali Note Added: 0051573
2024-11-14 23:59 jghali Assigned To => jghali
2024-11-14 23:59 jghali Status new => resolved
2024-11-14 23:59 jghali Resolution open => fixed
2024-11-14 23:59 jghali Fixed in Version => 1.6.3.svn
2024-12-08 11:41 cbradney Status resolved => closed