Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. No such file or directory (poppler-qt5)
Forum Updated to NodeBB v4.3 + New Features

No such file or directory (poppler-qt5)

Scheduled Pinned Locked Moved Solved Installation and Deployment
6 Posts 2 Posters 4.0k 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.
  • AlexorleonA Offline
    AlexorleonA Offline
    Alexorleon
    wrote on last edited by
    #1

    Hi.
    I'm using poppler-qt5 in the project. After building the program, I use linuxdeployqt-2-x86_64.AppImage, which creates the lib directory. There are necessary libraries, including libpoppler-qt5.so.1.
    But on another computer the terminal has an error message:
    error while loading shared libraries: libpoppler.so.67: cannot open shared object file: No such file or directory

    ldd myApp shows, that not found only libpoppler.so.67

    Qt 5.7.1, Ubuntu 14.04 x64

    .pro

    unix {
    
        # poppler-qt5
        INCLUDEPATH += /usr/local/include/poppler/qt5
        LIBS += -L/usr/local/lib -lpoppler-qt5 -lstdc++
    
        # I tried this
        #QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib
        # and this
        #QMAKE_LFLAGS += '-Wl,-rpath,\'\$$ORIGIN/lib\''
        # and this
        QMAKE_RPATHDIR += $ORIGIN/lib
    }
    

    But this does not help.

    How to add a library without using LD_LIBRARY_PATH? On the destination machine, libpoppler-dev and others are not installed.

    1 Reply Last reply
    0
    • AlexorleonA Offline
      AlexorleonA Offline
      Alexorleon
      wrote on last edited by
      #2
      # I tried this
      unix {
          # poppler-qt5
          INCLUDEPATH += /usr/local/include/poppler/qt5
          #LIBS += -L/usr/local/lib -lpoppler-qt5 -lstdc++
      
          DOLLAR=$
          QMAKE_LFLAGS += -Wl,-rpath=$${DOLLAR}$${DOLLAR}ORIGIN/lib
          LIBS += -lpoppler -lpoppler-qt5 -lstdc++
      }
      

      MakeFile:
      LFLAGS = -Wl,-rpath=$$ORIGIN/lib -Wl,-O1 -Wl,-rpath,/opt/Qt/Qt5.7.1/5.7/gcc_64/lib

      # and this
      unix {
          # poppler-qt5
          INCLUDEPATH += /usr/local/include/poppler/qt5
          #LIBS += -L/usr/local/lib -lpoppler-qt5 -lstdc++
      
          QMAKE_LFLAGS += '-Wl,-rpath,\'\$$ORIGIN/lib\'' -L/usr/local/lib
          LIBS += -lpoppler -lpoppler-qt5 -lstdc++
      }
      

      MakeFile:
      LFLAGS = -Wl,-rpath,'$$ORIGIN/lib' -L/usr/local/lib -Wl,-O1 -Wl,-rpath,/opt/Qt/Qt5.7.1/5.7/gcc_64/lib

      Which of these is correct?

      1 Reply Last reply
      0
      • AlexorleonA Offline
        AlexorleonA Offline
        Alexorleon
        wrote on last edited by
        #3

        If I copy libpoppler.so.67 to /usr/lib then the program starts. I do not understand why QMAKE_LFLAGS or QMAKE_RPATHDIR does not work.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          You can try QMAKE_LFLAGS += -Wl,-rpath,"'\$$ORIGIN'"

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          AlexorleonA 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            You can try QMAKE_LFLAGS += -Wl,-rpath,"'\$$ORIGIN'"

            AlexorleonA Offline
            AlexorleonA Offline
            Alexorleon
            wrote on last edited by
            #5

            @SGaist, unfortunately it did not work.

            MakeFile:
            LFLAGS = -Wl,-rpath,'$$ORIGIN' -Wl,-O1 -Wl,-rpath,/opt/Qt/Qt5.7.1/5.7/gcc_64/lib

            1 Reply Last reply
            0
            • AlexorleonA Offline
              AlexorleonA Offline
              Alexorleon
              wrote on last edited by
              #6

              I decided to use the script with QProcess.

              #!/bin/bash
              echo <password> | sudo -S cp </path/libpoppler.so.67> /usr/lib

              Thanks to all!

              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