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

decompress testsuite fails 5.0 because of missing pthread link flag #736

Open
moyodiallo opened this issue Nov 5, 2021 · 1 comment
Open

Comments

@moyodiallo
Copy link

Hi,

I found this issue on OPAM health check, it's about the decompress package.

The main.c file include caml/callback.h,the ocaml-multicore runtime now use pthread by default, we get this error because of that :

$ cc -o a.out main.c -I$(ocamlopt -where) -L../../bindings/stubs -I../../bindings/stubs -ldecompress -lm -ldl 
+  ../../bindings/stubs/libdecompress.a(decompress.exe.o): In function `caml_execute_signal_exn':
+  /home/alpha/.opam/multicore/.opam-switch/build/ocaml-variants.4.14.0+domains/runtime/signals.c:191: undefined reference to `pthread_sigmask'

By adding -lpthread to the command, it work fine. I think, we should precise in ocaml-multicore's doc that linking pthread is now a requirement when linking the OCaml runtime.

@moyodiallo
Copy link
Author

moyodiallo commented Nov 15, 2021

It's same issue with tplib package. Solving this issue is just adding the flag -lpthread in configure.ac file at line 44 (same as -lm) and after not forget to regenerate the config file by the command autogen -i -f

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

1 participant