NetLogger Install using FreeBSD’s Linux Binary Compatibility

As an active Amateur Radio Operator, I utilize NetLogger on a daily basis. Nearly all of the Amateur Radio Applications I use have native FreeBSD packages with the exception of NetLogger. NetLogger is a Net Management Tool for Ham Radio. It’s a great QT Application available for Windows, MacOS, and Linux. NetLogger is available as a free application but the source code is not open source which is unfortunate. In any case, a Linux Binary and associated dependency libraries are available.

NetLogger can be downloaded at https://netlogger.org. I chose the Stable Version 3.1.5 Linux Tar Archive — 32 Bit.

Configuring FreeBSD’s Linux Binary Compatibility 

Loading the Linux Kernal Module

Before attempting to install the port, load the Linux Kernal Module, otherwise it will fail! Please read the Chapter 10 of the FreeBSD Handbook – Linux Binary Compatibility.

# kldload linux

For 64-bit Compatability:

# kldload linux64

To verify the module is loaded:

# kldstat

Installing the Meta Port of Linux Libraries and Binaries on a FreeBSD System:

# pkg install emulators/linux-c7

The linux-c7 Meta Port was chosen in lieu of the linux_base-c7 pkg since NetLogger is a more complex Linux Application requiring X11 capabilities.

Please read the pkg messages after installing the pkg as it requires several entries to /etc/fstab for compatible Linux mounted file systems.

Modify /etc/fstab to include the following:

linprocfs /compat/linux/proc linprocfs rw 0 0
linsysfs /compat/linux/sys linsysfs rw 0 0
tmpfs /compat/linux/dev/shm tmpfs rw,mode=1777 0 0

To enable Linux compatibility at boot time, add this line to /etc/rc.conf:

linux_enable="YES"

Installing Linux RPM-based applications:

To install Linux RPM-based applications, the following pkg needs to be installed:

# pkg install archivers/rpm4

To install RPM Packages, initialize the database with the following commands:

# mkdir -p /var/lib/rpm
# /usr/local/bin/rpm --initdb

This is needed to install dependencies needed to ensure NetLogger will run.

Now is a great time to reboot your computer!

Download and unpacking Netlogger:

At the time of this post, the latest stable version of Netlogger is 3.15 (Linux Tar Archive). An attempt to install the 64-bit version of NetLogger were not successful. Once downloaded, untar the tarball with your favorite archiver or tar command. Netlogger can be downloaded at https://netlogger.org

Once the tarball is unpacked, print out the README file. It is a resource vital to the installation in FreeBSD utilizing the linux compatibility layer.

Reviewing the contents of the tarball, there is an install script. The install script will create a directory and a custom install script:

Directory Location:     /usr/local/share/netlogger 

Note: The directory created will contain the Netlogger Binary, QT Libraries, plugins, etc. Also, do not create this directory as the install scripts will auto create it.

Script Location:     /usr/local/bin/netlogger*

Note: The install script will create custom Netlogger shell script.

Run the install script:

In the directory where the Netlogger tarball was unpacked, run the following command:

# ./install
  NetLogger Install Directory (should not already exists):
  /usr/local/share/netlogger
  NetLogger shell script install location (directory should exists):
  /usr/local/bin

Note: You will need to input "/usr/local/share/netlogger" and "/usr/local/bin" when prompted by the install script

Note: Do not execute the script from root@laptop:/compat/linux/ #
It may put the NetLogger directory in /compat/linux/home/xxx/.config as opposed to /home/xxx/.config/NetLogger

If the installation script was successful, you should see the following directory and installation script locations created:

/usr/local/etc/netlogger 
/usr/local/bin/netlogger*

The /usr/local/bin/netlogger script by default sends stderr to /dev/null. To determine any dependency or error issues, remove the “2> /dev/null” from the end of the last line of the script.

Starting Netlogger

Before proceed, please remove “2> /dev/null” from the netlogger script mentioned previously!

As a regular User - Not Root or SU

# /usr/local/bin/netlogger

/usr/local/share/netlogger: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

In order to resolve this dependency issue, download libpng12-1.2.50-10.el7.i686.rpm from the CentOS pkg repository. Once downloaded, use the rpm4 pkg installed earlier to add this package.

As Root or SU

# cd /compat/linux
# rpm2cpio < /path/to/libpng12-1.2.50-10.el7.i686.rpm | cpio -id

Starting Netlogger – Again

Make sure you get back to the root level and not at /compat/linux/ path

# /usr/local/bin/netlogger

More Errors!

It appears the application cannot write to the User’s .config directory. Thus, all configuration changes will not be saved. To view the configuration directories, check using “View -> Directories” option in NetLogger when it is running.

The Fix:

The fix is quite simple. Just add a directory “NetLogger” under the User’s .config directory.

# mkdir -p /usr/home/cres24/.config/NetLogger

Final Thoughts:

Once again, FreeBSD surprises me! I’m not sure if it would be a candidate to create a package/port but it would be nice. Also, this version of NetLogger 3.1.5 32-bit is working fine, the future is 64-bit. Attempts were made to include a 64-bit install of NetLogger, but were unsuccessful at this time.

Although NetLogger is free to use, it is not an open source project. The developers currently build binaries for Windows, Linux, and MacOS. Perhaps someone from the FreeBSD Ham Community could reach out to the NetLogger Team to correct this obvious oversight!

Resources:

Leave a Reply

Your email address will not be published. Required fields are marked *