PlotJuggler icon indicating copy to clipboard operation
PlotJuggler copied to clipboard

Plugins .so installed into CMAKE_INSTALL_PREFIX/bin on Linux

Open h4tr3d opened this issue 4 months ago • 5 comments

Sounds like this behavior hardcoded in the root CMakeLists.txt: https://github.com/facontidavide/PlotJuggler/blob/a614a5476785b08d7a1d4a56c1d625dd7357c0d5/CMakeLists.txt#L267

I package it into pacman format (build from AUR) and after install it looks strange:

plotjuggler /usr/bin/libDataLoadCSV.so
plotjuggler /usr/bin/libDataLoadMCAP.so
plotjuggler /usr/bin/libDataLoadParquet.so
plotjuggler /usr/bin/libDataLoadULog.so
plotjuggler /usr/bin/libDataStreamSample.so
plotjuggler /usr/bin/libDataStreamUDP.so
plotjuggler /usr/bin/libDataStreamWebSocket.so
plotjuggler /usr/bin/libDataStreamZMQ.so
plotjuggler /usr/bin/libParserDataTamer.so
plotjuggler /usr/bin/libParserLineInflux.so
plotjuggler /usr/bin/libParserROS1.so
plotjuggler /usr/bin/libParserROS2.so
plotjuggler /usr/bin/libProtobufParser.so
plotjuggler /usr/bin/libPublisherCSV.so
plotjuggler /usr/bin/libToolboxFFT.so
plotjuggler /usr/bin/libToolboxLuaEditor.so
plotjuggler /usr/bin/libToolboxQuaternion.so

h4tr3d avatar Aug 28 '25 02:08 h4tr3d

that is correct. if you have any proposal, let me know

facontidavide avatar Aug 28 '25 12:08 facontidavide

Hmm. Shared object mostly targeted to the lib. Maybe lib/PlotJuggler/. Or just provide way to override it via cmake arguments for packagers

h4tr3d avatar Aug 29 '25 00:08 h4tr3d

This issue was discovered while refactoring the Arch Linux package. I posted a quick analysis here: https://aur.archlinux.org/packages/plotjuggler#comment-1037888

Plugins (lib….so) are installed to /usr/bin, but should better be installed to /usr/lib/plogjuggler/plugins. This requires overriding PJ_PLUGIN_INSTALL_DIRECTORY (patch for CMakeLists.txt) and adding it to void MainWindow::loadAllPlugins(QStringList) in plotjuggler_app/mainwindow.cpp (maybe something for upstream?).

I think we could simply patch the path in plotjuggler_app/mainwindow.cpp and override PJ_PLUGIN_INSTALL_DIRECTORY in the CMakeLists.txt (might also require a patch because the value is determined automatically at the moment).

My suggestion is to make it possible to override PJ_PLUGIN_INSTALL_DIRECTORY in cmake and add PJ_PLUGIN_INSTALL_DIRECTORY to the search path in void MainWindow::loadAllPlugins(QStringList). Then the maintainer has the possibility to move the plugins to any location they want.

SammysHP avatar Sep 08 '25 08:09 SammysHP

you are welcome to submit a PR.

I am already juggling between multiple build systems, and multiple operative system.

Playing nice with Arch is not on my immediate todo list

facontidavide avatar Sep 28 '25 22:09 facontidavide

Thanks, I'll try to take a look at it when time permits.

SammysHP avatar Sep 29 '25 04:09 SammysHP