termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

Package request: Ocaml + OPAM

Open Julow opened this issue 9 years ago • 7 comments

this is probably impossible.

Julow avatar Jun 11 '16 00:06 Julow

+1

bugQ avatar Sep 01 '16 03:09 bugQ

It should be possible... Debian provides ARM builds that run on Raspberry Pi etc.

bugQ avatar Sep 01 '16 03:09 bugQ

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!

ygrek avatar Nov 25 '16 04:11 ygrek

ftr http://ygrek.org.ua/p/ocaml-termux.html

ygrek avatar Nov 29 '16 22:11 ygrek

@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.

fornwall avatar Nov 29 '16 23:11 fornwall

I created a PR for this: https://github.com/termux/termux-packages/pull/1343

bluelightning32 avatar Sep 03 '17 03:09 bluelightning32

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.

Leif-W avatar Feb 03 '24 20:02 Leif-W