Installing and uninstalling HAMLIB the right way - jharwinbarrozo/rotcontrol GitHub Wiki

High level steps to do:

cd /inside/the/source/directory which is usually at ~/home/ubuntu/hamlib-4.0~git
./configure
make
make check
sudo apt install checkinstall
*make install but we will be using checkinstall here; so
sudo checkinstall
sudo ldconfig

NOTE! If Hamlib has not been previously installed as a locally built package you will need to make sure that 'ldconfig' is configured correctly and run after 'make install'. Most modern distributions have an /etc/ld.so.conf.d/ directory where local configuration can be made. Later versions of Debian and derivatives have a file named 'libc.conf' in this directory. The contents of libc.conf are:

libc default configuration
/usr/local/lib

For installing snapshot build:

  1. Download the latest daily snapshot build here:
    n0nb.users.sourceforge.net
  2. cd ./Downloads
  3. tar -xvzf hamlib-4.0~git-xxxxxxxxxxx-2020MMDD.tar.gz or you can just use the GUI archive manager and put the extracted file to /home/ubuntu, this will create a folder named hamlib-4.0~git
  4. cd hamlib-4.0~git
  5. ./configure --prefix=$HOME/local
    Convention is that local packages be placed in /usr/local away from distribution installed packages This is the default location for the snapshots so it may be disregarded unless you wish to install Hamlib elsewhere. The example above would install Hamlib to the user's home directory under the 'local' subdirectory.
  6. make
  7. make check this will make sure everything working well
  8. sudo checkinstall you need to sudo
  9. Answer y to create /doc-pak
  10. You can write a description for this snapshot build for example:
    snapshot build dated 03/17/2020
  11. Enter to continue
  12. Some of the files created by the installation are inside the home directory: /home
    You probably don't want them to be included in the package.
    Do you want me to list them? [n]: N
  13. Should I exclude them from the package? Y
  14. Done. The new package has been installed and saved to

/home/ubuntu/hamlib-4.0~git/hamlib_4.0~git-1_amd64.deb

You can remove it from your system anytime using:

sudo dpkg -r hamlib

To run and test this hamlib:

you should be insert the path to where the rigctl and rotctl is located (/home/ubuntu/local/bin)

/home/ubuntu/local/bin/rigctld
/home/ubuntu/local/bin/rotctld

rigctld with d stands for daemon

Helpful to know

cd into the hamlib-4.0~git (this is the source location), invoking:
make clean will delete the binary files from the source directory after compiling
make distclean remove the Makefiles and other build files generated by 'configure', along with the binary files as with 'make clean' above

Compiling from source(github)

if you do the git clone method git clone -n https://github.com/hamlib/hamlib.git make sure to run autoreconf -i prior to ./configure

git log -1 - will give information which commit you are currently checked out.
git checkout master - will put head to master.
git pull - will pull all current update from github repo git checkout b244fe2 - this is the latest working hamlib commit