How to compile WSJT under Ubuntu and Debian

by Harry Popov LZ1BB
Sep 04 2008


Several people asked how to compile WSJT as deb package provided by Ubuntu 7.10 is not working. Here is the easiest way. It was tested with Ubuntu 7.10, 8.04 and Debian Lenny distributions:
 
1. Type in terminal:

sudo apt-get build-dep wsjt

This will install all necessary dev packages needed for compilation except fftw3 libraries. To install them open Synaptic Package Menager and hit SEARCH button. Type fftw3 in the search window. Mark for installation libfftw3 and libfftw3-dev packages.

2. Download WSJT source package from:

http://lz1bb.bfra.org/wsjt/wsjt-7.0.0.r973.tar.gz

As ordinary user type in the console (terminal):

tar xzvf wsjt-7.0.0.r973.tar.gz

cd wsjt-7.0.0.r973
./configure
make clean; make

That is all!! Next just start it. IMPORTANT!!! Always cd to wsjt-7.0.0.r973 folder before running wsjt::

cd ~/wsjt-7.0.0.r973
python -O wsjt.py

I use simple script to start WSJT. Useful in case of bad memory like mine:

Create a text file called wsjt7 and copy/paste the following:

--------Copy bellow me------------
#!/bin/sh
#
# wsjt7     This shell script starts wsjt-7.0.0.r973
cd ~/wsjt-7.0.0.r973
python -O wsjt.py
--------Copy above me------------

Save file in your home folder and make it executable:
chmod +x wsjt7

If you like you could make symbolic link as root:

For Ubuntu:

sudo -s (to become root)
password (give your user password)
ln -s ~/wsjt7 /usr/bin/wsjt7
Ctrl+D (to become  ordinary user again)

For Debian:

su (to become root)
password (give your root password)
ln -s ~/wsjt7 /usr/bin/wsjt7
Ctrl+D (to become  ordinary user again)


Now you could start WSJT by simply typing wsjt7 in terminal.



For some unknown yet reasons compiled WSJT with gfortran compiler does not work on some machines. You will see the main window for a second and program crashes with "Segmentation fault" message. Solution for this problem is simple. You must install another compiler called g95 and recompile WSJT. Then all must be fine:
1. Download the g95 compiler from:

http://ftp.g95.org/#V0.91

Look at G95 Binaries and Source (Stable version 0.91, March 2008) for your architecture. For example Linux x86 package is downloaded from:

http://ftp.g95.org/v0.91/g95-x86-linux.tgz

2. Unpack the downloaded tarball (e.g. g95-x86-linux.tgz) in a directory of your choice:
tar -zxvf g95-x86-linux.tgz For your convenience, you can create another symbolic link from a directory in your $PATH (e.g. /bin) to the executable. You must be root for this. In Ubuntu:

sudo -s
ln -s $PWD/g95-install/bin/*g95* /bin/g95
Ctr+D (to go back to ordinary user)

3. Test if all is fine with g95 installation. Type g95 as command in the terminal. If all is fine you will have this answer:

g95: no input files

4. Recompile WSJT

cd ~/wsjt-7.0.0.r973
./configure --enable-g95
make clean; make



If compilation fails either with gfortran or g95 compilers check version of the package python-numpy. If it is version 1.1.0 you must downgrade to the previous python-numpy version 1.0.4 This is known problem which will be solved soon I believe.


1. Start Synaptic Package Manager. Hit SEARCH button. Type python-numpy. Mark package python-numpy for Removal and remove it.
2. Download the older python-numpy version 1.0.4 from:

http://lz1bb.bfra.org/wsjt/numpy-1.0.4.tar.gz

3. Untar and install it:

For Ubuntu:

tar xzvf numpy-1.0.4.tar.gz
cd numpy-1.0.4.tar.gz
sudo -s (to become root)
password (give your user password)
python setup.py install
Ctrl+D (to become ordinary user again)

For Debian:

tar xzvf numpy-1.0.4.tar.gz
cd numpy-1.0.4.tar.gz
su (to become root)
password (give your root password)
python setup.py install
Ctrl+D (to become ordinary user again)

This is all. Now recompile WSJT following the steps above. All must be fine now.



If you do not like the fonts and font size of WSJT just change them. Go in the folder where you compiled WSJT. Use your favourite text editor and open the file called wsjtrc. Change the fonts and/or font size figures according your choice. Actually I think you will mostly like to play with font size figures only. Save the changes and restart WSJT so changes to take effect.



Please remember that any change of Audio Device needs restart of WSJT before changes take effect.



I have problems while using default Audio Device /dev/dsp/ of WSJT program. Problems are:
   - Bad decode on FSK441
   - Programs crashes every 8 of 10 times when try to transmit on JT65.
The last was confirmed by F1EBK too.

These two problems might be connected with our local hardware but might be /dev/dsp fault. If you encounter the same behaviour just use direct card access. Usually Audio Device 1 from WSJT Setup>Options.

Some modern sound cards do not support sample rate 11025 requested by WSJT . If you have such card you will receive errors during direct access try. If so use the clue suggested by Hamish Moffatt VK3SB:
 
1. Create in your home folder empty hidden file with name:
.asoundrc

2. Copy in it the following code:

pcm.radio {
        type hw
        card 0
        device 0
}
pcm_slave.radioslave {
        pcm radio
        rate 48000
}
pcm.radioconv {
        type rate
        slave radioslave
}


3. Use appropriate Audio Device number for device called "radioconv".


Have fun!

73, Harry LZ1BB