Building IDE 2 for Raspberry Pi OS 64 bit

This is related to my earlier and now closed thread:
Building Arduino IDE 2.0 for Raspberry PI Ubuntu 64 bit - Software / IDE 2.x - Arduino Forum

Back then (Dec 2022), there was a github project where the user would build the IDE 2 for the RPI, with releases. Also he provided instructions on how one might be able to build your own.

koendv/arduino-ide-raspberrypi: arduino IDE v2 for raspberry pi (github.com)

However, since then that github project has been archived and the last release was 2.2.0

So I am wondering if there is a location where someone is still building AARCH64 builds and/or if there are instructions on how one might be able to build it.

Thanks
Kurt

There is a Linux version available on the download page. Does that not work?

Thanks,

There are versions of IDE 1.x that run on ARM based boards:

However the only the only Linux versions for 2.x Are x86 64 bit

Quick update:

I have the 1.8.18 installed which runs. I also have the teensy boards installed.

This morning, I installed: arduino-cli on the RPI5

Searched for and found instructions on how to add 3rd party boards. First
instructions I found did not work ( Arduino CLI Tutorial | DevDungeon Or I missed a key point.

Needed to call:

arduino-cli config init

And edit the generated file: ~/.arduino15/arduino-cli.yaml
and add the teensy URL.

Then ran the install

arduino-cli core install teensy:avr

And that is now installed.

Now to try building using it.

Then as hopefully a quick and dirty alternative, will try generating some build stuff, that can run withing SublimeText4 which is supported on the RPI5...

For what it is worth, I was able to build the current sources for the IDE for the RPI5
on the RPI5 and it is running. Or more specifically currently the debug version running from vscode app...

@ptillisch - not sure if you are interested, but this is sort of the precursor thread to the how to maybe install arduino-cli as a build system under sublimetext...

I have been following the steps up on the file:
arduino-ide/docs/development.md at main · arduino/arduino-ide (github.com)

You need to carefully walk through several other web pages to find and install all of
the other prerequisites.

For example the version of yarn that I had installed did not work,
Installed version using:
Installation | Yarn (yarnpkg.com)
...

Partial screen shot on my RPI5:

Now to see about building a none debug version ...

As the IDE 2 is still not available for ARM64, let's try to make it ourselves...
I would like to join the conversation to see if it would be easy to do so.
I am trying to build on my Raspberry Pi 400, following the above guide. I have reached a point in which some localisation files cannot be found, after running yarn build:dev:

arduino-ide-extension: src/node/i18n/arduino-localization-contribution.ts(6,20): error TS2307: Cannot find module '../resources/i18n/bg.json' or its corresponding type declarations.

To make a comparison, I tried to follow the instructions on my (elderly) Intel-based Mac and I have got the very same error message! So it is not a platform-related issue.
So, what am I missing, because of which building with the latest version of yarn should not work?
My setup is as follows:

Node 20 (20.18.0)
Yarn 4.5.1

Of course, I am not interested in debugging, but just in getting to some kind of executable... I was trying the dev build just because it should be simpler!
So, did someone get the same error message and get to solve the problem?
Thanks in advance.

Yep - I wish Arduino would build for ARM63 for each release. They do have the arduino-cli,

and as @ptillisch mentioned on another thread, you can install VS Code with the Arduino which runs...

I wish I remembered all of the steps I took, to get it to build.
For sure you need to go through and look at the prerequisites for some of the other
systems, like the Theia IDE, and VSCode.

Also I see, the development Guide was updated 14 hours ago, and added,

The build system might also need to build the Arduino CLI, the Arduino Language Server, and other tools from the sources. In this case it is also necessary to have the build prerequisites for those projects installed. For more details, refer to the Arduino CLI's prerequisites section.

I sort of figured that I needed some of them from the Additional Components
I also at the time took a few wrong turns, like for one component, I installed the latest
release, but the system only worked with the current long term release...

Things I know I had to install:
Node.js
Yarn
go
...

Sorry, I agree, it would be nice if there was a simple set of prerequisites listed in
one place for everything you need to install ...

Better yet, a place where you could download the IDE from.

That is interesting. I even did not notice there was a prerequisites section! So I have added go and taskfile to the list. I already have the Theia IDE prerequisites in Raspbian. However, I have got always the same error.
Maybe I am overly ambitious to want to compile the IDE with a minimal background. In the meanwhile, I will wait for someone who tells me why I am missing those localisation files, in order to go ahead to the next error…!
It would be nice if I could gather enough information about how to compile into some kind of report, as the development guide is not sufficient for a beginner… But the beginner is actually myself! And by now I am stuck.
By the way, it is two years without an official ARM64 build, so it would be better to find a solution. One can be to use the IDE on another computer. But Arduino is nice for learning, and this is one occasion!

I might have to tx pull the translations. This will be the next step…

That was an easy one, as localisation files were located in the root folder, copying them in the right folder (which is "i18n" under "resources") was just sufficient.
Now, I have got another error:

electron-app: ERROR in unable to locate '/home/emanuele/arduino-ide/arduino-ide-extension/src/node/resources/**/*' glob

It seems like something else is still missing, in that folder...

UPDATE I tried also to make a production build. But it seems like I ran out of memory on my 4 GB Pi 400.

Error: webpack exited with an unexpected signal: SIGKILL.
    at ChildProcess.<anonymous> (/home/emanuele/arduino-ide/node_modules/@theia/application-manager/lib/application-process.js:59:28)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

Aborting!

I was wondering, if I had an 8 GB Pi 5, would I have been successful?

What commands did you run?

As of now, you need Node.js 18.x to compile the project: arduino-ide/.github/workflows/build.yml at 3ccc864453866c9273428779680e4fe2b91b1ce6 · arduino/arduino-ide · GitHub.

You need yarn 1.x. All my versions for building Arduino IDE

node --version && npm --version && yarn --version && go version && task --version && python --version
v20.15.1
10.7.0
1.21.1
go version go1.21.7 darwin/amd64
Task version: v3.14.1 (h1:myTmEIbMbQx2D+g5lJvnbSqX531HmxiaQuefAqz8ISA=)
Python 3.9.12

For Ubuntu, here is a script to install all dependencies.

Please keep in mind that if Arduino IDE wants to run on AMD64 for Windows, for example, there must be an Arduino CLI (and its internal tools), Arduino Language Server, Firmware Uploader, etc. executables available for Windows AMD64. See the assets section at Release v1.0.4 · arduino/arduino-cli · GitHub.

Ping me if you're still willing to build and run Arduino IDE from sources; I am here from time to time and happy to assist you

It does not sound correct. No need to copy anything if one follows the steps from here: arduino-ide/docs/development.md at 3ccc864453866c9273428779680e4fe2b91b1ce6 · arduino/arduino-ide · GitHub.

Thanks @dankeboy36,

@emanuelebellini ,

I pulled my older RPI4 with external SSD again to try this out.

I ran your script. and it went a long ways :smiley:
However, if failed as the go language was not installed.
I downloaded and installed it from: Download and install - The Go Programming Language

Run the script again and it made its way through, and started up the IDE window, but
appeared like maybe it stopped running.

Was not sure best way to start it again.
So I decided to then follow the steps again in:
arduino-ide/docs/development.md at main · arduino/arduino-ide

So I followed the steps to bundle the application:, I cd to the arduino-ide directory

  1. Rebuild the native dependencies for electron

yarn --cwd electron-app rebuild

  1. Bundle the frontend and backend applications with webpack

yarn --cwd electron-app build

  1. Package the application

yarn --cwd electron-app package

And it built both the zip file and the appimage file in the
/electron-app/dist directory.

I tried running the appimage it failed.
I then did: sudo apt install libfuse2
and then ran the appimage and it came up :smiley:

I may go mark this as solution.

Thank you for the answers, and for the availability as well!

Yes, please!

In my last attempt, I managed to get some errors related to Theia, after running the build script. So I was thinking about installing the Theia IDE.
But, as of what you said, it is not necessary.
So, the next time, I will try to downgrade both Node and Yarn (I did not notice the pipeline) and run again…

In fact, I did not know I needed those versions of Node and Yarn to run those commands, so I am willing to install them and try again…

I will do it in my spare time, so it could take a while…!

If I did not understand something, please let me know…
Thanks again.

P.S. Of course, if something goes wrong, I can take advantage of the script for Ubuntu to make a check about the prerequisites…

As I mentioned above, I ran their script on a RPI4 and it worked on the RaspberryPI 64 bit setup. Other than the first time through it did not have go installed. I downloaded and installed it using the instructions in the link in post 13. Then reran it and it
went through.

I thought about uploading a zip file of the appimage, but the forum does not allow me to upload files that big...

And I don't like to Share out my OneDisk or the like...

Lucky you... :blush:
I would rather learn how to build it, in a way such that I could upgrade, eventually...
But I still have not succeded in doing it.
With Yarn 4.5.1, I have the following error message with the build command:

Error: spawn /home/emanuele/dev/git/arduino-ide/node_modules/@theia/application-manager/node_modules/.bin/webpack ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /home/emanuele/dev/git/arduino-ide/node_modules/@theia/application-manager/node_modules/.bin/webpack',
  path: '/home/emanuele/dev/git/arduino-ide/node_modules/@theia/application-manager/node_modules/.bin/webpack',
  spawnargs: [ '--mode', 'production' ]
}

I tried with a dev build, but I obtain the same error.
Should not I have upgraded to Yarn 4.5.1, with Yarn 1.22.22 I had another error:

[webpack-cli] Failed to load '/home/emanuele/dev/git/arduino-ide/electron-app/webpack.config.js' config

[webpack-cli] Error: Cannot find module 'arduino-ide-extension/lib/node/theia/filesystem/nsfw-watcher'
Require stack:
- /home/emanuele/dev/git/arduino-ide/electron-app/webpack.config.js
- /home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/lib/webpack-cli.js
- /home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/lib/bootstrap.js
- /home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/bin/cli.js
- /home/emanuele/dev/git/arduino-ide/node_modules/webpack/bin/webpack.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Function.resolve (/home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:164:23)
    at Object.<anonymous> (/home/emanuele/dev/git/arduino-ide/electron-app/webpack.config.js:34:19)
    at Module._compile (/home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (/home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at loadConfig (/home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/lib/webpack-cli.js:1327:31) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/emanuele/dev/git/arduino-ide/electron-app/webpack.config.js',
    '/home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/lib/webpack-cli.js',
    '/home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/lib/bootstrap.js',
    '/home/emanuele/dev/git/arduino-ide/node_modules/webpack-cli/bin/cli.js',
    '/home/emanuele/dev/git/arduino-ide/node_modules/webpack/bin/webpack.js'
  ]
}

Error: webpack exited with an unexpected code: 2.
    at ChildProcess.<anonymous> (/home/emanuele/dev/git/arduino-ide/node_modules/@theia/application-manager/lib/application-process.js:66:28)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
error Command failed with exit code 1.

In the former case, the .bin folder is missing. In the latter, actually I have got that "nsfw-watcher" folder...
Thus, the error message with Yarn classic seems less severe. Is that the correct version? However, now I cannot proceed...
Again, I can try to install the Theia IDE, but it does not seem necessary...

Use the version specified in the development guide:

https://github.com/arduino/arduino-ide/blob/main/docs/development.md#prerequisites

https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites

So you must use a version of Yarn that is greater than or equal to 1.7.0, and less than 2.0.0. So your Yarn 1.22.22 is perfect, but you must not use Yarn 4.5.1.

Thanks for pointing out. I tried upgrading Yarn because KurtE said it did not work in the first place, but the link referred to Yarn classic indeed…
I will give it another try… It is strange that Node cannot see that folder, which exists.
I could make an attempt on Ubuntu too; even if I would prefer obtaining the executable on Raspbian…

Yep - I believe the version that I installed on my machine was like the 4.5.1 which
did not work at all, which is why I then installed the 1.22.22 and things started doing things.

But as I mentioned earlier on a RPI4, I tried the script mentioned by @dankeboy36
in post 11,

arduino-ide/docs/internal/Ubuntu.md at 3ccc864453866c9273428779680e4fe2b91b1ce6 · arduino/arduino-ide

And it worked except it did not install the go compiler.
And as I mentioned in post 13, once I did that it ran...

But I then did the other steps to create the packages (zip file and appimage)