Compile ocaml sources on a chrome-book

is there someone that would like to work with me on this issue below?
I have a chromebook and could work on it, but I would need help to know the right way to resolve the problems, and I would need help to make it reach upstream.
I have already contributed to the windows stub of the function Unix.truncate in the past, but I haven’t been able to do it alone, I got the help from Nicolas Ojeda Bar and others to reach upstream. This is why I’m volunteer to work on it but I won’t be able to do it alone. So any volunteer?

I replied to the issue. I’ve been building a ton of OCaml stuff (including opam, compilers etc) in the Linux container on HP x360 14c chromebooks since the start of the pandemic, no problemo. Maybe it’s a problem with ARM chromebooks (mine are intel-based) ?

How can I know what kind of chromebook it is?
edit: Just found the box: it’s a Chromebook Asus C423
second edit: This chromebook doesn’t have a lot of space, so I don’t think I could use opam on it.

In the linux container, what do you get from:

$ uname -a
Linux penguin 5.15.130-20472-g682e24dd583b #1 SMP PREEMPT Wed Oct 25 18:26:35 PDT 2023 x86_64 GNU/Linux
$ cat /proc/cpuinfo
[a ton of output, but I think the useful bit is]
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 140
model name      : 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz

It’s a Chromebook Asus C423,
I get:

$ arch
$ uname -a
Linux penguin 5.15.124-20273-g4bee82191fda #1 SMP PREEMPT Wed Sep 20 18:10:16 PDT 2023 x86_64 GNU/Linux
$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 92
model name      : Intel(R) Celeron(R) CPU N3350 @ 1.10GHz

The real error message that I get is:

$ make
  GEN target_camlheaderd
  GEN camlheaderi
  GEN target_camlheaderi
make[2]: Leaving directory '/mnt/chromeos/ocaml-src/ocaml-5.1.0/stdlib'
rm -f boot/ocamlrun
cp runtime/ocamlrun boot/ocamlrun
cd boot; rm -f stdlib.cma std_exit.cmo *.cmi camlheader
cd stdlib; cp stdlib.cma std_exit.cmo *.cmi camlheader ../boot
cd boot; ln -sf ../runtime/libcamlrun.a .
ln: failed to create symbolic link './libcamlrun.a': Permission denied

when I manually run a cp to replace all the ln’s, I can get a working ocamlc and ocaml, but I haven’t been able to get an ocamlopt working.

[not that this should be a cause, but … exonerate the innocent to implicate the guilty]
Are you up-to-date on Chromeos ?

Are you building OCaml under control of opam, or directly using configure/make ?

I’m new on both Chromeos and Debian and using a container.
I don’t really know, but it seems that the Chromebook auto update itself alone, because sometimes I notice the interface is different while I didn’t do anything to update.
I’m also new with Debian (I used Mandriva in the past for years), so I don’t know if I should update it, but if I should do it I will be quite worry with it because I quickly run out of disk memory, I already had to make a power wash of the chrome several times to get back disk space (and I need to make a lot of backup before).

edit: As I said I don’t use opam because opam is a big space consumer and I quickly run out of disk memory in the linux container of this chromebook. So I just use ./configure and make in the sources. I tried several versions of the sources, and the error is always the same with 4.14 or 5.1

I don’t know why there is the permission denied error message, the permissions are normal in the directory tree: “-rw-r–r–” for files and “drwxr-xr-x” for directories.

This is the permissions of boot/ and …/runtime/libcamlrun.a

I have been able to build rescript correctly, but the build script of rescript is different, but just to say that I don’t have problems to build other sources than ocaml.

edit2: I tried to run by hand:

bp4@ocaml-5.1.0/boot$ ln -sf ../runtime/libcamlrun.a .
ln: failed to create symbolic link './libcamlrun.a': Permission denied

but when I run without the -sf parameters there is no error anymore:

$ ln ../runtime/libcamlrun.a .
$ ls
  1. go to the chromebook settings and click on “About chromeos”. It’ll show you a list of actions, and also show you your chromeos build number. And there’s a button for “check for updates”. Click that.

  2. The Debian inside the Linux container is (to my experience) pretty much a straightforward Debian userland. Really, it’s just that, not much more.

  3. The reason you might be getting errors with “ln” is that there might be some weirdness in the way the container is configured – it’s a Linux chroot-like thing, not a VM (IIRC). that’s why I asked about making sure your Chromeos was up-to-date.

  4. Also, get your Debian up-to-date:

$ sudo apt-get update
$ sudo apt-get dist-upgrade

ETA: if it’s any consolation, it is highly unlikely that whatever’s going wrong, is due to code. Almost certainly it’s some environmental bug. B/c I’ve been building on Chromeos/Linux container for years. years. Which means I’ve been doing it with wildly old Chromeos, wildly old Debian packages.

I’m also using Linux and OCaml since more than 20 years now.
OCaml didn’t support Windows very well in the past, I thought it was the same on chromebooks now.