May 24, 2019 at 8:21 pm #114952
I’m hoping to install ctrlr on a Raspberry Pi 3 ModelB+. Which OS would be recommended? I’m hoping to use on Raspbian
MarkMay 24, 2019 at 10:06 pm #114953protonParticipant
- Topics: 19
- Replies: 94
- Total: 113
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???May 25, 2019 at 11:28 am #114954PossemoParticipant
- Topics: 14
- Replies: 638
- Total: 652
there is a guy that claimed having compiled it sucessfully. A shame he never published it:May 31, 2019 at 7:39 pm #115106
Thanks for the link. I will follow the steps and let you know what happensApril 23, 2020 at 12:13 am #117891
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 ).April 26, 2020 at 6:52 pm #117991
BTW I thought I made a decent attempt to write up how I build on Raspberry Pi 3??
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>
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
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
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.
- Atom for bringing us Ctrlr
- Archangel for tips on git timestamps
- Martin Wimpress and team for bringing us Ubuntu Mate on Pi
- My kleiner Tochter Charlotte for checking / debugging build.sh with me
Anyone who can get past the lack of Open — would appreciate some hints.
June 10, 2020 at 1:52 pm #118749
- This reply was modified 10 months ago by shooking. Reason: didnt know how the link quote worked - it didnt!
Thanks for the write-up. I managed to compile successfully on a pi3B+ (using your method) with raspbian about 6 months ago and then went and corrupted the SD card before cloning it!!
I am trying all over again, and consistently come across failures (I’ve tried 8 times now!)
Is there any recommended versions of gcc, g++ and lua to have on my system before I start. I currently have the latest versions of all, and I am wondering if that is causing the issues that I am seeing?
MarkJune 10, 2020 at 7:03 pm #118753
I have captured the error messages that I received pre-compile
Attachments:You must be logged in to view attached files.June 11, 2020 at 8:24 pm #118760
Success!! I have now managed to build ctrlr on my Raspberry Pi 3B+ using Raspbian. I had forgotten that I needed to softlink gcc-4.8 and g++-4.8 to /usr/sbin/gcc and /usr/sbin/g++
Once I had done that it compiled and seems to work perfectly. I will provide the image file once I have downloaded it off the pi. I will also remember to clone the SD card this time.
Thanks for the write-up shooking, I could not have done this without it.June 12, 2020 at 12:20 am #118761
Glad it worked. I was thinking about getting and 8GB Pi 4 and using RAM disk.
I found my original VMs as virtual box. This has the cross compiler setup so much faster than Pi.
Don’t forget the gotcha when opening panels – the Linux meds something unticked.
My mate loaned me his touch screen and it worked well. I met a YT via K1 posts – he has a Linux tablet that runs Ctrlr. I sure would love a powerful tablet so that I could also run ZynAddSubFX – Pi doenwt quite run it fast enough
Anyhow glad you got it to build – I found I used the debugger to get to learn more about the internals of Ctrlr.June 12, 2020 at 3:10 pm #118764
I’ve been using the debugger quite a lot, as I’ve done all the dev work on windows. I now have converted the PG300 panel to receive CCs from a h/w controller for each parameter. Ctrlr then moves the slider, and sends the relevant Sysex to the Alpha Juno. ctrlr also receives sysex from the alpha juno to update the sliders via program change or parameter change. I have uploaded my panel on to the pi, and all works correctly so am very happy with it. I will be recording some demos of it in action soon!
- The forum ‘Linux’ is closed to new topics and replies.