Will OF run on the upcoming CHIP computer?

Hello.
Interested in running OF on a single chip computer board, I have just ordered the latest Raspberry PI 2
While waiting for it, I have read about the CHIP computer whose crowdfunding campaign is in progress.
As a complete beginner, I was wondering if the board had some sort of OS or hardware related limitation that could prevent OF from running on it.
Thanks!

It is very likely that it will work. CHIP is reportedly using an Allwinner A13 (ARM7) chip similar to pcDuino and others. The core functionality of openFrameworks should run without much effort. Traditionally the difficult part has been getting full hardware accelerated graphics support (OpenGL, etc) running. As long as CHIP is able to distribute working OpenGL drivers, past work with the Mali core / Allwinner SoC (system on a chip) should work. See here for some other references / discussion / progress:





etc.

Hi,
just reviving this thread as Next Thing Co recently released graphics drivers for the chip computer and I’m now attempting to get OF running. I’m using the arm7 release from the downloads page. install_codecs, install_dependencies and compileOF scripts all run without issue.

When attempting to build a project I get a run of poco related errors:

/home/chip/of_v0.9.8_linuxarmv7l_release/libs/openFrameworksCompiled/lib/linuxarmv7l/libopenFrameworks.a(ofImage.o): In function `bool loadImage<unsigned char>(ofPixels_<unsigned char>&, std::string)':
ofImage.cpp:(.text+0x19c2): undefined reference to `Poco::URI::URI(std::string const&)'
/home/chip/of_v0.9.8_linuxarmv7l_release/libs/openFrameworksCompiled/lib/linuxarmv7l/libopenFrameworks.a(ofImage.o): In function `bool loadImage<unsigned short>(ofPixels_<unsigned short>&, std::string)':
ofImage.cpp:(.text+0x1d6e): undefined reference to `Poco::URI::URI(std::string const&)'
/home/chip/of_v0.9.8_linuxarmv7l_release/libs/openFrameworksCompiled/lib/linuxarmv7l/libopenFrameworks.a(ofImage.o): In function `bool loadImage<float>(ofPixels_<float>&, std::string)':
ofImage.cpp:(.text+0x2046): undefined reference to `Poco::URI::URI(std::string const&)'
/home/chip/of_v0.9.8_linuxarmv7l_release/libs/openFrameworksCompiled/lib/linuxarmv7l/libopenFrameworks.a(ofURLFileLoader.o): In function `ofURLFileLoaderImpl::ofURLFileLoaderImpl()':
ofURLFileLoader.cpp:(.text+0xd14): undefined reference to `Poco::Net::Context::Context(Poco::Net::Context::Usage, std::string const&, Poco::Net::Context::VerificationMode, int, bool, std::string const&)'
ofURLFileLoader.cpp:(.text+0x1026): undefined reference to `Poco::Exception::displayText() const'
ofURLFileLoader.cpp:(.text+0x1112): undefined reference to `Poco::Exception::displayText() const'
/home/chip/of_v0.9.8_linuxarmv7l_release/libs/openFrameworksCompiled/lib/linuxarmv7l/libopenFrameworks.a(ofURLFileLoader.o): In function `ofURLFileLoaderImpl::threadedFunction()':
ofURLFileLoader.cpp:(.text+0x1bc6): undefined reference to `Poco::Thread::setName(std::string const&)'
ofURLFileLoader.cpp:(.text+0x24fe): undefined reference to `Poco::SystemException::SystemException(std::string const&, int)'
ofURLFileLoader.cpp:(.text+0x2572): undefined reference to `Poco::SystemException::SystemException(std::string const&, int)'

Full output here: http://pastebin.com/9bVdSp3X

The problem looks similar to something reported here. I tried copying the *.a files from openFrameworksLibs_master_linuxarmv7l.tar.bz2 into libs/poco/lib/linuxarmv7l as suggested in that post without any luck.

Can anyone offer any suggestions as to what to try next?

Cheers,
Bob.

this is because we compile the libraries with a different version of gcc which is probably newer or older than yours and incompatible. you can try using the apothecary scripts to recompile poco:

cd scripts/apothecary
./apothecary -tlinuxarmv7l update poco

but we haven’t really tested this scripts for directly compiling under linux arm. for next release we’ll compile the libraries with the different versions of the compilers to solve this problem

Thanks Arturo.
I can report the apothecary script runs happily on arm7 - tested on both the chip running debian and orange pi zero running armbian Jessie.

On Chip, the empty project example now builds successfully. Initially upon running it I get this error:

libEGL warning: MESA-LOADER: malformed or no PCI ID

libEGL warning: DRI2: failed to open armsoc (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  72 (X_PutImage)
  Serial number of failed request:  149
  Current serial number in output stream:  150

After investigating I discovered Processing has been succesfully run on the board with hardware acceleration and after following instructions here to suppress the software renderer I then get this change in the error:

libEGL warning: GLX/DRI2 is not supported
libEGL warning: DRI2: failed to open armsoc (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  72 (X_PutImage)
  Serial number of failed request:  143
  Current serial number in output stream:  143
/home/chip/of_v0.9.8_linuxarmv7l_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:169: recipe for target 'run' failed
make: *** [run] Error 1

Is there anything I could try to push forward from here?

UPDATE:
It turns out that after building openFrameworks many applications now throw the error above (Processing sketches and Kodi now fail to launch). I suspect OF’s install_dependencies script is stomping over CHIPS libEGL somehow. Are there any potential problem packages I could remove from the install_dependencies script? Or is there a way I might be able to easily revert to the previous configuration by uninstalling some package or similar?

SUCCESS!

The install_dependencies script was indeed the culprit. Removing all mesa related packages did the job but it did require starting from a freshly flashed CHIP. I’ve put a repo up here with the modified dependencies script and build instructions: https://github.com/zealtv/ofInstallChip

For anyone unfamiliar with the board, it’s worth investigating - it’s very cheap ($9), has wifi, bluetooth and 4GB of fast onboard flash so no need for an sd card . One of my favourite things about the device is it’s battery management - you can connect a lithium battery directly and CHIP handles charging via usb making it great for embedded/hand-held/wearable applications.

4 Likes

that’s great!

would be super useful if you could send a pull request to the official repo with the new install_dependencies script in a chip folder under linux or something like that

also if you want to send a PR with the instructions to the OF site repo linking to it from the index of the corresponding setup guide?

PRs sent!

I noticed the github version of the debian/install_dependancies script detects and rebuilds Poco if required so I’ll update the installation guide when that’s released.