caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Rémi Dewitte" <remi@gide.net>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] Re: ocamlbuild issue
Date: Fri, 5 Aug 2011 12:23:26 +0200	[thread overview]
Message-ID: <CA+Whxom1uAFqGBAVpFuyoC+MxN1+oNfTtg=8r3UA0aoCURB79w@mail.gmail.com> (raw)
In-Reply-To: <CA+WhxokxvVH9v-3q1pSshzFJM5QNBQBK1N6U3jjMFYvOjqTVRQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]

Hi again,

I have created a myocamlbuild.ml which fixes the issue but I'm still
interested to get your advice.

open Ocamlbuild_plugin
open Command

let _ = dispatch begin function
   | After_rules ->
       flag ["ocaml"; "thread"; "compile"]  (S[A "-thread"]);
       flag ["ocaml"; "thread"; "link"]     (S[A "-thread"]);
   | _ -> ()
end

Rémi

2011/8/5 Rémi Dewitte <remi@gide.net>

> Hello,
>
> I have an issue with ocamlbuild.
>
> I type : ocamlbuild -use-ocamlfind sdit.native
> I get the following error :
> ocamlfind: Error from package `postgresql': This library requires
> multi-threading support
> Command exited with code 2.
>
> I have checked this :
> $ ocamlbuild -documentation | grep thread
> flag {. byte, link, ocaml, program, thread .} "threads.cma -thread"
> flag {. link, native, ocaml, program, thread .} "threads.cmxa -thread"
> flag {. doc, ocaml, thread .} "-I +threads"
> flag {. compile, ocaml, thread .} "-thread"
>
> I have checked _build/_log also : tag thread is active
> # Target: sdit.native, tags: { dont_link_with, extension:native,
> file:sdit.native, link, native, ocaml, package(extlib), package(gsl),
> package(postgresql), package(pxp), package(str), program, quiet, thread,
> traverse, use_menhir }
> /usr/bin/ocamlfind ocamlopt -linkpkg -package extlib -package gsl -package
> postgresql -package pxp -package str dependent.cmx sdit.cmx -o sdit.native
>
> I think there is a bug with -use-ocamlfind where -thread is not appended to
> the command.
>
> I use ocaml 3.12.0
>
> What do you think ?
>
> Thanks,
> Rémi
>

[-- Attachment #2: Type: text/html, Size: 3611 bytes --]

  reply	other threads:[~2011-08-05 10:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05  9:53 [Caml-list] " Rémi Dewitte
2011-08-05 10:23 ` Rémi Dewitte [this message]
2011-08-05 18:54   ` [Caml-list] " ygrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+Whxom1uAFqGBAVpFuyoC+MxN1+oNfTtg=8r3UA0aoCURB79w@mail.gmail.com' \
    --to=remi@gide.net \
    --cc=caml-list@inria.fr \
    --cc=remi.dewitte@gide.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).