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

ocamlbuild pass too many (or not enough) arguments to ocamlfind for compiling C sources #6809

Closed
vicuna opened this issue Mar 11, 2015 · 5 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Mar 11, 2015

Original bug ID: 6809
Reporter: @chambart
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2017-02-16T14:15:09Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.03.0+dev / +beta1
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.02.2+dev / +rc1
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Related to: #6794

Bug description

When building core 112.17.00:

with ocamlbuild from OCaml 4.02.1:
$ ocamlbuild -use-ocamlfind -classic-display lib/bigstring_stubs.o
/home/chambart/.opam/4.02.1/bin/ocamlfind ocamlc -I lib -package core_kernel -c lib/bigstring_stubs.c

with ocamlbuild from trunk:
$ ocamlbuild -use-ocamlfind -classic-display lib/bigstring_stubs.o
/home/chambart/.opam/4.03.0+trunk/bin/ocamlfind ocamlc -I lib -package core_kernel -package variantslib.syntax -package variantslib -package unix -package typerep_lib.syntax -package typerep_lib -package threads -package sexplib_unix -package sexplib.syntax -package sexplib -package pa_test.syntax -package pa_test -package pa_pipebang -package pa_ounit.syntax -package pa_ounit -package pa_bench.syntax -package pa_bench -package herelib.syntax -package herelib -package fieldslib.syntax -package fieldslib -package enumerate.syntax -package custom_printf.syntax -package custom_printf -package core_kernel -package comparelib.syntax -package bin_prot.syntax -package bin_prot -package bigarray -c -o lib/bigstring_stubs.o lib/bigstring_stubs.c
ocamlfind: Error from package `threads': Missing -thread or -vmthread switch

@vicuna
Copy link
Author

vicuna commented Mar 11, 2015

Comment author: @diml

6794 added support for passing -package and -thread options to ocamlfind for C files.

oasis automatically adds "-thread" for ocaml files when they are flagged with "package(threads)". But it does it only for ocaml files and still flags C files with "package(X)" for every package, even though this is useless at the moment.

I guess this is more an oasis bug, but it will affect packages with C stubs using oasis and depending on threads. So it might be safer to revert 6794 from 4.02.2.

@vicuna
Copy link
Author

vicuna commented Mar 11, 2015

Comment author: @gasche

Reverted from 4.02.

@vicuna
Copy link
Author

vicuna commented Mar 18, 2015

Comment author: @damiendoligez

Has anyone reported this to the oasis bug tracker?

@vicuna
Copy link
Author

vicuna commented Mar 18, 2015

Comment author: @diml

I did, with a patch to fix it:

ocaml/oasis#61

@vicuna
Copy link
Author

vicuna commented Apr 11, 2015

Comment author: @gasche

I'm marking this "fixed": the oasis-breaking change is removed from the stable 4.02 branch, but still present in trunk. Thanks to Jérémie, oasis should work with trunk by the time of the 4.03 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants