Compiling openframeworks for armv8 devices?

Hey openframeworks team,

I’m looking to run openframeworks on a Google Coral Dev Board that is running Mendel Linux as its OS. Does anyone know if this is possible? According to the datasheet the board supports armv8 architecture
“Support of 64-bit Armv8-A architecture”
Mendel linux is a derivative of Debian so I’m hoping it might be possible!
As a test I tried to compile the oF package for armv6 with no luck…
I’d love to get some thoughts on this!
are there any plans to create oF for armv8 devices?

Just bumping this in case anyone has any thoughts :slight_smile:

Hi,
I haven´t ever used that kind of board, but if it is of any help try compiling for armv7. Try using the latest nightly build instead of the current release.
Let us know if you have any luck.

Hey I just recently tried (without success) to compile the armv6 version of oF on an RPi3 with the 64-bit version of RaspberryOS. It compiles jus fine on the 32- bit RaspberryOS of course. So, thinking out loud, maybe using a 32-bit operating system with the Coral is worth a try?

Hi,
i successfully compiled OF 0.11.2 on Armbian aarch64 for both RockPro64 and RaspberryPi 4 using armv8-a architecture.

To do so, download the armv7 version of OF 0.11.2 and unzip says in ~/OF
Then:

mkdir ~/OF/libs/openFrameworksCompiled/lib/linuxaarch64
mkdir ~/OF/libs/openFrameworksCompiled/project/linuxaarch64
cp ~/OF/libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.default.mk ~/OF/libs/openFrameworksCompiled/project/linuxaarch64/config.linuxaarch64.default.mk 

Edit ~/OF/libs/openFrameworksCompiled/project/linuxaarch64/config.linuxaarch64.default.mk
And modify:

PLATFORM_CFLAGS += -march=armv8-a
PLATFORM_CFLAGS += -mtune=cortex-a53
# PLATFORM_CFLAGS += -mfpu=neon
# PLATFORM_CFLAGS += -mfloat-abi=hard
PLATFORM_CFLAGS += -fPIC
PLATFORM_CFLAGS += -ftree-vectorize
PLATFORM_CFLAGS += -Wno-psabi
PLATFORM_CFLAGS += -pipe

Then edit ~/OF/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk
and add line ~90:

		else ifeq ($(PLATFORM_ARCH),aarch64)
			PLATFORM_LIB_SUBPATH=linuxaarch64

Now you must copy two library: libtess2 and libkiss.

mkdir ~/OF/libs/kiss/lib/linuxaarch64/
sudo apt install libkissfft-float131
cp /usr/lib/aarch64-linux-gnu/libkissfft-float.so.131.1.0 ~/OF/libs/kiss/lib/linuxaarch64/libkissfft-float.so

mkdir ~/OF/libs/tess2/lib/linuxaarch64/
sudo apt install libtess2-tulip-5.4
cp /usr/lib/aarch64-linux-gnu/libtess2-tulip-5.4.so ~/OF/libs/kiss/lib/linuxaarch64/libtess2.so

Then you can run

cd ~/OF/scripts/linux/ubuntu/
./install_dependencies.sh
./install_codecs.sh
cd ~/OF/scripts/linux/
./compileOF.sh -j4

I am still in trouble to make video decoding works properly with hardware accel on both plateform, but it’s mainly related to the new v4l2 / gstreamer / kernel integration. The rest of OF seems to work fine.
Please read the OF note about Pi4: to run an App you will need X11 or ofxRPi4Window plugin:
raspberry-pi-getting-started

4 Likes

Thanks so much for all this advice

I should have mentioned that the coral board is flashed with Linux Mendel which is a Debian derivative. I attempted to follow your steps @mgr37 but couldn’t install the dependencies because it was for Ubuntu. Your step by step is really useful though

When I installed the dependencies for Debian everything worked fine apart but when I tried to compile one package was missing:
glesv1_cm
I’ve tried to install this with these commands:

sudo apt-get install glesv1_cm

and

sudo apt-get install libegl1-mesa-dev libgles1-mesa-dev libgles2-mesa-dev

But had no luck and got the response:

E: Unable to locate package glesv1_cm

and

Package libgles1-mesa-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libglvnd-dev

I’m not sure how to proceed from here but hopefully there’s a way to either get the package that’s missing (glesv1_cm) or replace it with another package
fingers crossed…

Hi
glesv1_cm seems to be part of libgles-dev

Try to ignore libgles1-mesa-dev and install libgles2-mesa-dev and libegl1-mesa-dev

My strategy in your situation is to skip missing packages and when compile errors occur, try to find the missing part in Debian packages (using “Debian + missing part” in Google)

What Debian version is your distro based on ?
Most (not all) Ubuntu and Debian packages are commonly named, availability and version can vary since both have different staging strategies.
But they are very similar.

Best,

Actually i also had to comment out
# PLATFORM_PKG_CONFIG_LIBRARIES += glesv1_cm
in ~/OF/libs/openFrameworksCompiled/project/linuxaarch64/config.linuxaarch64.default.mk