Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to link against Poppler library?
Forum Updated to NodeBB v4.3 + New Features

How to link against Poppler library?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt5.5.1popplerdebianlinux
15 Posts 3 Posters 7.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • michaelLM Offline
    michaelLM Offline
    michaelL
    wrote on last edited by
    #6

    @sneubert well i copy the libpopper-qt5.so to /usr/lib/ and i got this issues:
    /usr/lib//libpoppler-qt5.so: file not recognized: File format not recognized
    collect2: error: ld returned 1 exit status
    Makefile:315: recipe for target 'vasoport' failed
    make: *** [vasoport] Error 1
    15:53:36: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project vasoport (kit: Qt 5.5.1 i.MX6)
    When executing step "Make"

    1 Reply Last reply
    0
    • michaelLM Offline
      michaelLM Offline
      michaelL
      wrote on last edited by
      #7

      @sneubert i remove the copied file and i get this error message after qmake->rebuild:
      lQt5SerialPort -lQt5Core -lGLESv2 -lEGL -lGAL -lpthread
      /usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lpoppler-qt5
      Makefile:315: recipe for target 'vasoport' failed
      collect2: error: ld returned 1 exit status
      make: *** [vasoport] Error 1
      15:56:14: The process "/usr/bin/make" exited with code 2.
      Error while building/deploying project vasoport (kit: Qt 5.5.1 i.MX6)
      When executing step "Make"

      1 Reply Last reply
      0
      • sneubertS Offline
        sneubertS Offline
        sneubert
        wrote on last edited by
        #8

        Ok, now i see your are building for an embedded target (i.MX6). Your poppler lib is from your host and sure for X86, you need ARM.
        You need to get a poppler lib build matching your target, or compile poppler yourself.

        1 Reply Last reply
        2
        • michaelLM Offline
          michaelLM Offline
          michaelL
          wrote on last edited by
          #9

          @sneubert thank you!
          My ARM is also CPU is also running on debian. Where can i get poppler for ARM?
          I found this https://archlinuxarm.org/packages/arm/poppler-qt5

          1 Reply Last reply
          0
          • sneubertS Offline
            sneubertS Offline
            sneubert
            wrote on last edited by
            #10

            Your target is running debian, just try to download the package with something like
            sudo apt-get install libpoppler-qt5-dev on your target.
            This should install the libraries on your target.
            Do you use a copy of your remote target for sysroot, or nfs to access the target libs?
            If you have a copy, just copy libpoppler-qt5 from your target to your host sysroot.

            1 Reply Last reply
            1
            • michaelLM Offline
              michaelLM Offline
              michaelL
              wrote on last edited by
              #11

              @sneubert thank again! I have a copy. I install and copy the libpoppler-qt5.so file from imx6 to 0x86.
              Now i get 379 undefined reference:
              ......
              /usr/lib/arm-linux-gnueabihf//libpoppler-qt5.so: undefined reference to gfree' /usr/lib/arm-linux-gnueabihf//libpoppler-qt5.so: undefined reference to PageTransition::~PageTransition()'
              /usr/lib/arm-linux-gnueabihf//libpoppler-qt5.so: undefined reference to Dict::lookup(char const*, Object*, int)' /usr/lib/arm-linux-gnueabihf//libpoppler-qt5.so: undefined reference to GfxFont::locateFont(XRef*, bool)'
              /usr/lib/arm-linux-gnueabihf//libpoppler-qt5.so: undefined reference to QDomNode::~QDomNode()' /usr/lib/arm-linux-gnueabihf//libpoppler-qt5.so: undefined reference to QDomNode::nextSibling() const'
              /usr/lib/arm-linux-gnueabihf//libpoppler-qt5.so: undefined reference to PDFDoc::processLinks(OutputDev*, int)' /usr/lib/arm-linux-gnueabihf//libpoppler-qt5.so: undefined reference to OutputDev::setDefaultCTM(double*)'
              /usr/lib/arm-linux-gnueabihf//libpoppler-qt5.so: undefined reference to `AnnotCaret::AnnotCaret(PDFDoc*, PDFRectangle*)'
              collect2: error: ld returned 1 exit status
              make: *** [vasoport] Error 1
              16:50:48: The process "/usr/bin/make" exited with code 2.

              Should i copy something else from ARM to the host pcb?

              1 Reply Last reply
              0
              • sneubertS Offline
                sneubertS Offline
                sneubert
                wrote on last edited by
                #12

                Sorry, of course you also need all the other dependencies, not just libpoppler-qt5.
                I alway rsync the remote library and include directories to my host sysroot, rather than copy file by file, but you can always use ldd to display dependencies.
                For example poppler on rpi yields:

                pi@raspberrypi:/usr/lib/arm-linux-gnueabihf $ ldd libpoppler-qt5.so
                        linux-vdso.so.1 (0x7ef8c000)
                        /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76eb1000)
                        libpoppler.so.46 => /usr/lib/arm-linux-gnueabihf/libpoppler.so.46 (0x76c9f000)
                        libQt5Xml.so.5 => /usr/local/qt5pi/lib/libQt5Xml.so.5 (0x76c6f000)
                        libQt5Widgets.so.5 => /usr/local/qt5pi/lib/libQt5Widgets.so.5 (0x7674c000)
                        libQt5Gui.so.5 => /usr/local/qt5pi/lib/libQt5Gui.so.5 (0x762dd000)
                        libQt5Core.so.5 => /usr/local/qt5pi/lib/libQt5Core.so.5 (0x75dc8000)
                        libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x75ceb000)
                        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x75baa000)
                        /lib/ld-linux-armhf.so.3 (0x54b19000)
                        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x75b7d000)
                        liblcms2.so.2 => /usr/lib/arm-linux-gnueabihf/liblcms2.so.2 (0x75b31000)
                        libtiff.so.5 => /usr/lib/arm-linux-gnueabihf/libtiff.so.5 (0x75ab9000)
                        libjpeg.so.62 => /usr/lib/arm-linux-gnueabihf/libjpeg.so.62 (0x75a63000)
                        libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0x75a33000)
                        libopenjpeg.so.5 => /usr/lib/arm-linux-gnueabihf/libopenjpeg.so.5 (0x75a04000)
                        libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0x759c2000)
                        libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0x7592a000)
                        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x75901000)
                        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x75886000)
                        libGLESv2.so.2 => /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 (0x75861000)
                        libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x7583a000)
                        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x75826000)
                        libgthread-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgthread-2.0.so.0 (0x75814000)
                        libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0x75711000)
                        librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x756fa000)
                        liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0x756d3000)
                        libjbig.so.0 => /usr/lib/arm-linux-gnueabihf/libjbig.so.0 (0x756b6000)
                        libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0x75683000)
                        libEGL.so => /opt/vc/lib/libEGL.so (0x7564a000)
                        libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x75624000)
                        libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x7560e000)
                        libvcos.so => /opt/vc/lib/libvcos.so (0x755f4000)
                        libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0x75580000)
                
                1 Reply Last reply
                2
                • michaelLM Offline
                  michaelLM Offline
                  michaelL
                  wrote on last edited by
                  #13

                  @sneubert I did "apt-get install libpoppler-qt5-dev" on the iMx6 and i after that the iMx6 give me if i start my Qt Application:
                  symbol lookup error: /usr/local/qt5.5.1/plugins/egldeviceintegrations/libqeglfs-viv-integration.so: undefined symbol: fbGetDisplayByIndex
                  Application finished with exit code 127.

                  1 Reply Last reply
                  0
                  • sneubertS Offline
                    sneubertS Offline
                    sneubert
                    wrote on last edited by sneubert
                    #14

                    I just made a short google search onfbGetDisplayByIndex and it seems to be a quit common issue. In the search result there are many points to start.
                    Do other application without poppler, but with qt run on your iMx6?

                    1 Reply Last reply
                    0
                    • michaelLM Offline
                      michaelLM Offline
                      michaelL
                      wrote on last edited by
                      #15

                      @sneubert just saw the license from poppler and i want to use a PDF viewer with LGPLV3 like QtLabs PDF module instead, so i think i will go on from there but thanks for your help

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved