Hacked my way through a problem, how to clean up>

I’m not deep into software builds. I’ve used Django, Python, a bit of C and can generally get through software installs of the ./configure-make-make-install variety, but I’m not very deep into packages and makefiles and whatnot.

My problem was that there is a feature in qsstv that filters the audio device enumeration, removing the default, hdmi and surround devices (as well as null, and a few others). On my nice new Alder Lake build the only device that is left is the S/PDIF output, which exists on the audio chipset but not in the breakout. Qsstv is a part of the amateur radio bundle, although I plan to use the system for a lot more than that.

So I got the source package and found that a library, libopenjp2 (or just openjpeg) was available but there seemed to be no development support (strange that). The qsstv build expected to see hamlib in a different place, and there were no header files (isn’t this a development OS?). So I did the following…

  1. Commented out the check for the libopenjp2 package: #PKGCONFIG += libopenjp2
  2. Commented out the offending lines from sound/alsasound.cpp that filtered my audio devices
  3. Built openjpeg from source and installed it. The compiler errors went away. There are now 2 versions on the system (2.4 from the bundle, 2.5 from the source build)
  4. The hamlib package is installed and working, but there was no header file. I copied those to /usr/local/include and the compiler errors went away.
  5. Created a softlink to /usr/lib64/libhamlib.so.4 from /usr/lib/hamlib.so
  6. Patched the Makefile to include a /usr/lib64/libopenjp2.so, after copying it to the

I feel as if I’ve slimed the system somewhat by doing this and am seeking advice on how do to it more cleanly.

I’m happy to get answers like “you should read this reference” as long as it’s under 10 pages or so.

Chris VE3NRT

I’m assuming you’re trying to prune down this block:

Which device is it dropping here that you’d like to use? We might be able to just patch it in our package.

Might also be worth a report upstream (Bug reports and comments) if it’s really dropping useful audio devices.

[standard disclaimer about being careful not to transmit system sounds]

As for building it yourself from source, the cleanest way is to install dev bundles that provide what you need. You can get libopenjp2.so from the desktop-dev bundle (sudo swupd search-file libopenjp2.so). I don’t think we bundle dev files for hamlib right now, though. The team could probably add that if it were useful.

Hi Brett,

Thank you for the response. I think I installed that bundle but might have uninstalled it before I got far enough in to the process for it to matter.

That snippet is the same code I was looking at. WSJT-X uses the same (snd_device_hints) method of inventorying the devices but has no filter. Everything shows up. For qsstv, I removed everything but null, dmix and dsnoop. While surround might not sound like a good candidate, my line-in and line-out devices both appear as surround devices as they are part of the motherboard audio hardware which includes surround, even though I don’t use it.

I appreciate the warning about system sounds. I disabled them on windows years ago, and 99% of my Linux experience is non-GUI, so it’s definitely something I’d forgotten about and should pay attention to.

I think the dev side of hamlib would be useful. Its compiled into lots of things and is very useful. I especially like having rigctld running so that multiple programs can easily share a device and have set it up as a system service.

Thanks again for your detailed response.


As a short-term workaround, can you try manually specifying your devices in ~/.config/ON4QZ/qsstv_9.0.conf, [SOUND] section? (reference)

You should see a new hamlib-dev bundle in an upcoming release.

Meanwhile, I’ll look at trimming down that filter list.

OK, I’ve patched the code and pushed a new qsstv build. You should see it in the next release or two, or spot it here.

Thanks for all this Brett. The patched version I built works but it will be nice to have the packaged version. I also contacted the developer and he is looking into it. He spun up Clear Linux in a VM for that purpose, although I think this limitation is going to be across all variants. He actually asked me how I got the header files for hamlib, so the dev version will be welcome.

I’ve tried gpredict and it works well - using rigctld to control the radio frequency for Doppler corrrection while another program uses it simultaneously for PTT. Everything is very snappy, although even Windows is pretty quick on the new hardware.

Still much work to do and plenty to learn.


qsstv 9.5.8-8 with the fix is available in Clear Linux releases >= 35840.


Thank you Brett.