Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile ocaml sources on a chrome-book #12797

Closed
fccm2 opened this issue Nov 29, 2023 · 3 comments
Closed

compile ocaml sources on a chrome-book #12797

fccm2 opened this issue Nov 29, 2023 · 3 comments

Comments

@fccm2
Copy link

fccm2 commented Nov 29, 2023

It's difficult to compile ocaml sources on a chrome-book computer.
It's seems that the linux provided with a chrome-book is a kind of Debian inside a container, but we notice some small differences with a real Linux box.

While compiling ocaml sources it was quite difficult because I had to replace all the ln commands by cp commands, because ln commands produce errors, and so stop the build of the Makefile.

Also After reaching a result only the bytecode compiler does work, the ocamlopt command produces an error:

File "caml_startup", line 1:
Error: Cannot find file libasmrun.a

I probably didn't install libasmrun.a because I was unable to compile it, indeed the build script doesn't work out of the box as I explained above and I had to run the build manually. (I had to install everything manually, and I have only been able to get a bytecode compiler working).

I had the same problem with different versions of ocaml 4.14.1 or other versions.

If you want to make the test by yourself you can find cheap chrome-books for 200 euros.

@chetmurthy
Copy link
Contributor

I'm surprised to learn this. I have used HP x360 14c chromebooks since the beginning of the pandemic, and I build/run OCaml from opam-on-up, all the time. I do development on Camlp5 and the pa_ppx suite of PPX rewriters, and all of that builds just fine in the Chromeos Linux container.

Maybe it's a question of the specific Chromebook? Mine is intel-based: maybe you're on an ARM-based machine?

@fccm2
Copy link
Author

fccm2 commented Nov 30, 2023

It’s a Chromebook Asus C423.

$ arch
x86_64
$ 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
[...]

Here is the error message:

$ 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

if I manually make a cp to replace the ln command and run the make command again, the make command continues until another ln.

@fccm2
Copy link
Author

fccm2 commented Nov 30, 2023

OK, it appears that this is a bug of the environment the command ln -sf bugs while ln without -sf parameters doesn't bug, so I will close this issue, sorry

@fccm2 fccm2 closed this as completed Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants