Skip to content

fix: dune bootstrap#48

Closed
rgrinberg wants to merge 1 commit intojanestreet:masterfrom
rgrinberg:dune-bootstrap
Closed

fix: dune bootstrap#48
rgrinberg wants to merge 1 commit intojanestreet:masterfrom
rgrinberg:dune-bootstrap

Conversation

@rgrinberg
Copy link
Copy Markdown
Collaborator

For some reason, dune's bootstrap process doesn't like enabling CAML_INTERNALS. See the error in CI:

cd _boot && /Users/runner/work/dune/dune/_opam/bin/ocamlopt.opt -c -g -I +unix -I +threads spawn_stubs.c
vendor/spawn/src/spawn_stubs.c:481:20: error: implicit declaration of function 'caml_convert_signal_number' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      int signal = caml_convert_signal_number(Long_val(Field(v_signals_list, 0)));
                   ^
1 error generated.

I'm not sure why, but it's easy enough to workaround it be declaring the function that we need.

It's also a little cleaner this way as we only make the one private function we need available rather than everything.

Signed-off-by: Rudi Grinberg me@rgrinberg.com

For some reason, dune's bootstrap process doesn't like
enabling CAML_INTERNALS. See the error in CI:

```
cd _boot && /Users/runner/work/dune/dune/_opam/bin/ocamlopt.opt -c -g -I +unix -I +threads spawn_stubs.c
vendor/spawn/src/spawn_stubs.c:481:20: error: implicit declaration of function 'caml_convert_signal_number' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      int signal = caml_convert_signal_number(Long_val(Field(v_signals_list, 0)));
                   ^
1 error generated.
```

I'm not sure why, but it's easy enough to workaround it be declaring the
function that we need.

It's also a little cleaner this way as we only make the one private
function we need available rather than everything.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: cfe43bbb-bb8a-4289-a102-594ae6f6945d -->
@dra27
Copy link
Copy Markdown
Contributor

dra27 commented Sep 26, 2023

The problem was that CAML_INTERNALS was declared after headers were specified - signals.h was already included without that being defined by one of the earlier headers

@rgrinberg rgrinberg closed this Sep 27, 2023
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.

2 participants