Ok, I’m still testing, but I have instructions to get GoldenCheetah to compile and run on a Raspberry Pi 4. Please share if you have anything to add/improve. Hopefully this will start the process of getting official Rpi4 instructions added to the project…
If you are not familiar, GoldenCheetah is open source software that will control a smart trainer (wahoo kickr, tacx, etc…) via Ant+ or bluetooth. It will sync rides to/from strava and others. It has amazing (way beyond my ability or interest) performance analysis functions! It can download ride profiles from the free ERG repository. It really does too much to list here. I highly recommend it. Warts and all it still a great piece of software that some great people work hard to support, and it does most everything I need trainer software to do. Oh… and it doesn’t cost me $10 a month in subscription fees. So If I can build a dedicated computer out of a Rpi4 that will run GoldenCheetah for less than $100, then I’m a happy lad!
Links:
The main website is GoldenCheetah.org. The project code is on github. Discussion is on Google Groups.
GoldenCheetah install on Raspberry pi 4 with – Raspbian Buster. I consider this the preferred way to do it.
I used the 2019-09-26 version from raspberrypi.org – the middle size software ~ 1.1gigs.
You will need to follow the generic instructions to create a clean Raspbian boot SD card.
IMPORTANT NOTE: This only works for the current release version of GoldenCheetah V3.5.0. The newer betas require some modules that have not been added to the repository for the pi. I will update this article when the modules are available and I can get the pi to compile the current code.
Then let’s get the software up to date:
$ sudo apt update {if you have never run apt update it may fail saying library date is in future, just run it again}
$ sudo apt -yf full-upgrade
$ sudo apt-get -y --purge autoremove {that is two dashes in front of purge "--purge"}
$ sudo apt-get autoclean
$ sudo timedatectl set-timezone America/Chicago {pick your own time zone, see them all by typing $ timedatectl list-timezones}
$ sudo reboot now
Install QT sdk and libraries
$ sudo apt-get install qt5-default qtcreator libqt5svg5-dev libqt5serialport5-dev libqt5charts5-dev qtmultimedia5-dev qtconnectivity5-dev
$ sudo apt-get install libqt5webkit5-dev libusb-1.0-0-dev libical-dev libvlc-dev libvlccore-dev bison flex
Modify the USB device so you can use your ANT+ USB stick {no need if you are only going to use bluetooth}
$ cd /etc/udev/rules.d
$ sudo nano 52-garmin-usb.rules
- Add (copy/paste) the following six lines to the file: {there are no spaces before the lines
- # Garmin ANT+ – USB1
ATTRS{idVendor}==”0fcf”, ATTRS{idProduct}==”1004″, MODE=”0666″
# Garmin ANT+ – USB2
ATTRS{idVendor}==”0fcf”, ATTRS{idProduct}==”1008″, MODE=”0666″
# hLine USB2 ANT2
ATTRS{idVendor}==”0fcf”, ATTRS{idProduct}==”1009″, MODE=”0666″
- exit and save the file
$ sudo reboot now
Now download the code, make a few changes and start compiling!
Git should already be installed if not ‘$ sudo apt-get install git’
$ cd ~
$ mkdir projects
$ cd projects
$ git clone git://github.com/GoldenCheetah/GoldenCheetah.git
$ git clone git://github.com/GoldenCheetah/GoldenCheetah.git --branch release_3.5.0
$ cd GoldenCheetah
$ cd src
$ cp gcconfig.pri.in gcconfig.pri
$ nano gcconfig.pri
- uncomment line #CONFIG += release
- uncomment line #QMAKE_LRELEASE = /usr/bin/lrelease
- uncomment line #QMAKE_CXXFLAGS += -03
- comment out the line QMAKE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 by added a ‘#’ in front of it
- uncomment line #ICAL_INSTALL =
- Change the value Of the ICAL_INSTALL = (line above this one) to “ICAL_INSTALL = /usr/lib”
- uncomment line #LIBUSB_INSTALL = /usr/local
- Change the value Of the LIBUSB_INSTALL (line above this one) to “= /usr/lib” instead of “= /usr/local”
- uncomment line #LIB_USE_V_1
- uncomment line #LIBZ_LIBS = -lz
$ cd ~/projects/GoldenCheetah/qwt
$ cp qwtconfig.pri.in qwtconfig.pri
$ cd ~/projects/GoldenCheetah
$ qmake -recursive {if you see a bunch (22 or so) of translation language and missing file errors… you can ignore them}
$ make
Now just sit back and wait. Should take about 1.5 hours with a good heat sink on a 2 gig Rpi4 :)
When it is all done you will have a GoldenCheetah executable file in your projects/GoldenCheetah/src directory. You can copy it wherever you like, if you want to run it from the command line here just type:
$ ~/projects/GoldenCheetah/src/GoldenCheetah
I made a Desktop icon on Raspbian by doing the following:
$ cd ~/Desktop
$ nano GoldenCheetah.desktop
- Add (copy/paste) the following ten lines to the file:
- [Desktop Entry]
Name=GoldenCheetah
Comment=Built for suffering
Icon=/usr/share/pixmaps/openbox.xpm
Exec=/home/pi/projects/GoldenCheetah/src/GoldenCheetah
Type=Application
Encoding=UTF-8
Terminal=false
StartUpNotify=true
Categories=None;
- exit and save
Every time you use the desktop icon it will ask what you want to do with it. Select execute. You can disable this in Raspbian config files, but that is beyond the scope of this howto…..
Enjoy! :)