Page 1 of 1

Soundtracker, goocanvas and Debian Buster

Posted: Wed Jan 15, 2020 5:24 pm
by oddy.o.lynx
Soundtracker is under development and builds nicely on Debian Buster, however the libgoocanvas on which its Instrument Editor depends is no longer available for Buster.

The quick and easy method as spelled out here https://sourceforge.net/p/soundtracker/ ... sg36886348

provides this workaround to install the Stretch version

Code: Select all

wget http://ftp.de.debian.org/debian/pool/main/g/goocanvas/libgoocanvas-dev_1.0.0-1_amd64.deb
wget http://ftp.de.debian.org/debian/pool/main/g/goocanvas/libgoocanvas3_1.0.0-1_amd64.deb
wget http://ftp.de.debian.org/debian/pool/main/g/goocanvas/libgoocanvas-common_1.0.0-1_all.deb
su -c "dpkg -i libgoocanvas-common_1.0.0-1_all.deb"
su -c "dpkg -i libgoocanvas3_1.0.0-1_amd64.deb"
su -c "dpkg -i libgoocanvas-dev_1.0.0-1_amd64.deb"
with the caveat...
There was a problem with goocanvas. SoundTracker depends on it, but in
Debian Buster, goocanvas is not available anymore. So I had to download
old packages from Debian Stretch, which is usually not a good idea.

There were also a few compiler warnings of pointer-to-int casts. This
might lead to crashes as int is usually 32 bits wide, and a pointer is
64 bits wide on recent systems.
I tend to agree with this assessment and decided to try another workaround, which may or may not be better but I prefer it.

The workaround is to manually install the necessary files in /usr/local/

To download the Debian 9 “Stretch” packages ->

Code: Select all

mkdir goocanvas
cd goocanvas
wget http://ftp.de.debian.org/debian/pool/main/g/goocanvas/libgoocanvas-dev_1.0.0-1_amd64.deb
wget http://ftp.de.debian.org/debian/pool/main/g/goocanvas/libgoocanvas3_1.0.0-1_amd64.deb
wget http://ftp.de.debian.org/debian/pool/main/g/goocanvas/libgoocanvas-common_1.0.0-1_all.deb
from that folder execute these commands to extract the files and to modify their folder structure so that they are consistent with an installation to /usr/local

Code: Select all

mkdir tmp
dpkg-deb -R libgoocanvas-common_1.0.0-1_all.deb tmp
rm -R tmp/DEBIAN/
dpkg-deb -R libgoocanvas-dev_1.0.0-1_amd64.deb tmp
rm -R tmp/DEBIAN/
dpkg-deb -R libgoocanvas3_1.0.0-1_amd64.deb tmp
rm -R tmp/DEBIAN/
mkdir tmp/usr/lib/libgoocanvas3
mkdir tmp/usr/lib/pkgconfig
mv tmp/usr/lib/x86_64-linux-gnu/pkgconfig/goocanvas.pc tmp/usr/lib/pkgconfig/
rm -R tmp/usr/lib/x86_64-linux-gnu/pkgconfig
mv tmp/usr/lib/x86_64-linux-gnu/* tmp/usr/lib/libgoocanvas3
rm -R tmp/usr/lib/x86_64-linux-gnu/
before moving everything make changes to the two lines 'prefix=' and 'libdir=' in tmp/usr/lib/pkgconfig/goocanvas.pc as follows:

Code: Select all

nano tmp/usr/lib/pkgconfig/goocanvas.pc
and change

prefix=/usr to prefix=/usr/local

and

libdir=${prefix}/lib/x86_64-linux-gnu to libdir=${prefix}/lib/libgoocanvas3

so that goocanvas.pc looks like

Code: Select all

prefix=/usr/local 
exec_prefix=${prefix}
libdir=${prefix}/lib/libgoocanvas3 
includedir=${prefix}/include

Name: GooCanvas
Description: A GTK+ canvas widget using cairo
Version: 1.0.0
Requires: gtk+-2.0 cairo
Libs: -L${libdir} -lgoocanvas
Cflags: -I${includedir}/goocanvas-1.0
move everything to /usr/local/

Code: Select all

sudo cp -R tmp/usr/* /usr/local/
add the line

Code: Select all

/usr/local/lib/libgoocanvas3

to /etc/ld.so.conf

Code: Select all

sudo nano /etc/ld.so.conf
once saved run

Code: Select all

sudo ldconfig
build soundtracker as usual