wsjt20m-linux

Some tips for Compiling WSJT under the Feisty Fawn Version of Ubuntu Linux

First, let me suggest that you [1] see if there is a compiled version of WSJT for your version of Linux which you can just download and run without having to go through what is below, or [2] run WSJT from Windows.  The Windows version generally installs smoothly and works right out of the box.  If you have tried to compile WSJT for the Feisty Fawn version of Ubuntu Linux and things didn't work, then you may find something useful in what is written below.  Please note that I am not a computer expert, but just a user who struggled to get WSJT for Linux working and finally did get it working.  I hope to help other users with the suggestions below.  All of this is current as of late April 2007.

If you want to compile and install the latest stable version of WSJT for Linux, first go to this URL and download WSJT 5.9.6r309:

http://developer.berlios.de/projects/wsjt/

If you want to get the latest svn version, then type this while in the directory of your choice [I use /download/wsjt-svn/]:

svn checkout svn://svn.berlios.de/wsjt/trunk

I am using svn version 366 as of 4-21-2007. Note that the last stable version of WSJT [5.9.6 r309] includes a version of portaudio-v19 that does NOT provide Jack support. It also has some errors in the code that will be noted below. The later svn version of WSJT 5.9.6 corrects some of these code errors, and also allows you to specify the locations from which the portaudio include and lib files are taken. This allows you to use your own installed version of portaudio-v19 that DOES provide Jack support!

Note that if you compile using Jack support, you may run into some sampling rate issues with WSJT, as Jack requires a single fixed sampling rate.
After you have done the above, do:

apt-get install gfortran
apt-get install python-f2py
apt-get install python-scipy-core
apt-get install python-imaging-tk
apt-get install python-imaging
apt-get install libg2c0
apt-get install libg2c0-dev
apt-get install python-all
apt-get install python-all-dev
Or just install these files using Synaptic.

I made the WSJT directory for the latest stable version [5.9.6 r309] "/download", so it has address /download/wsjt596r309. I put the latest svn version in /download/wsjt-svn/trunk/. 

If you are fortunate, after you do the above typing [from the appropriate working directory as noted above]:

./configure

make

will result in a working installation for you. If so, you can ignore what is below.  However, here the installation failed because a correction needed to be made to the file wsjt and the python file wsjt.py needed to be put into a bin directory.   

Using the standard procedure did not initially result in a working installation of WSJT here at W3SZ.  Listed below is what it took to get WSJT working here.  While these recommendations are what worked here, you should proceed at your own risk.  What worked here may not work for you. 

If WSJT won't run and when you type "./wsjt" it complains with:

 Traceback (most recent call last):
   File "wsjt.py", line 10, in ?
     import Audio
ImportError: libportaudio.so.2: cannot open shared object
file: No such file or directory

then try typing from the terminal window where you are working:

"ldconfig"

and

"export LD_LIBRARY_PATH=/usr/local/lib".

If you still get the same error, then your version of libportaudio.so.2 may be inappropriate for your version of portaudio.  Welcome to the world of Linux!  You will need to point Linux to the proper PortAudio file.  Email me for help.

I needed to place a link to the file wsjt.py into the directory /usr/bin by typing:

ln -s /download/wsjt596r309/wsjt.py /usr/bin/wsjt.py

or

ln -s /download/wsjt-svn/trunk/wsjt.py /usr/bin/wsjt.py

depending upon how I constructed the directory structure [see above].

If you are using the last stable version [r309] then you must correct the links in the file ../wsjt by removing the slash '/' after 'local' and 'usr' in lines 3 and 5 respectively [this file will be in directory /download/wsjt596r309 or /download/wsjt-svn/trunk if you followed my advice above].

If you are using the last stable version [r309] then you must also modify line 12 in ../wsjt so it reads:

'cp -f /download/wsjt596r309/CALL3.TXT ~/.wsjt'

[you'll have to make the file address to suit your filesystem arrangement].

If you are using the newer svn version then you don't need to make these corrections, as the code has been corrected to reflect them, but you will need to change line 15 in this file by removing the slash '/' in front of the 'bin/wsjt.py' so that line reads:

"python ${LOCALBASE}bin/wsjt.py".


I needed to make a symbolic link for wsjt.py to the ./usr/bin directory:

ln -s /download/wsjt596r309/wsjt.py /usr/bin/wsjt.py or

ln -s /download/wsjt-svn/trunk/wsjt.py /usr/bin/wsjt.py

again depending upon the directory structure chosen.

Compiling WSJT 5.96 r309

You can compile WSJT to use either PortAudio or ALSA. Both work here. To compile the last stable version [r309] of WSJT so that it uses PortAudio, go to /download/wsjt596r309 and type "./configure --enable-portaudio". To compile to use ALSA, just type "./configure". Then you need to type 'make' and that will compile WSJT.

Before running WSJT with PortAudio you should type from the terminal window:

"ldconfig" and "export LD_LIBRARY_PATH=/usr/local/lib"

I put the export command in the file /root/.bashrc so that this environmental variable is set each time I boot up.

Once you have done the above, I hope that you will find that typing './wsjt' starts WSJT normally, and you should be off and running.  If WSJT does not start normally, see if some of the suggestions on this page fit your situation.

Here is the terminal output I get when starting WSJT using PortAudio, as the GUI appears:

******************************************************************
WSJT Version 5.9.6 r309 , by K1JT
Revision date: 2006-09-22 19:39:03 +0300 (Fri, 22 Sep 2006)
Run date: Sun Apr 1 23:46:54 2007 UTC
Can't open /dev/cuad0.
Using PortAudio.

Audio Input Output Device Name
Device Channels Channels
------------------------------------------------------------------
0 16 16 /dev/dsp
1 2 2 Intel 82801DB-ICH4: Intel 82801DB-ICH4 (hw:0,0)
2 2 0 Intel 82801DB-ICH4: Intel 82801DB-ICH4 - MIC ADC (hw:0,1)
3 2 0 Intel 82801DB-ICH4: Intel 82801DB-ICH4 - MIC2 ADC (hw:0,2)
4 2 0 Intel 82801DB-ICH4: Intel 82801DB-ICH4 - ADC2 (hw:0,3)
5 0 2 Intel 82801DB-ICH4: Intel 82801DB-ICH4 - IEC958 (hw:0,4)
6 2 2 front
7 0 2 iec958
8 0 2 spdif

Default Input: 0 Output: 0
Requested Input: 0 Output: 0
Opening device 0 for input, 0 for output.
Audio streams running normally.
******************************************************************

Compiling WSJT SVN 365 or later

If you are compiling the later svn version of WSJT you need to specify the locations of the portaudio files that WSJT is to use. By doing this you can specify that you want to use your own version of PortAudio that has Jack support. You can get an idea of your configure options for WSJT by typing "./configure --help" when in the /download/wsjt-svn/trunk directory. The configure options are currently [4/29/2007] in a state of flux.  What is typed below was correct when I typed it, but subsequent changes by the developers of WSJT for Linux could render my recommendations inappropriate.

If you configure with Jack support by adding --with-jack=yes you may find that you have sampling rate issues, because Jack requires a fixed sampling rate that must be the same across all Jack-connected devices. So to start, I would recommend that you not add Jack support. This should be the default, but you can make sure by adding --with-jack=no to the configure statement. 
If your directories are set up like mine you can go to /download/wsjt-svn/trunk and type:

./configure --enable-portaudio --with-portaudio-include-dir=/usr/portaudio/v19-devel/include --with-portaudio-lib-dir=/usr/portaudio/v19-devel/lib/.libs/ --with-jack=no

Then type 'make' and WSJT should be installed and ready to run. The terminal output I get here when I do this is:

******************************************************************
WSJT Version 5.9.6 r365 , by K1JT
Revision date: 2007-03-02 16:43:37 -0500 (Fri, 02 Mar 2007)
Run date: Sun Apr 8 02:54:22 2007 UTC
Can't open /dev/cuad0.
Using PortAudio.

Audio Input Output Device Name
Device Channels Channels
------------------------------------------------------------------
0 16 16 /dev/dsp
1 2 2 Intel 82801DB-ICH4: Intel 82801DB-ICH4 (hw:0,0)
2 2 0 Intel 82801DB-ICH4: Intel 82801DB-ICH4 - MIC ADC (hw:0,1)
3 2 0 Intel 82801DB-ICH4: Intel 82801DB-ICH4 - MIC2 ADC (hw:0,2)
4 2 0 Intel 82801DB-ICH4: Intel 82801DB-ICH4 - ADC2 (hw:0,3)
5 0 2 Intel 82801DB-ICH4: Intel 82801DB-ICH4 - IEC958 (hw:0,4)
6 2 2 front
7 0 2 iec958
8 0 2 spdif
9 6 8 freebob_pcm << not seen before
10 2 2 PortAudio-5606 << not seen before

Default Input: 0 Output: 0
Requested Input: 0 Output: 0
Opening device 0 for input, 0 for output.
Audio streams running normally.
******************************************************************

Note that now the freebob and dttsp [PortAudio-5606] devices are recognized by WSJT.


If I select any device other than 0, 1, or 6 I get the following error:

Default Input: 0 Output: 0
Requested Input: 9 Output: 0
Opening device 9 for input, 0 for output.
Error opening Audio stream for input.
Invalid sample rate
9 0 11025.000000 0 -9997 -1289975616 1 10
Error 1 in JTaudio, cannot continue.

This is because at present [4/21/2007] WSJT with PortAudio requires an 11025 Hz sampling rate, and devices other than these 3 have different sampling rates.  Hopefully future enhancements of WSJT for Linux will include the ability to resample the input so that Jack, Freebob, etc. can be used with WSJT.

To experiment and enable Jack, I used this configure command:

./configure --enable-portaudio --with-portaudio-include-dir=/usr/portaudio/v19-devel/include --with-portaudio-lib-dir=/usr/portaudio/v19-devel/lib/.libs/ --with-jack=yes

At present if you use this you will likely need to modify jtaudio.c and then recompile, due to the fact that Jack will not be running at 11025 Hz sampling rate.  I set Jack up to run at 44100 Hz, and so I just had to decimate the input stream from Jack, taking every 4th sample. I have placed my modified jtaudio.c file here, with a diff file of it vs the original jtaudio.c file here.  This is NOT a final solution, but just something I did so that I can play here while waiting for the computer experts to add resampling of the input to WSJT to the code.

The picture taken at the top of the screen was taken using my SDR-1000 running under Linux [see: A Guide to Getting Started with dttsp, by and for Beginners] with SDR-Shell, and feeding that output into WSJT 5.9.6 r309 running under Ubuntu Dapper Drake. The soundcards used were the Presonus Firebox running with FreeBob drivers, and the onboard sound on my Dell Inspiron 600m laptop.

If you have Constructive Suggestions for Specific improvements to the above, please offer them.  The above comes with no guarantees except that I spent a LOT of time solving the issues I have addressed, and even more time trying to make this a useful webpage for you.  I am hopeful that as the WSJT for Linux code matures, all of the above will become "unnecessary" and that just a simple "./configure" and "make" will result in a working WSJT installation.  That is how it should be.


Copyright 1997-2007 COPYRIGHT Roger Rehr W3SZ. All Rights Reserved

Brought to you by the folks at W3SZ