Has anybody had any success with building Theia on a Raspberry Pi or other ARM device?

I’ve been running into some issues (granted I am using a Pi Zero W, so there’s that…)
I think I remember seeing somewhere that ARM devices aren’t compatible with Theia or one of its dependencies, but I’m not sure if that was recent/a rumour/actually true.

[original thread by Matthew Piercey]

Hi @mtpiercey, what kind of issues you are running into?

there are some discussions here as well: https://github.com/theia-ide/theia-apps/issues/130

@mtpiercey I would be surprised,since arm have contributors in the project and have a product based on Theia: https://os.mbed.com/studio/

However a RSP has limited RAM, which can be a factor - it’s possible to be in a situation where such a board does not have the RAM necessary to build a Theia application but might have enough to run it.

[Matthew Piercey]

OK, thanks for the info. When building Theia, I ran into an issue with installing the dependencies with yarn. It was stuck on building fresh packages and never actually finished. I cancelled it after several hours, and yarn build almost worked but it kept giving some sort of error. I don’t remember exactly what it was, but one of the dependencies apparently wasn’t arm-compatible? Anyway, I think I’ll try the cross-compilation on another computer and see if that works.

@thegecko Would you expect that one would need to do anything special to build Theia on one of those small boards with an arm CPU? Any known incompatibility in our dependencies?

[Jimmy Allen]

I got it running on an Orange Pi Zero. I had to add a decent amount of swap to it to get it to build as it only has 512MB of ram and it took ages to build. I am working on building an image with Theia, using pi-gen.

[Rob Moran]

At arm we are using Theia to build an ide to develop for iot devices. I must admit we haven’t tried running it on arm devices :slight_smile: From a technical perspective, there may be issues with binary plugins such as nsfw. If it does run, I’d be surprised if the electron version is performant. It may work well as a browser server, though.

[Jimmy Allen]

I have successfully built a Theia browser image with pi-gen. I ran it on a pi zero and it seems to work.

[Matthew Piercey]

Alright. I tried the cross-compilation as mentioned in the EclipseSource article. I don’t know what I did wrong, but it must have been something, since on two separate systems I got compilation errors (something along the lines of cc1: execvp: No such file or directory. Maybe it was because I was using 64-bit Ubuntu, not 32-bit as the article suggested. At any rate, after several failed attempts (most due to SSH timeouts, network resets, or some other errors I couldn’t control) I was able to build Theia on my Pi 3 B+, and the browser example runs surprisingly-well when I access it from my laptop. Not sure about the Zero W, yet, but I might be able to just copy over the folder (assuming I don’t run into any ARMv7 versus ARMv6 issues). Thanks again for the info!

[Jimmy Allen]

For the pi zero you’ll need armv6

[Jimmy Allen]

This is what I have been working on. https://git.1248.nz/robopi/pi-gen

[Jimmy Allen]

https://git.1248.nz/robopi/pi-gen/src/branch/theia/stage2/05-theia/00-run.sh is the building of Theia

[Jimmy Allen]

Been doing a bit more work. I am able to use Docker to build Theia.

[Jimmy Allen]

https://git.1248.nz/robopi/theia-rpi-docker

[Jimmy Allen]

I haven’t fully tested it yet. So far I have been able to build a basic browser and upload it to a Raspberry Pi Zero.

[BrotherCreamy]

I managed to build Theia on RPi 3B+ (running Raspbian Buster) by increasing SWAP size to 2048

So it sounds like there is good hope for the RPi 4B with 4GB of RAM to be able to build Theia apps relatively efficiently (RAM is much faster than SWAP).