Skip to content
New issue

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

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

Already on GitHub? # to your account

feature request: allow "available: word-size != 32" #4633

Open
hannesm opened this issue Apr 14, 2021 · 4 comments
Open

feature request: allow "available: word-size != 32" #4633

hannesm opened this issue Apr 14, 2021 · 4 comments

Comments

@hannesm
Copy link
Member

hannesm commented Apr 14, 2021

Some opam packages are only compiling on 64 bit systems (due to using large literals in OCaml code, ...). At the moment, it is cumbersome to figure out what to state in an opam file to define "this does not work on 32 bit systems", since arch != "x86_32" & arch != "arm32" may be sufficient today, but tomorrow when risc-v (or ppc32) is getting traction, it is no longer sufficient.

In OCaml, Sys.word_size is very useful and available. It would be nice to have this functionality in opam as well -- it should be easy to implement, and straightforward to expose it in the opam file. This would be a welcome change in the soon future (maybe even in 2.1?).

Thanks for reading.

@kit-ty-kate
Copy link
Member

I like this feature request very much, it would help opam-repository tremendously. opam 2.1 is expected to have its rc1 released very very soon so if it is accepted it would most likely be in opam 2.2.

@avsm
Copy link
Member

avsm commented Apr 14, 2021

This is a good one to put on the opam 2.2+ wishlist (definitely not opam 2.1, which is on the verge of release).

@AltGr
Copy link
Member

AltGr commented Jan 4, 2022

Note: implementing an additional variable word-size for this would be straight-forward. A little more work, of course, to think about backwards compatibility and maybe lint arch != "x86_32" & arch != "arm32" to advise a replacement.

@hannesm
Copy link
Member Author

hannesm commented Jan 4, 2022

Maybe related is "big-endian" / "little-endian", so an opam package can specify which platforms it expects to work on with future compatibility (obviously, some packages would still need to {allow,deny} specific architectures).

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants