Raspberry Pi Build

Home Forums Platform Specific Linux Raspberry Pi Build

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #114952
    sparkytupp
    Participant
    • Topics: 3
    • Replies: 4
    • Total: 7

    Hi

    I’m hoping to install ctrlr on a Raspberry Pi 3 ModelB+. Which OS would be recommended? I’m hoping to use on Raspbian

    Thanks

    Mark

    #114953
    protonproton
    Participant
    • Topics: 18
    • Replies: 91
    • Total: 109
    • ★★

    Great idea!
    I am interested in this too so i will be following.
    No idea what build is the stable one for Linux so can’t help, sorry.
    Roman???

    #114954
    PossemoPossemo
    Participant
    • Topics: 14
    • Replies: 594
    • Total: 608
    • ★★★

    there is a guy that claimed having compiled it sucessfully. A shame he never published it:

    [solved] Problem compiling on ArchLinux ARM (Raspberry Pi 2)

    #115106
    sparkytupp
    Participant
    • Topics: 3
    • Replies: 4
    • Total: 7

    Thanks for the link. I will follow the steps and let you know what happens

    #117891
    shookingshooking
    Participant
    • Topics: 14
    • Replies: 59
    • Total: 73

    He I also replied to that thread – I have Ctlr 5.4 working on my Pi3. A mate of mine loaned me his touchscreen and I had a lot of fun with 800 X 600 panels 🙂

    I thought I did a decent job of writing it up. I could build direct on Pi but the 1Gb ram plus page and swap was sloooow. I should retry on a 4gb

    But instead I configure cross compiler on an Ubuntu and build it them sftp the result to my Pi.

    I couldn’t work out how to help create the Cmake files (me old school make or even just shell scripts ).

    #117991
    shookingshooking
    Participant
    • Topics: 14
    • Replies: 59
    • Total: 73

    BTW I thought I made a decent attempt to write up how I build on Raspberry Pi 3??

    [solved] Problem compiling on ArchLinux ARM (Raspberry Pi 2)

    USE UBUNTU MATE ON PI

    (And if you get this to build please consider tipping Martin Wimpress for the hard work his team done on Ubuntu Mate!)
    UBUNTU MATE RPI2 or 3

    WARNING – ALAS – The build works but freezes if I try to load a panel.
    I will be debugging this.

    0 – Get yourself the fasted card you can buy (see why later)
    You will need about 3GB of extra space for source, build and swap
    1 – I installed Ubuntu Mate
    Will try with Raspbian IF I get time.
    2 – I updated/upgraded
    3 – I resized the partitions
    4 – I installed git and vim

    GET THE LATEST CODE

    5 – get the archive

    CTRLR_ROOT=~/Documents/Software/ctrlr
    mkdir -p $(CTRLR_ROOT)
    cd ..
    git clone https://github.com/RomanKubiak/ctrlr.git
    

    INSTALL THE PACKAGES

    In the latest revision of post-commit script (ctrlr/Scripts/post-commit)

    UBUNTU_PACKAGES="g++ libxrandr-dev libxinerama-dev libxcursor-dev \
    libasound2-dev binutils-dev \
    libfreetype6-dev xorg-dev \
    libgl1-mesa-dev libglapi-mesa \
    libxrandr-dev libudev-dev libgl1-mesa-dev"

    so we need to ensure we have these packages

    for pack in g++ \
    libxrandr-dev \
    libxinerama-dev \
    libxcursor-dev \
    libasound2-dev \
    binutils-dev \
    libfreetype6-dev \
    xorg-dev \
    libgl1-mesa-dev \
    libglapi-mesa \
    libudev-dev
    do
    sudo apt-get install $pack
    done

    SET CODEBASE BACK TO WHEN LINUX BUILD CLEAN – WINDOWS DEV CONTINUES TO WORK

    6 – grab a timestamped version of the code (thanks to Archangel for hints)

    cd ctrlr
    git checkout 3d8651d991d377f7b167806c39c47a3121fe9536

    ADD SWAP TO YOUR RASPBERRY PI – IT WILL NOT COMPILE WITHOUT THIS

    7 – dont forget to add a swap because the compiler needs more than 1gb

    sudo dd if=/dev/zero of=/root/myswapfile bs=1M count=2048
    sudo chmod 600 /root/myswapfile
    sudo mkswap /root/myswapfile
    
    sudo swapon /root/myswapfile

    NOTE: add back the swap after reboot. You can probably store this in fstab somewhere?

    8 – MODIFY THE BUILD SCRIPT

    NOTE: the post-commit calls out to build.sh and Makefile.
    There are two build.sh (relative to your ctrlr root):

    cd $CTRLR_ROOT
    find . -name "build.sh" -print
    ./Builds/Generated/Linux/VST/build.sh
    ./Builds/Generated/Linux/Standalone/build.sh

    and 3 Makefiles – of which ingore the “lo” one

    find . -name "Makefile" -print
    ./Source/Misc/include/lo/Makefile
    ./Builds/Generated/Linux/VST/Makefile
    ./Builds/Generated/Linux/Standalone/Makefile

    If you simply run it from this point, it will fail as below:

    $(CTRLR_ROOT)/Scripts/post-commit
    
    ...
     inflating: boost/lambda/casts.hpp
      inflating: boost/lambda/control_structures.hpp
      inflating: boost/lambda/switch.hpp
      inflating: boost/lambda/lambda.hpp
    CTRLR: Build Standalone
    CTRLR[linux]: Building for arm, JOBS 1
    CTRLR[linux]: Compile PCH
    In file included from ../../../../Source/Core/stdafx.h:79:0:
    ../../../Standalone/JuceLibraryCode/JuceHeader.h:18:49: fatal error: juce_audio_basics/juce_audio_basics.h: No such file or directory
     #include <juce_audio_basics/juce_audio_basics.h>

    ^
    compilation terminated.

    WHY DOES THE BUILD FAIL?

    And it turns out there is a bug in the make file. We need to fix
    some paths for includes etc.

    — ADD IN Juce/modules to BOTH build.sh (see code snippet below)

    we had to change build.sh as follows:

    if [ "$1" == "-f" ]; then
            echo "CTRLR[linux]: Compile PCH"
            g++  -std=c++0x -D "LINUX=1" -D "NDEBUG=1" -D "JUCE_FORCE_DEBUG=0" -D "CTRLR_NIGHTLY=1" -D "JucePlugin_Build_Standalone" -D "LUA_USE_LINUX" -D "_LINUX=1" -D "JUCER_LINUX_MAKE_CC96CACF=1" -I /usr/include -I /usr/include/freetype2 -I ../../../Standalone/JuceLibraryCode -I../../../../Juce/modules -I ../../../../Boost -I ../../../../Source/Lua/luabind -I ../../../../Source/Misc -I ../../../../Source/MIDI -I ../../../../Source -I ../../../../Source/UIComponents -I ../../../../Source/Core -I ../../../../Source/Plugin -I ../../../../Source/Application -I ../../../../Source/Lua -I ../../../../Source/Lua/lua -march=native -Os -fpermissive -o "../../../../Source/Core/stdafx.h.gch" -c "../../../../Source/Core/stdafx.h"
    else
    

    WAIT FOR IT – SOME LIBRARIES NEED TO BE COPIED
    SOME NEED TO BE INSTALLED

    ON UBUNTU MATE the correct naming is arm.
    FIND some files

    sudo find / -name libbfd.a -print
    find: ‘./run/user/1000/gvfs’: Permission denied
    ./usr/lib/arm-linux-gnueabihf/libbfd.a

    hence

    cp /usr/lib/arm-linux-gnueabihf/libbfd.a $(CTRLR_ROOT)/Builds/Generated/Linux/Standalone/libbfd-arm.a
    cp /usr/lib/arm-linux-gnueabihf/libbfd.a $(CTRLR_ROOT)/Builds/Generated/Linux/VST/libbfd-arm.a

    CLEAN UP SOME PACKAGES

    sudo apt autoremove

    GOOGLE to find where libiberty comes from

    libiberty-dev
    So we use

    sudo apt-get install libiberty-dev
    sudo find / -name 'libiberty*' -print
    find: ‘./run/user/1000/gvfs’: Permission denied
    ./var/lib/dpkg/info/libiberty-dev:armhf.list
    ./var/lib/dpkg/info/libiberty-dev:armhf.md5sums
    ./var/cache/apt/archives/libiberty-dev_20160215-1_armhf.deb
    ./usr/lib/arm-linux-gnueabihf/libiberty.a
    ./usr/include/libiberty
    ./usr/include/libiberty/libiberty.h
    
    cp /usr/lib/arm-linux-gnueabihf/libiberty.a $(CTRLR_ROOT)/Builds/Generated/Linux/Standalone/libiberty-arm.a
    cp /usr/lib/arm-linux-gnueabihf/libiberty.a $(CTRLR_ROOT)/Builds/Generated/Linux/VST/libiberty-arm.a

    And with the above

    
    cd $(CTRLR_ROOT)/Scripts
    ./post-commit

    and it will build in about 5 hours for standalone. VST fails at the moment

    CTRLR[linux]: Building for arm, JOBS 1
    CTRLR[linux]: Compile PCH
    CTRLR[linux]: Remove the shared source, for main() compatibility
    CTRLR[linux]: Build now
    
    Compiling CtrlrOSC.cpp
    Compiling CtrlrUtilitiesGUI.cpp
    Compiling CtrlrSysexProcessorOwned.cpp
    Compiling CtrlrFontManager.cpp
    Compiling CtrlrIDManager.cpp
    Compiling CtrlrLog.cpp
    Compiling CtrlrManager.cpp
    Compiling CtrlrManagerInstance.cpp
    ...
    Compiling BinaryData.cpp
    Compiling juce_audio_basics.cpp
    Compiling juce_audio_devices.cpp
    Compiling juce_audio_formats.cpp
    Compiling juce_audio_processors.cpp
    Compiling juce_audio_utils.cpp
    Compiling juce_core.cpp
    Compiling juce_cryptography.cpp
    Compiling juce_data_structures.cpp
    Compiling juce_events.cpp
    Compiling juce_graphics.cpp
    Compiling juce_gui_basics.cpp
    Compiling juce_gui_extra.cpp
    Compiling juce_opengl.cpp
    Linking Ctrlr_Standalone
    CTRLR[linux]: build succeeded

    NOTE: DONT PANIC – You poor Pi will freeze … many times.
    It is paging and swapping.
    The PCH phase takes about 15 mins.
    Then each file takes about 1 minutes 20 seconds on a Pi3.
    Do the math – N files x 4/3 ~

    shooking@CharPi:~/Documents/Software/ctrlr/Builds/Generated/Linux/Standalone$ grep "\$(OBJDIR)" Makefile | grep -v mkdir | grep -v "\.\." | wc -l
    224

    (224-3) x 4/3 ~ 222 x 4 / 3 = 74 x 4 = 296 minutes or around 5 hours.

    PLEASE use the fastest uSD card you can get. Mine is a Samsung EVO.
    £22 for 64GB. With a class 10 I would imagine the build could take a day!
    BETTER if you can use a SSD drive.
    The MS 2015 build is almost instantaneous in comparison.
    And that is with 2GB RAM, the other 4GB used on an Ubuntu VM that allowed me to get the Linux build working.

    ALAS – The build works but freezes if I try to load a panel.
    I will be debugging this.

    THANKS to

    1. Atom for bringing us Ctrlr
    2. Archangel for tips on git timestamps
    3. Martin Wimpress and team for bringing us Ubuntu Mate on Pi
    4. My kleiner Tochter Charlotte for checking / debugging build.sh with me

    Anyone who can get past the lack of Open — would appreciate some hints.

    • This reply was modified 1 month, 1 week ago by shookingshooking. Reason: didnt know how the link quote worked - it didnt!
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
There is currently 0 users and 27 guests online
No users are currently active
Forum Statistics
Threads: 2,372, Posts: 16,564, Members: 57,975
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!