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

Fix various architectures #432

Merged
merged 2 commits into from Feb 1, 2023
Merged

Conversation

talex5
Copy link
Collaborator

@talex5 talex5 commented Feb 1, 2023

Dune has various other odd names for Linux on different architectures: ocaml/dune#4895
Note: I didn't do this for the tests. We'll still run the main test suite on these platforms.

Also, we defined max_luv_buffer_size = 0x7fffffff, but this doesn't work on 32-bit systems. Surprisingly, it doesn't trigger the Integer literal exceeds the range of representable integers of type int error either.

Something similar happens on 64-bits systems too:

utop # 0x3fffffffffffffff;;
- : int = 4611686018427387903

utop # 0x4000000000000000;;
- : int = -4611686018427387904

utop # 0x8000000000000000;;
Error: Integer literal exceeds the range of representable integers of type int

And this is pretty odd too:

utop # 4611686018427387903;;
- : int = 4611686018427387903

utop # 4611686018427387904;;
- : int = -4611686018427387904

utop # 4611686018427387905;;
Error: Integer literal exceeds the range of representable integers of type int

Apparently this isn't considered a bug: ocaml/ocaml#4245

OCaml ints are on bit shorter than C ints.
Dune has various other odd names for Linux:
ocaml/dune#4895
@talex5 talex5 requested a review from haesbaert February 1, 2023 14:17
@haesbaert
Copy link
Contributor

linux_elf wins the lottery

@haesbaert haesbaert merged commit 388f906 into ocaml-multicore:main Feb 1, 2023
talex5 added a commit to talex5/opam-repository that referenced this pull request Feb 5, 2023
CHANGES:

Some build fixes:

- Fix build on various architectures (@talex5 ocaml-multicore/eio#432).
  - Work around dune `%{system}` bug.
  - eio_luv: fix `max_luv_buffer_size` on 32-bit platforms.

- Add missing test-dependency on MDX (@talex5 ocaml-multicore/eio#430).
talex5 added a commit to talex5/opam-repository that referenced this pull request Feb 5, 2023
CHANGES:

Some build fixes:

- Fix build on various architectures (@talex5 ocaml-multicore/eio#432).
  - Work around dune `%{system}` bug.
  - eio_luv: fix `max_luv_buffer_size` on 32-bit platforms.

- Add missing test-dependency on MDX (@talex5 ocaml-multicore/eio#430).
@talex5 talex5 deleted the fix-other-archs branch April 5, 2023 12:44
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

Successfully merging this pull request may close these issues.

None yet

2 participants