Build Scribus 1.5.5 - specfy to CMAKE libpoppler path

Previous topic - Next topic

scriber

Hi all!
I'm trying to build Scribus 1.5.5 on my Slackware stable, which is 14.2 version.
This system has an outdated version of poppler (0.45). I can't upgrade it because on that depend many other software installed.
On the other hand Scribus-1.5.5 needs a libpoppler newer than 0.58, if I well understood... Actually it fails with a CMAKE error (lipoppler not found >= 0.58)

So I successfuly tried to build a more recent version poppler (0.68) along the old one. I built it so that it is installed in an "alternative" path:
/opt/poppler-new

# ls /opt/poppler-new/
bin/  doc/  include/  lib64/  man/  share/

# ls /opt/poppler-new/lib64/
girepository-1.0/     libpoppler-cpp.so.0.5.0*  libpoppler-glib.so.8.9.0*  libpoppler-qt4.so.4.11.0*  libpoppler.so.79.0.0*
libpoppler-cpp.so@    libpoppler-glib.so@       libpoppler-qt4.so@         libpoppler.so@             pkgconfig/
libpoppler-cpp.so.0@  libpoppler-glib.so.8@     libpoppler-qt4.so.4@       libpoppler.so.79@


I also read a bit of scribus sources and I found this:
https://gitlab.com/scribus/scribus/blob/master/cmake/modules/FindPOPPLER.cmake

If I'm not mistaken, it contains paths where CMAKE looks for poppler libs, headers and so on...

Now the question:
Is there a way to build scribus linking it to a poppler installation located in an alternative path?
(in mi specific case /opt/poppler-new ?

a.l.e

i had to do some research:

you should add

-DPOPPLER_DIR=/opt/poppler

to your cmake command.

and we are very gratefull to our debian / ubuntu maintainer for all the work he has done for getting poppler to work with scribus and debian!

i think it's one of the (important) dependencies that has given us the most headaches!

scriber

#2
Thanks for reply!

Build script I'm using launches cmake as follows:
export CC=clang
export CXX=clang++
cmake . \
  -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
  -DCMAKE_INSTALL_PREFIX:PATH=/usr \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_SKIP_RPATH=ON \
  -DLIB_SUFFIX=${LIBDIRSUFFIX} \
  -DPOPPLER_DIR=/opt/poppler-new \
  -DWANT_CPP11=1 \
  -DRENDER_LIB=CAIRO \
  -DWANT_GRAPHICSMAGICK=1


Tried to add:
-DPOPPLER_DIR=/opt/poppler-new

But still it can't find new libpoppler version... :(

a.l.e

a/ you should not install in /usr. really. but well, slackware might be a different world...
b/ you should not use the main source directory as the compile directory. you should create a build directory and do a "cmake .." instead of a "cmake .".

c/ did you run the command in a clean build directory? (if you had a build directory, the answer to this question would be more straight forward...)

sadly, if -D directive does not work, i don't really know how to get there...
you might want to ask in the cmake community (and then post here your findings as soon as you have sorted it out).

scriber

Yes /usr dir as target follows Slackware guidelines. It could be installed in something different like /usr/local, but it's just a usual line Slackware packagers follow.
Some resources:
https://slackbuilds.org/howto/
https://www.slackwiki.com/Writing_A_SlackBuild_Script

Main source dir is deleted at the begining of the slackbuild script.
I'm using this one (slackbuilds are just bash scripts):

https://github.com/gperon/mmyy_slackbuilds/blob/master/office/scribus/scribus.SlackBuild

And there you find all few files needed by slackware pkgtools (slack-desc, doinst.sh, info file etc):

https://github.com/gperon/mmyy_slackbuilds/blob/master/office/scribus

So, the environment should be clean, because build directory is re-created any time I launch slackbuild script.

Have you any links to cmake community to ask to?
Thanks anyway for your answer!  :)

a.l.e

Ok, if you're following some sort of packaging then it's fine.
I still would install it in ~/bin/scribus... but with slackware, everything is a bit different : - )

Comcerning cmake I have asked my question in #cmake on freenode and a friendly person did reply. I don't know if the channel is busy during weekends, though.


scriber

Some progress!
On #cmake chat suggested PKG_CONFIG_PATH environment variable.
It has to contain the path to the dir in which there are ".*pc" files.
For poppler is in my case:
/opt/poppler-new/lib64/pkgconfig

It has to be exported before cmake launch. In my slackbuild bash script it is added as follows:
export CC=clang
export CXX=clang++
export PKG_CONFIG_PATH=/opt/poppler-new/lib64/pkgconfig
cmake . \
  -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
  -DCMAKE_INSTALL_PREFIX:PATH=/usr \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_SKIP_RPATH=ON \
  -DLIB_SUFFIX=${LIBDIRSUFFIX} \
  -DWANT_CPP11=1 \
  -DRENDER_LIB=CAIRO \
  -DWANT_GRAPHICSMAGICK=1


With this VAR added newer version of poppler is found and config check is passed! :)

Now an other issue appears after a long time of computing.
Here's the output of building:
[ 84%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/modetoolbar.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/pdftoolbar.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/viewtoolbar.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/unicodesearch.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/vruler.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/useprintermarginsdialog.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/weldedit.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/imagedataloaders/scimgdataloader_gmagick.cpp.o
[ 85%] Building C object scribus/CMakeFiles/scribus.dir/third_party/hyphen/hnjalloc.c.o
[ 85%] Building C object scribus/CMakeFiles/scribus.dir/third_party/hyphen/hyphen.c.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/main.cpp.o
[ 85%] Linking CXX executable scribus
[ 85%] Built target scribus
[ 85%] Generating moc_xpsexplugin.cpp
[ 85%] Generating moc_svgexplugin.cpp
[ 85%] Generating ui_exportform.h
[ 85%] Generating moc_dialog.cpp
Scanning dependencies of target xpsexplugin
[ 85%] Generating moc_export.cpp
Scanning dependencies of target svgexplugin
Scanning dependencies of target scribusexportpixmap
[ 85%] Building CXX object scribus/plugins/export/xpsexport/CMakeFiles/xpsexplugin.dir/xpsexplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/export/svgexplugin/CMakeFiles/svgexplugin.dir/svgexplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/export/pixmapexport/CMakeFiles/scribusexportpixmap.dir/dialog.cpp.o
[ 85%] Building CXX object scribus/plugins/export/pixmapexport/CMakeFiles/scribusexportpixmap.dir/export.cpp.o
[ 85%] Building CXX object scribus/plugins/export/pixmapexport/CMakeFiles/scribusexportpixmap.dir/moc_dialog.cpp.o
[ 85%] Building CXX object scribus/plugins/export/pixmapexport/CMakeFiles/scribusexportpixmap.dir/moc_export.cpp.o
[ 85%] Building CXX object scribus/plugins/export/xpsexport/CMakeFiles/xpsexplugin.dir/moc_xpsexplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/export/svgexplugin/CMakeFiles/svgexplugin.dir/moc_svgexplugin.cpp.o
[ 85%] Linking CXX shared module libscribusexportpixmap.so
[ 85%] Linking CXX shared module libxpsexplugin.so
[ 85%] Built target scribusexportpixmap
[ 85%] Generating moc_importaiplugin.cpp
[ 85%] Generating moc_importai.cpp
Scanning dependencies of target importai
[ 85%] Building CXX object scribus/plugins/import/ai/CMakeFiles/importai.dir/importai.cpp.o
[ 85%] Built target xpsexplugin
[ 85%] Generating moc_importcdrplugin.cpp
[ 85%] Linking CXX shared module libsvgexplugin.so
[ 85%] Generating moc_importcdr.cpp
Scanning dependencies of target importcdr
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/__/revenge/rawpainter.cpp.o
[ 85%] Built target svgexplugin
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/importcdr.cpp.o
[ 85%] Generating moc_importcgmplugin.cpp
[ 85%] Generating moc_importcgm.cpp
Scanning dependencies of target importcgm
[ 85%] Building CXX object scribus/plugins/import/cgm/CMakeFiles/importcgm.dir/importcgm.cpp.o
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/importcdrplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/moc_importcdr.cpp.o
[ 85%] Building CXX object scribus/plugins/import/cgm/CMakeFiles/importcgm.dir/importcgmplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/moc_importcdrplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/import/ai/CMakeFiles/importai.dir/importaiplugin.cpp.o
[ 86%] Building CXX object scribus/plugins/import/cgm/CMakeFiles/importcgm.dir/moc_importcgm.cpp.o
[ 86%] Linking CXX shared module libimportcdr.so
[ 86%] Built target importcdr
[ 86%] Generating moc_importcvgplugin.cpp
[ 86%] Building CXX object scribus/plugins/import/ai/CMakeFiles/importai.dir/moc_importai.cpp.o
[ 86%] Generating moc_importcvg.cpp
[ 86%] Building CXX object scribus/plugins/import/cgm/CMakeFiles/importcgm.dir/moc_importcgmplugin.cpp.o
Scanning dependencies of target importcvg
[ 86%] Building CXX object scribus/plugins/import/cvg/CMakeFiles/importcvg.dir/importcvg.cpp.o
[ 86%] Building CXX object scribus/plugins/import/ai/CMakeFiles/importai.dir/moc_importaiplugin.cpp.o
[ 86%] Linking CXX shared module libimportcgm.so
[ 86%] Built target importcgm
[ 86%] Generating moc_importdrwplugin.cpp
[ 86%] Generating moc_importdrw.cpp
Scanning dependencies of target importdrw
[ 86%] Building CXX object scribus/plugins/import/drw/CMakeFiles/importdrw.dir/importdrw.cpp.o
[ 86%] Building CXX object scribus/plugins/import/cvg/CMakeFiles/importcvg.dir/importcvgplugin.cpp.o
[ 86%] Linking CXX shared module libimportai.so
[ 86%] Built target importai
[ 86%] Building CXX object scribus/plugins/import/drw/CMakeFiles/importdrw.dir/importdrwplugin.cpp.o
[ 86%] Building CXX object scribus/plugins/import/cvg/CMakeFiles/importcvg.dir/moc_importcvg.cpp.o
[ 86%] Building CXX object scribus/plugins/import/drw/CMakeFiles/importdrw.dir/moc_importdrw.cpp.o
[ 86%] Building CXX object scribus/plugins/import/cvg/CMakeFiles/importcvg.dir/moc_importcvgplugin.cpp.o
[ 86%] Building CXX object scribus/plugins/import/drw/CMakeFiles/importdrw.dir/moc_importdrwplugin.cpp.o
[ 86%] Generating moc_importemfplugin.cpp
[ 86%] Generating moc_importemf.cpp
Scanning dependencies of target importemf
[ 86%] Building CXX object scribus/plugins/import/emf/CMakeFiles/importemf.dir/importemf.cpp.o
[ 86%] Linking CXX shared module libimportcvg.so
[ 86%] Linking CXX shared module libimportdrw.so
[ 86%] Built target importdrw
[ 86%] Generating moc_importfhplugin.cpp
[ 86%] Built target importcvg
[ 86%] Generating moc_importidmlplugin.cpp
[ 86%] Generating moc_importfh.cpp
[ 86%] Generating moc_importidml.cpp
Scanning dependencies of target importfh
Scanning dependencies of target importidml
[ 86%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/__/revenge/rawpainter.cpp.o
[ 86%] Building CXX object scribus/plugins/import/idml/CMakeFiles/importidml.dir/importidml.cpp.o
[ 87%] Building CXX object scribus/plugins/import/emf/CMakeFiles/importemf.dir/importemfplugin.cpp.o
[ 87%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/importfh.cpp.o
[ 87%] Building CXX object scribus/plugins/import/emf/CMakeFiles/importemf.dir/moc_importemf.cpp.o
[ 87%] Building CXX object scribus/plugins/import/emf/CMakeFiles/importemf.dir/moc_importemfplugin.cpp.o
[ 87%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/importfhplugin.cpp.o
[ 87%] Building CXX object scribus/plugins/import/idml/CMakeFiles/importidml.dir/importidmlplugin.cpp.o
[ 87%] Linking CXX shared module libimportemf.so
[ 87%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/moc_importfh.cpp.o
[ 87%] Built target importemf
[ 88%] Generating moc_importodgplugin.cpp
[ 88%] Generating moc_importodg.cpp
Scanning dependencies of target importodg
[ 88%] Building CXX object scribus/plugins/import/odg/CMakeFiles/importodg.dir/importodg.cpp.o
[ 88%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/moc_importfhplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/idml/CMakeFiles/importidml.dir/moc_importidml.cpp.o
[ 88%] Linking CXX shared module libimportfh.so
[ 88%] Built target importfh
[ 88%] Generating moc_importpagesplugin.cpp
[ 88%] Generating moc_importpages.cpp
Scanning dependencies of target importpages
[ 88%] Building CXX object scribus/plugins/import/idml/CMakeFiles/importidml.dir/moc_importidmlplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pages/CMakeFiles/importpages.dir/importpages.cpp.o
[ 88%] Linking CXX shared module libimportidml.so
[ 88%] Built target importidml
[ 88%] Building CXX object scribus/plugins/import/pages/CMakeFiles/importpages.dir/importpagesplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pages/CMakeFiles/importpages.dir/moc_importpages.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pages/CMakeFiles/importpages.dir/moc_importpagesplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/odg/CMakeFiles/importodg.dir/importodgplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/odg/CMakeFiles/importodg.dir/moc_importodg.cpp.o
[ 88%] Linking CXX shared module libimportpages.so
[ 88%] Built target importpages
[ 88%] Generating moc_importpctplugin.cpp
[ 88%] Generating moc_importpct.cpp
Scanning dependencies of target importpct
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/importpct.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/importpctplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/odg/CMakeFiles/importodg.dir/moc_importodgplugin.cpp.o
[ 88%] Linking CXX shared module libimportodg.so
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/moc_importpct.cpp.o
[ 88%] Built target importodg
[ 88%] Generating ui_pdfimportoptions.h
[ 88%] Generating moc_importpdf.cpp
[ 88%] Generating moc_importpdfplugin.cpp
[ 88%] Generating moc_pdfimportoptions.cpp
Scanning dependencies of target importpdf
[ 88%] Building CXX object scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/moc_importpctplugin.cpp.o
[ 88%] Generating moc_importpmplugin.cpp
[ 88%] Generating moc_importpm.cpp
Scanning dependencies of target importpm
[ 88%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/__/revenge/rawpainter.cpp.o
[ 89%] Linking CXX shared module libimportpct.so
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:518:36: error: too few arguments to function call, expected at least 2, have 1; did
      you mean 'std::get'?
                                                                        Object orderItem = order->get(i);
                                                                                                  ^~~
                                                                                                  std::get
/usr/bin/../lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../include/c++/5.5.0/utility:147:5: note: 'std::get' declared here
    get(std::pair<_Tp1, _Tp2>& __in) noexcept
    ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:521:68: error: too few arguments to function call, expected 2, have 1
                                                                                POPPLER_CONST_075 Object POPPLER_REF ref = order->getNF(i);
                                                                                                                           ~~~~~~~~~~~~  ^
/usr/include/poppler/Array.h:69:3: note: 'getNF' declared here
  Object *getNF(int i, Object *obj);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:627:40: error: too few arguments to function call, single argument 'obj' was not
      specified
                                                Object info = pdfDoc->getDocInfo();
                                                              ~~~~~~~~~~~~~~~~~~ ^
/usr/include/poppler/PDFDoc.h:231:3: note: 'getDocInfo' declared here
  Object *getDocInfo(Object *obj) { return xref->getDocInfo(obj); }
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:632:46: error: too few arguments to function call, expected at least 2, have 1
                                                        obj = infoDict->lookup((char*) "Title");
                                                              ~~~~~~~~~~~~~~~~                ^
/usr/include/poppler/Dict.h:79:3: note: 'lookup' declared here
  Object *lookup(const char *key, Object *obj, int recursion = 0);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:637:47: error: too few arguments to function call, expected at least 2, have 1
                                                        obj = infoDict->lookup((char*) "Author");
                                                              ~~~~~~~~~~~~~~~~                 ^
/usr/include/poppler/Dict.h:79:3: note: 'lookup' declared here
  Object *lookup(const char *key, Object *obj, int recursion = 0);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:642:48: error: too few arguments to function call, expected at least 2, have 1
                                                        obj = infoDict->lookup((char*) "Subject");
                                                              ~~~~~~~~~~~~~~~~                  ^
/usr/include/poppler/Dict.h:79:3: note: 'lookup' declared here
  Object *lookup(const char *key, Object *obj, int recursion = 0);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:647:49: error: too few arguments to function call, expected at least 2, have 1
                                                        obj = infoDict->lookup((char*) "Keywords");
                                                              ~~~~~~~~~~~~~~~~                   ^
/usr/include/poppler/Dict.h:79:3: note: 'lookup' declared here
  Object *lookup(const char *key, Object *obj, int recursion = 0);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:773:53: error: too few arguments to function call, single argument 'obj' was not
      specified
                                                        Object trans = pdfDoc->getPage(pp)->getTrans();
                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/poppler/Page.h:203:3: note: 'getTrans' declared here
  Object *getTrans(Object *obj) { return trans.fetch(xref, obj); }
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:825:55: error: too few arguments to function call, single argument 'obj' was not
      specified
                                                        Object catDict = pdfDoc->getXRef()->getCatalog();
                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/poppler/XRef.h:143:3: note: 'getCatalog' declared here
  Object *getCatalog(Object *obj);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:828:50: error: too few arguments to function call, expected at least 2, have 1
                                                                Object names = catDict.dictLookup("Names");
                                                                               ~~~~~~~~~~~~~~~~~~        ^
/usr/include/poppler/Object.h:329:1: note: 'dictLookup' declared here
inline Object *Object::dictLookup(const char *key, Object *obj, int recursion)
^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:831:52: error: too few arguments to function call, expected at least 2, have 1
                                                                        Object obj = names.dictLookup("JavaScript");
                                                                                     ~~~~~~~~~~~~~~~~             ^
/usr/include/poppler/Object.h:329:1: note: 'dictLookup' declared here
inline Object *Object::dictLookup(const char *key, Object *obj, int recursion)
^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:838:48: error: too few arguments to function call, expected at least 2, have 1
                                                                names = catDict.dictLookup("OpenAction");
                                                                        ~~~~~~~~~~~~~~~~~~             ^
/usr/include/poppler/Object.h:329:1: note: 'dictLookup' declared here
inline Object *Object::dictLookup(const char *key, Object *obj, int recursion)
^
[ 89%] Built target importpct
[ 89%] Building CXX object scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdfplugin.cpp.o
12 errors generated.
scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/build.make:77: set di istruzioni per l'obiettivo "scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o" non riuscito
make[2]: *** [scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o] Errore 1
make[2]: *** Attesa per i processi non terminati....
[ 89%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/importpm.cpp.o
CMakeFiles/Makefile2:1831: set di istruzioni per l'obiettivo "scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/all" non riuscito
make[1]: *** [scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/all] Errore 2
make[1]: *** Attesa per i processi non terminati....
[ 89%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/importpmplugin.cpp.o
[ 89%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/moc_importpm.cpp.o
[ 89%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/moc_importpmplugin.cpp.o
[ 90%] Linking CXX shared module libimportpm.so
[ 90%] Built target importpm
Makefile:149: set di istruzioni per l'obiettivo "all" non riuscito


a.l.e

i guess that you should make sure that in your version of poppler, Array.h has the following signature:

Object get(int i, int recursion = 0) const;

and it took note of the shell variable. thanks for reporting it!

scriber

Mmmmm.....
So, does It seem there's just a syntax trouble!?

Actually my poppler version (0.68.0) has an Array.h file containing the following:

  // Accessors.
  Object get(int i, int resursion = 0) const;
  Object getNF(int i) const;
  GBool getString(int i, GooString *string) const;


resursion !!??

Is it a bug?

I'll try to fix it changing in recursion

Hope it solve the build process issues!!!

Thanks a lot!   :D

a.l.e

if you look at the error you will notice that it affirms that Array defines

Object *getNF(int i, Object *obj);

but you paste that 0.68.0 has

Object getNF(int i) const;

my guess is that it's still using the older poppler...

scriber

I think you are right!

"resursion" or "recursion" that doesn't seem the matter.

$ grep -A3 Accessors /usr/include/poppler/Array.h
  // Accessors.
  Object *get(int i, Object *obj, int resursion = 0);
  Object *getNF(int i, Object *obj);
  GBool getString(int i, GooString *string);


So the config is passed: poppler-0.68 is found, but then it decides to use the system older poppler 0.45, maybe it give priority to the one installed in /usr/ than the new in /opt/poppler-new...

How could I force to "cmake" to use the new poppler and not the old one?
There must be an other env variable or a build directive.
Could I try to remove old poppler, just for the time needed to  build scribus, then reinstall it. So that the only poppler available will be the new one... But I think there's a cleaner way to set which poppler installation to use.
Any ideas?

scriber

Tried to uninstall old poppler version.

Config check is passed as before due to PKG_CONFIG_PATH set to /opt/poppler-new/lib64/pkgconfig.

But when build process reach about 90% , it returns an error and It can't find poppler/Errorcodes.h file. But acctually that file is present in

/opt/poppler-new/include/poppler/ErrorCodes.h

So I think your suppose about  cmake is right: it can find poppler new version at config time, but it can't during build process.


Scanning dependencies of target importpct
[ 88%] Generating moc_importpdf.cpp
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/importpct.cpp.o
[ 88%] Generating moc_importpdfplugin.cpp
[ 88%] Generating moc_pdfimportoptions.cpp
Scanning dependencies of target importpdf
[ 88%] Building CXX object scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o
[ 88%] Linking CXX shared module libimportodg.so
[ 88%] Built target importodg
[ 88%] Generating moc_importpmplugin.cpp
[ 88%] Generating moc_importpm.cpp
Scanning dependencies of target importpm
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:21:10: fatal error: 'poppler/ErrorCodes.h' file not found
#include <poppler/ErrorCodes.h>
         ^
[ 88%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/__/revenge/rawpainter.cpp.o
1 error generated.
scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/build.make:77: set di istruzioni per l'obiettivo "scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o" non riuscito
make[2]: *** [scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o] Errore 1
CMakeFiles/Makefile2:1831: set di istruzioni per l'obiettivo "scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/all" non riuscito
make[1]: *** [scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/all] Errore 2
make[1]: *** Attesa per i processi non terminati....
[ 88%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/importpm.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/importpctplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/importpmplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/moc_importpct.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/moc_importpm.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/moc_importpmplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/moc_importpctplugin.cpp.o
[ 89%] Linking CXX shared module libimportpm.so
[ 89%] Built target importpm
[ 90%] Linking CXX shared module libimportpct.so
[ 90%] Built target importpct
Makefile:149: set di istruzioni per l'obiettivo "all" non riuscito
make: *** [all] Errore 2


I asked to #cmake chat but nobody answered.

a.l.e

hi scriber

so i think that i got through it.

on top of passing the PKG_CONFIG_PATH, you need to do the following change to your scribus sources:

https://gitlab.com/a.l.e/scribus/commit/63026e6c1b47dcfa05c223653ecf78fcec9a59ae

(this is the same as the sed command you got from Dakon)

would you mind trying it?

scriber

Yes but I have to try on 1.5.5 version because my system has cmake 3.5.2. I tried to build 1.5.6 but it complains about a newer cmake version not found.
What scribus version is your patch is related to?

a.l.e

yes, this is what i was suggesting:

try to do to your 1.5.5  the same changes i did to 1.5.6svn...

you can of course also use the sed command dakon gave you, but depending on your confidence with sed, looking at a diff might be easier to understand and apply.

ciao
a.l.e