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 -use-ocamlfind -tag thread -package threads t.cma' fails #6058

vicuna opened this issue Jun 28, 2013 · 2 comments

'ocamlbuild -use-ocamlfind -tag thread -package threads t.cma' fails #6058

vicuna opened this issue Jun 28, 2013 · 2 comments


Copy link

@vicuna vicuna commented Jun 28, 2013

Original bug ID: 6058
Reporter: @hcarty
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2015-12-11T18:21:29Z)
Resolution: fixed
Priority: high
Severity: major
Version: 4.00.1
Target version: 4.01.0+dev
Fixed in version: 4.01.0+dev
Category: -for ocamlbuild use
Has duplicate: #6127
Monitored by: meyer @gasche @hcarty

Bug description

This bug is also present in the latest 4.01.0+dev snapshot from opam (4.01.0+dev18-2013-06-13).

The full command and output:

$ ocamlbuild -use-ocamlfind -tag thread -package threads t.cma

  • ocamlfind ocamlc -a -package threads t.cmo -o t.cma
    ocamlfind: Error from package `threads': Missing -thread or -vmthread switch
    Command exited with code 2.
    Compilation unsuccessful after building 3 targets (0 cached) in 00:00:00.

The bug is present when trying to compile:
t.cma, t.cmxa

but not when trying to compile:
t.native, t.byte

Steps to reproduce

  1. Create a (possibly empty) file to compile (ex.
  2. Run 'ocamlbuild -use-ocamlfind -tag thread -package threads t.cma'

Additional information

Tested against 4.00.1 and 4.01.0+dev18-2013-06-13.

Copy link

@vicuna vicuna commented Jul 26, 2013

Comment author: william

I add the following to ocamlbuild :

"-lflags -thread"

as we have to choose between -thread and -vmthread.

Do not know if this is exactly the same problem or an answer...

Copy link

@vicuna vicuna commented Jul 26, 2013

Comment author: @gasche

This should now be fixed in trunk and version/4.01.

(Note that ocamlbuild provides no tag to select -vmthread instead. I don't suppose there has been any demand for that.)

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

Successfully merging a pull request may close this issue.

None yet
2 participants