Sunday, May 06, 2012

Build WSPR on Ubuntu 12.04

Notes for myself (and Ross, VK1UN etc). How to build WSPR on a fresh Ubuntu 12.04 desktop.

First install the dependencies:


sudo apt-get install python2.7-dev \
gfortran \
python-pmw \
python-numpy \
portaudio19-dev \
libsamplerate0-dev \

python-imaging-tk \
cl-fftw3


cd wspr
./configure \
--with-portaudio-include-dir=/usr/include \
--with-portaudio-lib-dir=/usr/lib/i386-linux-gnu

Success output from configure looks like this:

configure: creating ./config.status
config.status: creating Makefile

Using gfortran as fortran compiler.

Compiling wspr 1.11

Installing into: /usr/local/

Now build:

make

Now run:

./wspr

And you should see this:


So, it's actually getting easier in that more of the dependencies are already installed by default. The only tricky bit was figuring out where the portaudio libs live now.

Note that while you can do a "make install" to copy over the /usr/local, it won't run from there because it can't find wspr.py so I just cd to the wspr build directory and run it there with ./wspr

Update


Ross, T16AA, noted that if you are building for 64 bit linux the portaudio libraries are in a slightly different location so the configure line will be:

./configure \
  --with-portaudio-include-dir=/usr/include \
 --with-portaudio-lib-dir=/usr/lib/x86_64-linux-gnu

Thanks Ross.

9 comments:

  1. Everything worked for me, except I can't access the radio (it has the wrong rig number when I try to change frequency) and I get the error "Config parameter error: Invalid parameter" when I exit.

    Can you tell me where the config. file is please?

    Thanks,

    M0PGX

    ReplyDelete
  2. I get the error "Config parameter error: Invalid parameter" when I exit. Also, CAT isn't working because WSPR is using the wrong number fot the radio.

    Do you know where the config file is so I can edit it please?

    M0PGX :)

    ReplyDelete
  3. wspr stores its settings in a file called WSPR.INI in the same directory as the executable.

    Good luck,

    Peter

    ReplyDelete
  4. Howdy,

    I was able to build and run WSPR, and it even keys my rig, but I can't get any audio in to it. I've tried selecting all of the different audio in devices. I get these errors when I run it

    jeff@jeff-Dell-System-Inspiron-N411Z:~/ham/wspr$ wspr
    ******************************************************************
    WSPR Version 3.0.1_r2554, by K1JT
    Run date: Thu Sep 6 13:38:42 2012 UTC
    ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
    ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
    ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
    ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
    ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
    ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
    ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave

    ReplyDelete
  5. Howdy N1YWB,

    for some reason sound devices can't be accessed. Try running wspr as root, so $ sudo ./wspr

    See if that helps.

    Peter

    ReplyDelete
  6. Thanks for the great HowTo. Just compiled it on xubuntu 12.10 x64.

    ReplyDelete
  7. Anonymous11:49 PM

    Now up and running on two machines thanks entirely to your instructions. What a maze of computing. Thank you very much for your time and generosity. 73 Bob g3udi

    ReplyDelete
  8. Hi marxy

    I am getting an error message when I try to run the script:

    Traceback (most recent call last):
    File "wspr.py", line 46, in
    from WsprMod import w
    ImportError: /home/xxx/wspr/WsprMod/w.so: undefined symbol: Pa_Sleep

    Any idea why?. Thanks

    ReplyDelete
  9. I'm trying on a Banana Pi running Raspbian on SATA disk.
    WSJT compiles after two mods to the Makefile. python -> python3, f2py -> f2py3,2
    python -O wsjt.py complains
    Undefined symbol Pa_Sleep in Audio.so

    alanb (at) unixservice.com.au
    73
    VK2ZIW

    ReplyDelete