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

Building the stubs generate warnings #40

Open
AllanBlanchard opened this issue Jan 23, 2025 · 4 comments
Open

Building the stubs generate warnings #40

AllanBlanchard opened this issue Jan 23, 2025 · 4 comments

Comments

@AllanBlanchard
Copy link

I downloaded the last artifacts, running the build command, I get the following error:

$ dune build @install
In file included from switch/lib/ocaml/caml/io.h:28,
                 from mlmpfr_stubs.h:323,
                 from mlmpfr_stubs.c:17:
switch/lib/ocaml/caml/platform.h: In function ‘caml_plat_latch_is_released’:
switch/lib/ocaml/caml/platform.h:222:10: warning: implicit declaration of function ‘atomic_load_acquire’ [-Wimplicit-function-declaration]
  222 |   return atomic_load_acquire(&latch->value) == Latch_released;
      |          ^~~~~~~~~~~~~~~~~~~
switch/lib/ocaml/caml/platform.h: In function ‘caml_plat_latch_set’:
switch/lib/ocaml/caml/platform.h:230:3: warning: implicit declaration of function ‘atomic_store_release’; did you mean ‘atomic_store_explicit’? [-Wimplicit-function-declaration]
  230 |   atomic_store_release(&latch->value, Latch_unreleased);
      |   ^~~~~~~~~~~~~~~~~~~~
      |   atomic_store_explicit

The opam file suggests that there are additional steps to perform before running the dune command, but I could not figure out what I should do.

@AllanBlanchard
Copy link
Author

Ok, this is not a problem with the build instructions, just additional warnings.

@AllanBlanchard AllanBlanchard changed the title Build instructions are incorrect Building the stubs generate warnings Jan 23, 2025
@thvnx
Copy link
Owner

thvnx commented Jan 29, 2025

Hi, thanks for the report, I'll have a look!

@thvnx
Copy link
Owner

thvnx commented Feb 4, 2025

What C compiler are you using (I do not reproduce on my side with clang 16)?

@AllanBlanchard
Copy link
Author

I have two configurations.

Ubuntu:

  • gcc 11.4
  • dune 3.17.2
  • ocaml 5.3

Nix:

  • gcc 14.2
  • dune 3.17.1
  • ocaml 5.3

I made a few additional tests with Nix, apparently, this only happens with OCaml 5.3.

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

No branches or pull requests

2 participants