1

/usr/lib/libpoppler.so.50: undefined reference to std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20' Makefile:156: recipe for target 'DocViewer' failed /usr/lib/libsystemd.so.0: undefined reference tolzma_stream_decoder@XZ_5.0' /usr/lib/libQt5Core.so: undefined reference to __cxa_throw_bad_array_new_length@CXXABI_1.3.8' /usr/lib/libsystemd.so.0: undefined reference tolzma_end@XZ_5.0' /usr/lib/libsystemd.so.0: undefined reference to `lzma_code@XZ_5.0' collect2: error: ld returned 1 exit status make: *** [DocViewer] Error 1 20:53:35: The process "/usr/bin/make" exited with code 2.

I get the errors mentioned above while compiling a program using poppler in Qt5.

Below is my project file, should in change something?

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = DocViewer
TEMPLATE = app

INCLUDEPATH  += /usr/include/poppler/qt5
LIBS         += -L/usr/lib -lpoppler-qt5

SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui
5
  • Looks like -llzma is also missing. Mar 28, 2015 at 15:32
  • LIBS += -L/usr/lib -lpoppler-qt5 -llzma something like this?
    – compiler
    Mar 28, 2015 at 15:42
  • Yes. But there's still that other linker error about std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20. Mar 28, 2015 at 15:43
  • can it have something to do with the glibc version installed on my system.
    – compiler
    Mar 28, 2015 at 16:35
  • Could well be an issue, yes. Try to install the actual GCC 4.9.2. Mar 28, 2015 at 16:36

1 Answer 1

0

For the "__cxa_throw_bad_array_new_length@CXXABI_1.3.8" error in libicu, it looks like the problem is an incompatible icu build (softfp vs hardfp).

I had the same error, which I solved by downloading a rebuilt ICU (to avoid rebuilding it myself).

  • Download the "POT" binaries from http://thebugfreeblog.blogspot.fr/2016/12/binaries-for-pot-550-beta1-on-qt-580.html.
  • lrzuntar the file
  • tar xf qtdeps.tar
  • on the device, move away libicu* (in my case with raspbian it was in usr/lib/arm-linux-gnueabihf), and transfer the libicu* from qtdeps over there
  • on the device, move away the "unicode" include dir (with raspbian it was in /usr/include/arm-linux-gnueabihf/unicode), and copy the unicode include dir from qtdeps over there.
  • re-sync from the device to your sysroot using rsync
  • reconfigure and rebuilt qtbase (after removing the .o files under qtbase/src/corelib that contain "icu" in the name - or rebuild Qt from scratch)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.