Hi Torsten, Thanks again, I am trying to write a Placemark plugin, while sometimes the code crashes in libmarblewidget-qt5.so functions, that is why I need to debug through it.
As you helped, I go ahead 1 step advanced. I add program option as: ./marble --marbledatapath=<prefix>/marble/data And the default virtual globe show as expected. However, plugins are still not found as below Terminal: -------- $ ./marble-qt --marbledatapath=/home/ubuntu/Git/GitHub/KDE/marble/data Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. No plugins loaded. Please check if the plugins were installed in the correct path, or if any errors occurred while loading plugins. [17943:7:0320/144328.132821:ERROR:command_buffer_proxy_impl.cc(141)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer. [17970:6:0320/144328.132861:ERROR:command_buffer_proxy_impl.cc(141)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer. -------- Seems there is not such --marbleplugpath option available. I know I can: - sudo make install, to install plugins into Plugin System Path - manually copy built plugin into Plugin Local Path But still it not as I expected debug in place right after build. Maybe I can ask in different way, for Marble official developers, how do you debug every executables/libraries/plugins? Do you also need to do the manual install/copy step to setup environment? WANG Cui From: Torsten Rahn <tac...@t-online.de> Sent: Monday, March 20, 2023 2:59 AM To: 王璀 WANG Cui <iucg...@msn.com>; Mailinglist, Marble-Devel <marble-devel@kde.org> Subject: AW: How to debug marble-qt in build folder without sudo make install Hello Cui, you are correct about your investigations. Now the help for further debugging: In order to get more debug messages start Marble with marble-qt --debug-info This will also output things like === MarbleDirs: === Local Path: "/home/tackat/.local/share/marble" Plugin Local Path: "/home/tackat/.marble/plugins" Marble Data Path (Run Time) : "" Marble Data Path (Compile Time): "/usr/local/share/marble/data" Marble Plugin Path (Run Time) : "" Marble Plugin Path (Compile Time): "/usr/local/lib/marble/plugins" System Path: "/usr/local/share/marble/data" Plugin System Path: "/usr/local/lib/marble/plugins" ... which should help you to see where Marble is looking for its data and plugins. Another cue: Starting Marble with marble-qt -h This allows you to adjust data and plugin path at runtime. Adjusting it at compile-time can be achieved by changing these MARBLE_DATA_INSTALL_PATH MARBLE_PLUGIN_INSTALL_PATH in the cmake call. Hope that helps :) Which problem do you want to debug? :-) Best regards Torsten -----Original-Nachricht----- Betreff: RE: How to debug marble-qt in build folder without sudo make install Datum: 2023-03-19T17:46:19+0100 Von: "王璀 WANG Cui" <iucg...@msn.com<mailto:iucg...@msn.com>> An: "Torsten Rahn" <tac...@t-online.de<mailto:tac...@t-online.de>>, "Mailinglist, Marble-Devel" <marble-devel@kde.org<mailto:marble-devel@kde.org>> Hi Torsten, Thank you for the quick help! You are right, I am building and debug marble on Ubuntu 22.04. I do as your recommended, and added the built library paths: build/src/lib/marble build/src/lib/astro into /etc/ld.so.conf.d/local.conf Now I do can run ./marble from build folder. However, it shows a blank Marble window as attached screenshot, also below displayed in Terminal window: -------- $ ./marble-qt Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Map theme file does not exist: "" No plugins loaded. Please check if the plugins were installed in the correct path, or if any errors occurred while loading plugins. Falling back to default theme: "earth/srtm/srtm.dgml" Map theme file does not exist: "" Couldn't find a valid DGML map. [5816:7:0320/003352.567904:ERROR:command_buffer_proxy_impl.cc(141)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer. [5805:7:0320/003352.569258:ERROR:command_buffer_proxy_impl.cc(141)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer. -------- I guess it is because marble can’t find data/plugin path (which suppose to be installed by sudo make install)? Is there way to let marble also know to get such data/plugin from build folder? Thanks in advance! From: Torsten Rahn <tac...@t-online.de<mailto:tac...@t-online.de>> Sent: Sunday, March 19, 2023 11:33 PM To: ?? WANG Cui <iucg...@msn.com<mailto:iucg...@msn.com>>; Mailinglist, Marble-Devel <marble-devel@kde.org<mailto:marble-devel@kde.org>> Subject: AW: How to debug marble-qt in build folder without sudo make install Hello, thanks for looking into the adventure of compiling marble-qt (which should be relatively easy compared to other software). Your problem sounds like a typical one that frequently happens to people compiling on Ubuntu/Debian. As a possible quick fix you might want to start marble-qt on the terminal/shell via: LD_LIBRARY_PATH=/usr/local/lib marble-qt In case this works you might want to follow up on this stackoverflow question (the common place where coders borrowed their knowledge/codesamples from before chatgpt arrived): https://stackoverflow.com/questions/69061258/permanent-fix-for-export-ld-library-path-usr-local-libld-library-path Hope this helps :-) BR Torsten -----Original-Nachricht----- Betreff: How to debug marble-qt in build folder without sudo make install Datum: 2023-03-19T15:54:22+0100 Von: "?? WANG Cui" <iucg...@msn.com<mailto:iucg...@msn.com>> An: "marble-devel-ow...@kde.org<mailto:marble-devel-ow...@kde.org>" <marble-devel-ow...@kde.org<mailto:marble-devel-ow...@kde.org>> Hi, As I want to debug marble-qt and library, but after finish build, by default can run marble-qt in build folder as it won’t find library in system folder. Right now I have to run sudo make install all these files, then debug it. I just wonder is there a way to run marble-qt and let it find library and data in the marble/build folder, without have to install them after rebuild? Thanks in advance.