AW: How to debug marble-qt in build folder without sudo make install

Torsten Rahn tackat at t-online.de
Mon Mar 20 07:20:57 GMT 2023


Hello Cui,
 
> ./marble --marbledatapath=<prefix>/marble/data
 
Oh that looks like the source directory.
 
> Do you also need to do the manual install/copy step to setup environment?
 
Yes that is the preferred way to do it. You can try to find your way 
keeping things in the build directory - and it's possible to do that - but 
it you need to make the adjustments to the data and plugin path in that 
case.
 
So better do the install, e.g. like this:
 
After doing the compilation via "make", have you actually installed the 
application (via make install)?
 
Let me quickly tell how this works on the commandline:
 
Create a build directory next to your sources - which I have  located in 
~/marble/sources in my example:
 
tackat at tackat-ThinkPad-T440p:~/marble$ mkdir mybuild
 
tackat at tackat-ThinkPad-T440p:~/marble$ cd mybuild/

(if you have Qt installed via the maintenance tool then you might need to 
tell where your Qt installation is e.g. via:  export 
Qt5_DIR=/opt/Qt/5.14.2/gcc_64/)
 
Start the build via:
 
tackat at tackat-ThinkPad-T440p:~/marble/mybuild$ cmake ../sources

Do the "install" step via:
 
tackat at tackat-ThinkPad-T440p:~/marble/mybuild$ sudo cmake --build . 
--target all && sudo cmake --build . --target install

If you use Qt Creator you probably need to add the last step under the 
project tab in the build section.
 
Best regards
Torsten
 
 
 
 
 
 
 
 
-----Original-Nachricht-----
Betreff: RE: How to debug marble-qt in build folder without sudo make 
install
Datum: 2023-03-20T07:57:27+0100
Von: "王璀 WANG Cui" <iucgnaw at msn.com>
An: "Torsten Rahn" <tackat at t-online.de>, "Mailinglist, Marble-Devel" 
<marble-devel at kde.org>
 
 
 

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 <tackat at t-online.de>
Sent: Monday, March 20, 2023 2:59 AM
To: 王璀 WANG Cui <iucgnaw at msn.com>; Mailinglist, Marble-Devel 
<marble-devel at 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" <iucgnaw at msn.com <mailto:iucgnaw at msn.com> >
An: "Torsten Rahn" <tackat at t-online.de <mailto:tackat at t-online.de> >, 
"Mailinglist, Marble-Devel" <marble-devel at kde.org
<mailto:marble-devel at 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 <tackat at t-online.de <mailto:tackat at t-online.de> >
Sent: Sunday, March 19, 2023 11:33 PM
To: ?? WANG Cui <iucgnaw at msn.com <mailto:iucgnaw at msn.com> >; Mailinglist, 
Marble-Devel <marble-devel at kde.org <mailto:marble-devel at 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" <iucgnaw at msn.com <mailto:iucgnaw at msn.com> >
An: "marble-devel-owner at kde.org <mailto:marble-devel-owner at kde.org> " <
marble-devel-owner at kde.org <mailto:marble-devel-owner at 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.

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20230320/d3c459f7/attachment-0001.htm>


More information about the Marble-devel mailing list