Rigctl error after installing latest hamlib and wsjtx

2 posts / 0 new
Last post
Rigctl error after installing latest hamlib and wsjtx

Hello everyone.

NOTE: I run Ubuntu 20.04.03 but I suppose this explanation will help everyone running linux like operating systems.

Due to personal stuff to do these months I did not manage to update to latest WSJTX 2.5.4 so I decide to do it first available weekend. So it be.

So at first I installed wsjtx v 2.5.4 . I suppose you already know how to installed because you arrive at my page seeking for solution for the same problem I already had ;)

Unfortunately when I tried to start wsjtx (which runs under cqrlog logging software) I started to receive errors sayng there is a problem with rigctl and hamlib .

So, I started browsing the net and I find that in order to avoid such message I have to install latest hamlib. I did not know (to be honest I forgot) what version I run, so i check it first with following command:

rigctl --version

I received info that I am using existing cqrlog's hamlib version 3.3

So , I had to download latest hamlib and recompile it by myself.

There is two variants: first one is to download latest hamlib directly from it's github and the other is to connect to github with git from where in terminal you will install hamlib. Both variants will be described.

Well, hamlib's github link is https://github.com/Hamlib/Hamlib .

Here you can find latest editions and all previous ones from hamlib.

Now, I will explain both options for installing hamlib:

V.1 :
- Download latest hamlib to your computer and extract it.

- go to extracted hamlib directory and open terminal in it, starting typing these commands:

sudo ./configure
sudo make
sudo make install

V.2 : Connecting to github via git software (sudo apt get-install git)

Execute these command in your terminal:

git clone https://github.com/Hamlib/Hamlib.git
cd Hamlib
sudo ./bootstrap
sudo ./configure
sudo make
sudo make install

Later you can make update to hamlib just with typing in terminal these commands:

git pull

and recompile library again as described above.

And now comes the tricky part.

If you try to run rigctl --version you will receive this message:

rigctl: error while loading shared libraries: libhamlib.so.4: cannot open shared object file: No such file or directory

What happened, I followed all the procedure, why it this happening ???

So, I continue to search for explanation and I found it, just before quiting and removing latest hamlib and wsjtx from my computer, getting back to previous one versions. This explanation I found in just one post (at least I could find it browsing the net), saying that we have to run additional command

sudo ldconfig

This little comand explanation is : ldconfig is a utility that indexes shared object names to simplify loading on shared object libraries by executables. It scans standard directories and those found in the ld. so. conf configuration file and stores its index in ld.
This command makes rigctl to be able to detect hamlib !?

Now check rigctl:

rigctl --version

also checking

rigctl-wsjtx -- version

You should receive positive feedback in a message saying:

rigctl Hamlib 4.5~git Sat Jan 01 23:05:51 2022 +0000 SHA=18548e

Fine, looks like we managed to link rigctl with hamlib. Great.


In addition everything to work you should also do these last steps:

Open CQRLOG -> Preferences:

1. re-select you rig (in my case it is Kenwood TS480) and check com parameters.

2. change path of rigctl , replacing usr/local/binrigctl path with usr/local/binrigctl-wsjtx (this is the same path but rigctl is replaced with rigctl-wsjtx)

Close CQRLOG and open it again to reload rigctl.

Then open WSJTX and re-check config parameters also, there should not be any error now at the opening and wsjtx should work properly with your rig and cqrlog.

I hope this text will help lot of radio amateurs to solve this small but still big issue when upgrading wsjtx and hamlib .

73 de Z34PEC

My blog link to the same text: https://z34pec.blogspot.com/2022/04/wsjtx-ver-254-hamlib-44-and-rigctl.html

Rigctl error after installing latest hamlib and wsjtx


Some notes:

When you download latest hamlib from GitHub (or where ever), compile and install it by your self you sure need ldconfig to get library files up to date.
But then comes the nasty part:
If you have installed any ham radio software from installation package that install also dependencies you must be aware that when that kind of program has new version and your Linux system update installs it you will have broken Hamlib because package installation has updated your lib files and they do not any more correspond to your self compiled Hamlib.

With good luck you do not notice anything right away, but later on strange things may start to happen.

So every time your Linux system updates any ham software that has Hamlib in it's dependencies your should "sudo make install" and "sudo ldconfig" again with your self compiled hamlib.
To get rid of this the best way is to remove all from package installed ham software and reinstall then them all from self compiled sources.
A bit more work but after that the autoupdates do not mix up things any more.

And the other thing, so many times mentioned:
With Windoze it will tell user that serial port is already in use when you try to run two (or more) programs that both access your rig via serial port.
With Linux it trusts you as user to be clever enough not to use same serial port for more programs than one at a time.
Things may work, some time, but sooner or later you notice something weird when running more than one program using same serial port.

You need "switch program" that lets several programs to access same serial port by one at a time.

Hamlib rigctld is just that kind of program. Only rigctld should access your rig. All other programs should access only rigctld.

There are ways to do it.
If you use more programs than two accessing your rig (Wsjt-x, fldigi, qsstv, cqrlog etc.) the best way is to start rigctld from Linux script. Either manually started, or started by Linux boot up, or user login.
This rigctld should use your rig parameters and serial port where your rig is. If you manually start rigctld from scirpt the last two characters of rigctld starting line should be " &" (without quotes). That will keep rigctld running on background when you close command console. Starting via Linux boot up or user login makes rigctld to keep runnig on background (daemon) automated.

When rigctld is started that way you set ALL programs to use rig "Hamlib rigctld (nr #2)" via tcp at localhost port 4532.
Then there are no serial line conflicts ever as only rigctld talks to your rig.

Credit using this kind of script starting is that you can change your rig. Then you only change settings of your rigctld script .
Just stop running rigctld and start it again with another script with another rig settings.
You do not need to touch any of other program's rig settings . They all keep "Hamlib rigctld (nr #2) as before.

Or do it other way if script making feels hard:
Configure your Cqrlog/TRXControl with your rig parameters. Then always start your Cqrlog as first program (it brings rigctld up and running) and after that start other programs like wsjt-x, fldigi etc.
All those other programs should again use "Hamlib rigctld (nr #2) in their rig configurations . Then they access your rig via rigctld that was started by your Cqrlog and everyone are again happy with no serial line conflicts.

Bad side is that you always have to start Cqrlog first and keep it running all the time so that other programs can access rigctld it has started.