August 11, 2020

Gtopo on Windows WSL

I have WSL 2 installed, running Debian, and accessible via ssh. Now I would like to try doing something with it. As a first experiment, I am going to try my "gtopo" application.

Copy the Fedora executable

I simply use scp to copy the gtopo executable. When I try to run it, I get:
tom@Gila:~$ ./gtopo
./gtopo: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
This is by no means a surprise, I expected a complaint about missing libraries. Now the question is what debian package to install to provide GTK 2.0. The answer is easy enough:
apt-get install gtk2.0
This pulls in all kinds of stuff (about 1G worth) including "mono" libraries, wayland, and all kinds of bloat, but what can you do? After this finishes, I try starting gtopo and get:
tom@Gila:~$ ./gtopo
(gtopo:28670): Gtk-WARNING **: 09:06:31.060: cannot open display:
This is just what I expect, installing an X server is another issue I don't want to tackle right now.

Build from source

I start by cloning my github repository:
git clone https://github.com/trebisky/gtopo.git
cd gtopo/src
make
And it builds without errors or warnings. Apparently the development libraries and headers were also installed as part of the gtk2.0 package.

Setting up an X server, fetching map files, and actually running this is a project for another day.


Have any comments? Questions? Drop me a line!

Tom's electronics pages / [email protected]