Following instructions are hosted on my gist account also.
I can compile the polygon and opencv examples successfully after the issues.
Now everything works fine. Enabling overclock makes compiling process faster btw.
Ubuntu Mate Raspberry Pi Setup on RPI-2 board##
-
Download ubuntu RPI image
https://ubuntu-mate.org/raspberry-pi/ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz -
Use Etcher freeware to burn image to SD Card
https://etcher.io/ -
Attach SD Card to rPi, connect keyboard, mouse and display to rPi for the first run and power up RPI
-
Follow the instructions and create user (pi) and password (raspberry)
-
When desktop interface starts, open up Terminal and edit raspi-config to enable following commands;
sudo raspi-config
- Change Boot Options to the Command Line
- Change Interfacing Options to enable SSH
- Change Memory Split option to 64 M from Advanced Options
- Change GL Driver option to 3rd one to disable GL Driver from Advanced Options
- Save, exit & reboot
-
Login to “pi” user
-
Download nightly build oF arm7 version
curl -O http://ci.openframeworks.cc/versions/nightly/of_v20170714_linuxarmv7l_nightly.tar.gz
- Make oF directory
mkdir of_v20170714_linuxarmv7l_nightly
- Upack the content into this oF directory
tar vxfz of_v20170714_linuxarmv7l_nightly.tar.gz -C of_v20170714_linuxarmv7l_nightly --strip-components 1
- Run dependencies scripts. I get bunch of issues in this section. If you have it also, read the the following fixes and redo the dependencies installation
cd of_v20170714_linuxarmv7l_nightly/scripts/linux/ubuntu
sudo ./install_dependencies.sh
ISSUE 1: When installing dependencies I got error libgl1-mesa-dev-hwe-16.0.4
installing OF dependencies with -hwe-16.04 packages, confirm Y/N ?
Just type N to fix this issue 1
ISSUE 2:
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?
ref. & fix: https://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process
to fix the issue run the following commands;
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo ./install_dependencies.sh
- If everything goes fine, run codec installation scripts
sudo ./install_codecs.sh
- Set your make flags in your .bash_profile
sudo nano ~/.bash_profile
add the following Line (MAKEFLAGS=-j2 not -j4 because of ISSUE 3 see below)
export MAKEFLAGS=-j2 PLATFORM_ARCH=armv7l PLATFORM_VARIANT=raspberry2
and Save
kntrl+o
kntrl+x
- cd /home/pi/of_v20170714_linuxarmv7l_nightly/examples/graphics/polygonExample
make
ISSUE 3:
I got the following error;
virtual memory exhausted: Cannot allocate memory
ref. & fix:
https://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/
And recompile again if it fails again then recompile again…I can compile the example at the 2nd try