Package request: Ocaml + OPAM
this is probably impossible.
+1
It should be possible... Debian provides ARM builds that run on Raspberry Pi etc.
Currently I can build ocaml directly on the device (Nexus 5X, aarch64) and get opam working - it should be possible to make apt packages natively, without cross-compilation, is there any procedure for that? Should I look into usual dpkg-stuff or maybe hack up echo-scripts in the spirit of build-package.sh? Will you be interested to accept such package?
PS there is also a set of patches to cross-compile ocaml for android, and there is also some work to get cross-compilation upstream, but building natively is simpler for me, thanks termux!
ftr http://ygrek.org.ua/p/ocaml-termux.html
@ygrek Currently only packages that are cross-compiled are available in the repository, as everything is built on a server for all supported arches (arm/aarch64/i686/x86_64).
Until cross compilation is setup I think your apt repo is a great idea! I've linked to it from the Termux twitter account so people can try it out.
I created a PR for this: https://github.com/termux/termux-packages/pull/1343
Figured I'd try to compile OCaml git. I just did a ./configure --prefix $PREFIX and it picks gcc even though I only have clang, so I also forced ./configure --prefix $PREFIX CC=clang. Then I got something about undefined function shmat. Wasn't sure what to do. I had libandroid-shmem installed amd a shmat man page but no shmat in any of the headers or .so libs. Also installed libandroid-sysv-semaphore and libandroid-posix-semaphore. There's some things in sys/sem.h, linux/sem.h, sys/shm.h, and linux/shm.h. Linked against the three aforementioned libs. I'm trying this on-device, so it'll take a while. But it's compiling away, further than I got before. Though I'm not sure if I'll get bad requests when trying to call some of the shared memory / semaphore functions, as the various headers may be missing functions, like semop or whatnot. Any tips welcome.
First attempt make tests:
Summary:
1341 tests passed
51 tests skipped
8 tests failed
0 tests not started (parent test skipped or failed)
0 unexpected errors
1400 tests considered
Not too bad. Now to see about the 8 failed tests.
List of failed tests:
tests/lib-dynlink-bytecode/main.ml
tests/lib-dynlink-domains/main.ml
tests/lib-dynlink-initializers/test5_main.ml
tests/lib-dynlink-initializers/test6_main.ml
tests/lib-dynlink-native/main.ml
tests/lib-dynlink-pr9209/dyn.ml
tests/parallel/recommended_domain_count_unix.ml
tests/tool-toplevel/topeval.ml
6 named dynlink. I forgot -fPIC? idk. Configure scripts seems to have put -fPIC all over the place.