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

unable to bootstrap on Haiku #8551

Closed
Alizter opened this issue Aug 30, 2023 · 4 comments · Fixed by #8795
Closed

unable to bootstrap on Haiku #8551

Alizter opened this issue Aug 30, 2023 · 4 comments · Fixed by #8795

Comments

@Alizter
Copy link
Collaborator

Alizter commented Aug 30, 2023

Haiku doesn't have sys/syscalls.h so our current implementation of spawn will not work. Specifically spawn_stubs.c.

Seems to be related to #5577

@rgrinberg is sys/syscalls.h even needed in that file? If the cygwin build works without it, then maybe it is better to remove?

@Alizter
Copy link
Collaborator Author

Alizter commented Aug 31, 2023

I removed sys/syscalls.hfromspawn_stubs.c` and the bootstrap process got the the end and then got stuck for some other reasons:

  1. wait3 isn't available. (for dune_wait3)
  2. pipe2 isn't available. (for spawn_stubs.c)

I guess some Haitu specific code will be needed for this.

@Alizter
Copy link
Collaborator Author

Alizter commented Sep 26, 2023

With #8768 the build gets further however we are stuck on wait4 not being available. Supposedly these are available from libbsd.so as detailed here:

https://lists.llvm.org/pipermail/all-commits/Week-of-Mon-20210125/043638.html

I haven't yet tried to patch our wait4 stubs to handle this/

@Alizter
Copy link
Collaborator Author

Alizter commented Sep 28, 2023

With some further tweaks I am able to bootstrap on Haiku and build the release. I just had to modify the wait4 stubs and am using the same hack as windows in the scheduler. I need to also work out what to do with fswatch. Interestingly, TUI is working too.

@Alizter
Copy link
Collaborator Author

Alizter commented Sep 29, 2023

fswatch works fine, it's already on HaikuPorts.

I have undone my modifications of the stubs and passed the linker flag -cclib -lbsd which lets me bootstrap and build on Haiku.

All that is left is working out how to pass these linker flags conditionally on the platform dune is being compiled.

@Alizter Alizter mentioned this issue Sep 29, 2023
4 tasks
emillon added a commit to emillon/opam-repository that referenced this issue Nov 28, 2023
CHANGES:

- Introduce `$ dune ocaml doc` to open and browse documentation. (ocaml/dune#7262, fixes
  ocaml/dune#6831, @EmileTrotignon)

- `dune cache trim` now accepts binary byte units: `KiB`, `MiB`, etc. (ocaml/dune#8618,
  @Alizter)

- No longer force colors for OCaml 4.03 and 4.04 (ocaml/dune#8778, @rgrinberg)

- Introduce new experimental odoc rules (ocaml/dune#8803, @jonjudlam)

- Introduce the `runtest_alias` field to the `cram` stanza. This allows
  removing default `runtest` alias from tests. (@rgrinberg, ocaml/dune#8887)

- Do not ignore libraries named `bigarray` when they are defined in conjunction
  with OCaml 5.0 (ocaml/dune#8902, fixes ocaml/dune#8901, @rgrinberg)

- Dependencies in the copying sandbox are now writeable (ocaml/dune#8920, @rgrinberg)

- Absent packages shouldn't prevent all rules from being loaded (ocaml/dune#8948, fixes
  ocaml/dune#8630, @rgrinberg)

- Correctly determine the stanza of menhir modules when `(include_subdirs
  qualified)` is enabled (@rgrinberg, ocaml/dune#8949, fixes ocaml/dune#7610)

- Display cache location in Dune log (ocaml/dune#8974, @nojb)

- Re-run actions whenever `(expand_aliases_in_sandbox)` changes (ocaml/dune#8990,
  @rgrinberg)

- Rules that only use internal dune actions (`write-file`, `echo`, etc.) can
  now be sandboxed. (ocaml/dune#9041, fixes ocaml/dune#8854, @rgrinberg)

- Do not re-run rules when their location changes (ocaml/dune#9052, @rgrinberg)

- Correctly ignore `bigarray` on recent version of OCaml (ocaml/dune#9076, @rgrinberg)

- Add `test_` prefix to default test name in `dune init project` (ocaml/dune#9257, fixes
  ocaml/dune#9131, @9sako6)

- Add `coqdoc_flags` field to `coq` field of `env` stanza allowing the setting
  of workspace-wide defaults for `coqdoc_flags`. (ocaml/dune#9280, fixes ocaml/dune#9139, @Alizter)

- [coq rules] Be more tolerant when coqc --print-version / --config don't work
  properly, and fallback to a reasonable default. This fixes problems when
  building Coq projects with `(stdlib no)` and likely other cases. (ocaml/dune#8966, fix
  ocaml/dune#8958, @Alizter, reported by Lasse Blaauwbroek)

- Dune will now run at a lower framerate of 15 fps rather than 60 when
  `INSIDE_EMACS`. (ocaml/dune#8812, @Alizter)

- dune-build-info: when `version=""` is found in a `META` file, we now return
  `None` as a version string (ocaml/dune#9177, @emillon)

- Dune can now be built and installed on Haiku (ocaml/dune#8795, fix ocaml/dune#8551, @Alizter)

- Mark installed directories in `dune-package` files. This fixes `(package)`
  dependencies against packages that contain such directories. (ocaml/dune#8953, fixes
  ocaml/dune#8915, @emillon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant