bap-bindings icon indicating copy to clipboard operation
bap-bindings copied to clipboard

ctypes 0.18.0 support

Open sternenseemann opened this issue 4 years ago • 0 comments

ctypes 0.18.0 merged the threaded and unthreaded sub package for ctypes.foreign. As a result, building bap-bindings fails with the following message:

  /nix/store/v02f2lbgkrdawgxzgqpy4gs57caqqn0i-ocaml-findlib-1.8.1/bin/ocamlfind opt -o _build/bap/generate -linkpkg -package bap,bap-plugins,ctypes.stubs,ctypes.foreign,findlib.dynload,bap-main _build/bap/lib/bindings.cmx _build/bap/stub_generator/generate.cmx
  ocamlfind: [WARNING] Package `threads': Linking problems may arise because of the missing -thread or -vmthread switch
  File "/build/findlib_initlf9c4b9.ml", line 1:
  Error: No implementations provided for the following modules:
           Thread referenced from /nix/store/81w5jjxw45fxwfwiqhlwqwywl94rwq2c-ocaml4.10.0-ctypes-0.18.0/lib/ocaml/4.10.0/site-lib/ctypes/ctypes-foreign.cmxa(Foreign)
           Mutex referenced from /nix/store/81w5jjxw45fxwfwiqhlwqwywl94rwq2c-ocaml4.10.0-ctypes-0.18.0/lib/ocaml/4.10.0/site-lib/ctypes/ctypes-foreign.cmxa(Foreign)
  make: *** [Makefile:78: _build/bap/generate] Error 2

This can be fixed by passing the -thread flag to ocamlopt when linking, but I'm not sure if this is the best way to alleviate the issue.

sternenseemann avatar Mar 06 '21 22:03 sternenseemann