Posted on 35 Comments

Raspberry Pi (Bullseye)- Building WSJT-X 2.5.4 from source

Completely rewritten 21st March, 2022
Updated 25th March, 2022 – to correct typos in prerequisites

My previous post on this topic had a few errors so I’ve just rewritten the entire post.
The WSJT-X Pi binaries are currently only available for the older Buster distribution. However, thanks to the provision of a self-contained WSJT-X source tarball, building the software from source is a simple process. In this post, I’ll show you the steps.

Preparation

These instructions assume you’re starting with a fresh Raspberry Pi OS (32 or 64-bit Bullseye) installation.
we’ll begin by updating your OS with the following command line:

sudo apt update && sudo apt full-upgrade -y && reboot

The next step is to install the prerequisites for WSJT-X. Open a terminal session and enter the following. NB: You can use copy and paste to avoid typing mistakes:

sudo apt install -y qtmultimedia5-dev libqt5serialport5-dev
sudo apt install -y qttools5-dev qttools5-dev-tools
sudo apt install -y libqt5multimedia5-plugins
sudo apt install -y libboost-all-dev libfftw3-dev 
sudo apt install -y libreadline-dev libusb-1.0-0-dev 
sudo apt install -y libudev-dev portaudio19-dev cmake
sudo apt install -y libgfortran5

Next, we’ll set up the folder structure, download the WSJT-X source code and build it. NB: Please take note of the punctuation and spaces, they’re important.
Here are the commands:

cd ~
mkdir build
cd build
wget https://physics.princeton.edu/pulsar/k1jt/wsjtx-2.5.4.tgz
tar xzf wsjtx-2.5.4.tgz
mkdir build
cd build
cmake -DWSJT_SKIP_MANPAGES=ON -DWSJT_GENERATE_DOCS=OFF ../wsjtx-2.5.4
sudo cmake --build . --target install

NB: These instructions are only applicable to version 2.5.4. However, they should be adaptable for later versions by updating all instances of wsjtx-2.5.4.

When complete, reboot the Pi and you can run WSJT-X from the Sound & Video menu or by typing wsjtx from the command line. Running from the command line is useful if you’re experiencing any problems as you will see error messages that may provide some vital clues.

Any problems with this post, do let me know, either in the comments or my support group at Raspberry Pi Explained

35 thoughts on “Raspberry Pi (Bullseye)- Building WSJT-X 2.5.4 from source

  1. Hi Mike,
    i am having problems installing wsjtx 2.5.4 on bullseye.

    Following you above instructions when i get to the line
    tar xzf wsjtx.tgz
    this is returned
    pi@2E0YBJ:~/build $ tar xzf wsjtx.tgz
    tar (child): wsjtx.tgz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now

    is it correct that both extracted files end up in a folder /home/pi/wsjtx-2.5.4/src

    not sure where to go as pi is very new to me.

    73 2E0YBJ

    1. Hi Steve, That’s a simple issue that just means it can’t find the wsjtx.tgz file. If you followed the instructions properly it should be in the /home/pi folder. You might find you’ve put it in the Downloads folder by mistake, it’s easy done.

      PS: Sorry for the delayed reply – busy times here.

      Regards,

      Mike – G4WNC

      1. Could the problem be that the file is not actually named wsjtx.tgz but wsjtx 2.5.4.tgz ?

        1. Hi Greg,

          The wsjtx-tgz file is inside the wsjtx.2.5.4.tgz tarball. It’s important to dig down to and extract that file or it won’t work.

          Regards,

          Mike – G4WNC

  2. Hi Mike,
    when I used the code above I got this result :
    pi@raspberrypi:~ $ cd ~/build
    pi@raspberrypi:~/build $ tar xzf wsjtx.tgz
    tar (child): wsjtx.tgz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    pi@raspberrypi:~/build $ mkdir build
    mkdir: cannot create directory ‘build’: File exists
    pi@raspberrypi:~/build $ cd build
    pi@raspberrypi:~/build/build $ cmake -DWSJT_SKIP_MANPAGES=ON -DWSJT_GENERATE_DOCS=OFF ..wsjtx
    bash: cmake: command not found
    pi@raspberrypi:~/build/build $ cmake –build .
    bash: cmake: command not found
    pi@raspberrypi:~/build/build $ sudo cmake –build . –target install

    What have I done wrong ?

    David GW4OUU

    1. Hi David,

      This simply means the wsjtx.tgz file is not in the expected location. It’s important to carefully read my instructions and dig out the WSJTX.tgz file from the downloaded source archive. As you’re not the first to make this mistake, I’ve annotated my instructions.

      Regards,

      Mike – G4WNC

      Regards,

      Mike

  3. Your instructions are not complete or not correct. That is why these people above give these comments. You do as if you are in the /home/pi and start from there, but then the tar.gz is not found as it is not there but in its own folder. You should go there first and do the same for the hamlib set and then do a double build.
    Or you should copy the needed files into the newly created ~/build folders before doing the rest of the instructions.
    Or you can first cd into the newly created folders having the extracted sources.
    Or you should do an extract WITHOUT keeping the directory structure, than the files are at the top-level directly in /home/pi and not a few levels deeper.

    1. Hi Erwin,

      Thanks for taking the time to point out the errors. I’m going to work out a better solution and I’ll update this post once I’ve finished testing.

      Thanks,

      Mike – G4WNC

  4. Hi Mike,
    First off, thank you for the help you are providing. I am not computer illiterate but this is definitely outside my current knowledge!

    That said, after updating RPi OS and copy-pasting the “sudo apt install -y qtmultimedia5-dev libqt5serialport5-dev qttools5-dev \ qttools5-dev-tools…” command I get:

    E: Unable to locate package qttools-dev-tools
    E: Unable to locate package plugins
    E: Unable to locate package libreadline-dev

    This is on a fresh install of RPi OS and updated as you first instructed. Any help you can send my way is much appreciated.

    Thanks and 73,
    Michael N6MST

    1. Hi Michael,

      Thanks for your comment. I appear to be cursed with this post as I’ve made yet another mistake! Whilst trying to simplify the installation of the prerequisites, I introduced some formatting errors. The main problem was with the use of \ character for the continuation of long lines but there were also a couple of minor but catastrophic typos. I’ve reformatted that section and just tested it here and it appears to work as expected.
      Sorry for the frustration.

      Regards,

      Mike – G4WNC

      1. Install went off without a hitch using the new commands and 2.5.4 seems to working as intended. Thanks Mike!!

        73,
        Michael N6MST

        1. Excellent, thanks for the update. 73 Mike – G4WNC

  5. Thank you for your VERY helpful post.
    “Nothing can be made foolproof because fools are so ingenious!” I think I may be one of those ingenious/ignorant fools. I finally figured out my problem:
    Your first grey box has a series of 4 ‘sudo’ commands, but it appears on my screen word-wrapped. I thought it was 9 separate commands, five of which didn’t work properly! I spend a lot of time trying to make the ‘commands’ that didn’t start with ‘sudo’ work properly!

    No response is necessary; I think I have what I need. Thanks again for taking the time to write (and re-write) the instructions.

    1. Hi Ned,

      Thanks for the feedback, I’ll have a look at restructuring the code. If you can make the mistake so can someone else so I ought to fix it.

      Mike – G4WNC

  6. Hello Mike,

    Just finished the installation. Wsjt-X appeared under sounds.
    Not quite sure it is working with my FT-817.

    The raspi 4b was running at high speed for more than an hour.

    It looks like a did a fantastic job to make did work, thanks very much.

    73 Rein W6SZ

    1. Hi Rein,

      Thanks for the feedback, and glad to hear it’s working. Let me know if you have problems with the FT-817

      Mike – G4WNC

      1. Hello Mike,
        I have a problem by not getting a ‘0’, ground
        for the PTT transmit. (TX).
        With the previous versions I used DTR,
        Port dev/ttyUSB0 , this selection is not longer available. There is now /dev/ttyAMA0.

        Searching for the difference between ttyAMA0 and ttyUSB0 did not provide me
        much of an answer!

        73 Rein W6SZ

        1. Hi Rein,

          You should stick with ttyUSB0. You can check that it’s available on the system by entering the following in a terminal:
          ls /dev/ttyU*
          or you can list all the tty devices with ls /dev/tty*
          If it’s not available on the system, that’s where you need to focus your troubleshooting.

          One important point to remember is that WSJT-X only checks for serial devices at startup. Once it’s running, it won’t detect a newly connected serial device.

          Hope that helps,

          Mike – G4WNC

  7. Hi Mike,

    Many thanks for this super interesting spot. I followed all the steps and the installation was very smooth, UFB !
    73,

    Gaëtan, ON4KHG

    1. Hi Gaëtan,

      Thanks for the feedback, good to know I’ve got it right this time.

      ’73 Mike – G4WNC

  8. I meant “post”, not “spot” !

  9. How would you build it to use the WSJT-Z mod?

    1. Hi Thomas,

      Sorry for the delayed reply. I’ve not used the WSJT-Z variant but, as far as I can tell, the Z modification of this WSJT-X clone is only available for Windows. That means it won’t suitable for the Raspberry Pi.

      Sorry,

      Mike

  10. Thanks for posting this process. I have been trying to setup 2.5.4 on my linux mint 19.3 setup. Since that version is not aligned with the latest I could not load from the deb package. I believe I fell into the category noted on the WSJTX site which says, “Note: these packages are unlikely to install properly on Linux distributions with required dependencies at lower versions than those on the named distributions. In such cases building from source is the correct way to install WSJT-X.” I followed your process on my setup and everything setup correctly. Now I have 2.5.4 running. For anyone else that may see this, your experience may vary.

    1. Hi Michael,

      Glad to hear you’ve found the process useful.

      Regards,

      Mike – G4WNC

  11. Mike, smooth install from scratch on fresh Bullseye on my old PI3. Took little under one hour but your scripts all work 100%. Good job!
    73 Onno PA3BUD

    1. Hi Onno,

      That’s good to hear. Thanks for taking the time to let me know.

      Regards,

      Mike – G4WNC

  12. I followed this instructions on my Pi 4 today and they worked perfectly! Saved me a ton of time.

    1. Hi Ron, Thanks for letting me know. Mike – G4WNC

  13. Hello Mike

    Thanks for putting together such a comprehensive guide to compiling WSJT-X on the raspberry pi.

    Following your guide resulted in WSJT-X compiling without issue on my pi 4.

    Thanks and regards – John G1EUH

    1. Hi John,

      Thanks for the post. Glad to hear the found the info useful.

      Regards,

      Mike G4WNC

  14. Have followed your instructions to instal WSJTx on my pi4, cannot get passed the following message:-
    Connecting to physics.princeton.edu (physics.princeton.edu)|128.112.100.6|:443…

    1. Hi Rod,

      The Princeton university site is currently undergoing a complete work so is off-line for a few weeks. However, the files are available from an alternative source. You need to change the wget line to read:
      wget https://sourceforge.net/projects/wsjt/files/wsjtx-2.6.0/wsjtx_2.6.0_armhf.deb

      This will download the latest 2.6.0 version. NB: I haven’t tested this one yet but I’ll be revising the instructions when I get back to base.

  15. hi Mike
    Thanks for getting back to me so quickly.
    I loaded the following information
    cd ~
    mkdir build
    cd build
    wget https://sourceforge.net/projects/wsjt/files/wsjtx-2.6.0/wsjtx_2.6.0_armhf.deb
    mkdir build
    cd build
    cmake -DWSJT_SKIP_MANPAGES=ON -DWSJT_GENERATE_DOCS=OFF ../wsjtx-2.6.0
    sudo cmake –build . –target install

    The response I got was the following:-

    sjtx_2.6.0_armhf.d 100%[===================>] 11.07M 5.55MB/s in 2.0s

    2023-01-16 18:42:12 (5.55 MB/s) – ‘wsjtx_2.6.0_armhf.deb’ saved [11605730/11605730]

    CMake Error: The source directory “/home/pi/build/wsjtx-2.6.0” does not exist.
    Specify –help for usage, or press the help button on the CMake GUI.
    Error: could not load cache
    pi@raspberrypi:~/build/build $

    So. I will wait until you can help me further. I appreciate very much your help.
    Regards
    Rod Harvey
    G3YHM

  16. Thanks for the post, it was very helpful. I did the download directly from Source Forge, with a later version. My pi hung up on the first compile, but after a config change, it finished flawlessly.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.