Git Product home page Git Product logo

Comments (6)

krf avatar krf commented on May 13, 2024

This is the problem:

QLibraryPrivate::loadPlugin failed on "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5: version `Qt_5' not found (required by /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5))"

Try this before running hotspot:
export LD_LIBRARY_PATH=/home/alex/local/qt/5.9.1/gcc_64/lib/:$LD_LIBRARY_PATH

from hotspot.

suy avatar suy commented on May 13, 2024

Thank you Kevin. Indeed, the library path did work. I don't get why other projects don't need it, though. I tried with another cmake-based one (neovim-qt) and it worked. I think for qmake based binaries the rpath is set to where the Qt libaries are, so you don't need it. GammaRay also has it set. Is that something that could be added to hotspot, or is intentional?

Thank you.

from hotspot.

krf avatar krf commented on May 13, 2024

We could fix that by adding something like this to the root CMakeLists.txt:

set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")

from hotspot.

krf avatar krf commented on May 13, 2024

Sorry, nope, that would not fix your particular issue.

from hotspot.

krf avatar krf commented on May 13, 2024

Actually, CMake is instructed to actually store the RPATH of the linked libraries in the resulting binary. It does that here for me (CMake version 3.7.2):

% readelf -d  /home/kfunk/devel/install/master/bin/hotspot
 ...
 0x000000000000001d (RUNPATH)            Library runpath: [/home/kfunk/devel/install/master/lib/x86_64-linux-gnu:/home/kfunk/devel/install/kf5/lib/x86_64-linux-gnu:/home/kfunk/devel/build/qt5.8/qtbase/lib]
 ...

hotspot's CMakeLists.txt already has this, which should enforce this behavior:

if(NOT DEFINED CMAKE_INSTALL_RPATH_USE_LINK_PATH)
  set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()

Maybe your CMake version is broken...?

from hotspot.

suy avatar suy commented on May 13, 2024

I have little experience with CMake, so I can't tell much about the build files, but I can assure you that RPATH is not working for me. I'm get this in "plain" Ubuntu 16.04 and with KDE Neon (also based in that LTS). I don't think CMake will be broken in such a widely used distribution:

$ objdump -p ./gammaray/bin/gammaray |grep PATH                                                                                   
  RPATH                /home/alex/local/gammaray/lib:/home/alex/local/qt-5.2/lib
$ objdump -p ./hotspot/bin/hotspot |grep PATH                                                                                     
  RUNPATH              /home/alex/local/hotspot/lib/x86_64-linux-gnu:/home/alex/local/qt/5.9.1/gcc_64/lib

In your quote, see that RUNPATH is set as well, but not RPATH. :)

Setting LD_LIBRARY_PATH is fine, so not a big deal, maybe. I'll edit the title of the issue.

from hotspot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.