Archive for January, 2020

MacOS Homebrew FFMPEG no longer has an all options. Here is how to install with all options

Sunday, January 12th, 2020
$ brew install ffmpeg $(brew options ffmpeg | grep -vE '\s' | grep -- '--with-' | tr '\n' ' ')

Update 2021-10-20: I found that the method above did not work for me in the Monterey beta. There was an older version
I believe to be less reliable (in ensuring that you have all the options, since they are hard-coded) 
that I've found elsewhere:
$ brew install nasm pkg-config texi2html aom fontconfig freetype frei0r gnutls lame libass libbluray libsoxr libvorbis libvpx opencore-amr openjpeg opus rtmpdump rubberband sdl2 snappy speex tesseract theora x264 x265 xvid xz ffmpeg

		

Compiling GoldenCheetah on Raspberry Pi 4 with Raspbian Buster – free bicycle trainer/analysis software

Saturday, January 4th, 2020

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!  :)

 

Compiling GoldenCheetah on Raspberry Pi 4 with Ubuntu server 19.10.1- free bicycle trainer/analysis software

Friday, January 3rd, 2020

Ok, I’m leaving this here as an example if I need it in the future, but the Ubuntu desktops were too bulky to be quick on the pi4 as of the time of this writing. Since I got this to work on stock Raspbian, I would use that walkthrough/howto instead of trying it with Ubuntu. You can mostly follow the Raspbian walkthrough/howto for Ubuntu as it is more current. I did not include these required steps in this walkthrough.

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

Ubuntu Server version

first install ubuntu server 64bit 19.10.1 {I used ubuntu-19.10.1-preinstalled-server-arm64+raspi3.img from the ubuntu website}

$ sudo apt update
$ sudo apt -yf full-upgrade
$ sudo apt-get -y –purge autoremove
$ sudo apt-get autoclean

$ sudo timedatectl set-timezone America/Chicago {pick your own time zone, see them all with $timedatectl list-timezones}
$ sudo apt-get install xubuntu-desktop {note to self: this is still a pretty heavy desktop – I should try installing a lighter one or using the instructions below on raspbian lite}
pick gdm3 for the desktop manager
$ sudo reboot now

First install qt sdk and libraries
$ sudo apt-get install qt5-default qtcreator
$ sudo apt install libqt5svg5-dev
$ sudo apt install libqt5serialport5-dev
$ sudo apt install libqt5charts5-dev
$ sudo apt install qtmultimedia5-dev
$ sudo apt install qtconnectivity5-dev
$ sudo apt install libqt5webkit5-dev

git should already be installed if not ‘$ sudo apt-get install git’
$ sudo apt-get install libusb-1.0-0-dev
$ sudo apt-get install bison
$ sudo apt-get install flex
$ cd ~
$ mkdir projects
$ cd projects
$ git clone git://github.com/GoldenCheetah/GoldenCheetah.git
$ cd GoldenCheetah
$ cd src
$ cp gcconfig.pri.in gcconfig.pri
$ nano gcconfig.pri
-> uncomment line #CONFIG += release

-> uncomment line #QMAKE_LRELEASE = /usr/bin/lrelease {note: make sure you have a /usr/bin/lrelease, it should have been installed above}
-> uncomment line #QMAKE_CXXFLAGS += -03

-> uncomment line #LIBUSB_INSTALL = and change the value to LIBUSB_INSTALL = /usr/lib in instead of LIBUSB_INSTALL = /usr/local
-> uncomment line #LIB_USE_V_1
-> uncomment line #LIBS += -lz

$ cd ~/projects/GoldenCheetah/qwt

$ cp qwtconfig.pri.in qwtconfig.pri

$ cd ~/projects/GoldenCheetah
$ qmake -recursive

{note: if you see a bunch of translation language errors… just ignore for now}
$ make

-> sit back and wait an hour or two :)
when it is all done you will have a GoldenCheetah executable file in your projects directory

notes: This failed after exhausting memory on a 2 gig raspberry pi 4. Ran like a champ on a 4 gig raspberry pi 4
If you get the error (g++: internal compiler error: Killed (program cc1plus)). It means you ran out of memory, you can try one of the following:
___1. Make a swap file___________
Run these

$ sudo dd if=/dev/zero of=/swapfile bs=64M count=16
$ sudo mkswap /swapfile
$ sudo swapon /swapfile

That should let you compile your code. But make sure you then revert the swap after compilation, with these:

$ sudo swapoff /swapfile
$ sudo rm /swapfile

___2. Try fewer parallel jobs (will take longer to compile)___________
Try running:
$ make j #
where # is the number of parallel jobs
ex:
$ make j 4
$ make j 2