Electron 37 build fails on aarch64 VM (Apple Silicon) on FreeBSD14.3

Trying to build Electron v37 on an Arm VM using make from within the ports directory and it fails. (Its also a very long build even with lots of CPU power and plenty of fast ram). Everything else I have built on this VM has worked flawlessly.

This is the error i receive:
Code:
ERROR at //build/rust/std/BUILD.gn:61:61: Array subscript out of range.


rust_version_pieces = string_split(rust_revision_pieces[1], ".")


You gave me 1 but I was expecting something from o to 0, inclusive.

See //build/rust/rust_target.gni:340:23: which caused the file to be

_rust_deps += [ "//build/rust/std" ]

^--------------

*** Error code 1
Any help is much appreciated. The Makefile indicates that aarch64 is supported.
 
I was able to build Electron after several tries with poudriere-dsh2dsh, writing directly to sdd disk instead of RAM and using 3 CPU cores. It took almost a whole day. So, yes, building Electron is a drag.
 
If you want to build the ninja macho ports such as Electron, Chromium etc you should really think about a beefy computer. It is not so much the 3 day compile time until you get a package. It is the 2 day compile time until you hit an error and have to start over.

In addition to CPU you also need enough RAM to back up the number of cores, including hyperthreaded cores if you want to use those. Unfortunately it is very difficult to estimate the correct number. `make world` lives in ca. 0.7 GB/core, so it is pretty small. A single linker process in the LLVM build can be 4 GB (per core) when DEBUG is on. At the same time the LLVM build doesn't have an infinite number of linker invocations in parallel, making the estimation for total RAM needed even more difficult. I think 2 GB/core is reasonable in a build.

A mainboard/CPU/RAM combo for that is less than $1000 and should be considered instead of endless waiting. In a laptop it is more difficult, and not every laptop is stable when you run all cores to the tilt.
 
If you want to build the ninja macho ports such as Electron, Chromium etc you should really think about a beefy computer. It is not so much the 3 day compile time until you get a package. It is the 2 day compile time until you hit an error and have to start over.

In addition to CPU you also need enough RAM to back up the number of cores, including hyperthreaded cores if you want to use those. Unfortunately it is very difficult to estimate the correct number. `make world` lives in ca. 0.7 GB/core, so it is pretty small. A single linker process in the LLVM build can be 4 GB (per core) when DEBUG is on. At the same time the LLVM build doesn't have an infinite number of linker invocations in parallel, making the estimation for total RAM needed even more difficult. I think 2 GB/core is reasonable in a build.

A mainboard/CPU/RAM combo for that is less than $1000 and should be considered instead of endless waiting. In a laptop it is more difficult, and not every laptop is stable when you run all cores to the tilt.
it seemed like it made it through most of the build and it was at like 12 hours. I have 12gb DDR5 ram allocated and multiple performance cores of apple silicon (M3) on the VM. It was far more performant than the 11th gen i7 with 48gb ddr4 ram (bare-metal) that I tried to also build electron with. I could try it with a Xeon server but single core is way way less ghz on that server.

My next purchase will hopefully be a M4 MAC Studio which would cut build time drastically but 🤷‍♂️ I have what I have today.

The concern was less about build time as it was about whether there was some secret sauce to getting it to happily build successfully on Arm. Guess I can try it again. Maybe this time build out a FreeBSD15 VM to test it on.
 
Back
Top