caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: evil sloot <toolslive@yahoo.com>
To: caml-list@inria.fr
Subject: [Caml-list] problems with ocamlbuild in 3.12
Date: Mon, 18 Apr 2011 05:14:08 -0700 (PDT)	[thread overview]
Message-ID: <609126.88288.qm@web120619.mail.ne1.yahoo.com> (raw)

Hi,

I'm upgrading from ocaml 3.11 to 3.12 and I'm facing some problems with my ocamlfind buildscripts. 

In essence, I see the following.

- static linking gives problems when you have multiple libraries with dependencies amongst each other. The gcc linker needs to have them in correct order or it will fail. I have to revert to tricks like this in my ocamlbuild.ml file:

 flag ["ocaml";"link";"is_main"](
      S[A"-linkpkg";
    A"src/otc/libotc.a"; (* depends on libtokyocabinet, so must come before (really) on the linking line *)
        A"-ccopt"; A("-L" ^ tc_home);
        A"-cclib"; A"-ltokyocabinet";
       ]);
to force the order in which the arguments are processed. 
  Is there a more

- building of .cmxa libraries fails in combination with package(...) tags
  for example, I have
  true:package(lwt) in my _tags file

  and the build of my library gives:
  ocamlbuild -use-ocamlfind my_lib.cmxa

  + /usr/bin/ocamlfind ocamlopt -a -linkpkg ...  -package lwt ....
    -o my_lib.cmxa
   File "_none_", line 1, characters 0-1:
   Error: /usr/lib/ocaml/unix.cmxa
   is not a compilation unit description.
   Command exited with code 2.

  the -linkpkg should not be there.... 
  So how do I avoid this?

Since I can't find these things in the documentation, I think I can ask here.

Also, how do I make it so that ocamlbuild always uses ocamlfind so I
don't have to type
ocamlbuild -use-ocamlfind ... 
all the time ? (I could not find it anywhere in the documentation)
  
tia,

Romain

PS

- ocamlbuild & ocamlfind are part of the core but the reference manual
  (http://caml.inria.fr/pub/docs/manual-ocaml/manual022.html) 
  doesn't even mention them. 
- The ocamlbuild manual does not mention the recent developments such as
  package(...), and the new way of handling syntax extensions,
- ocamlbuild wiki mostly has old examples.

- I see that lwt is  moving towards Oasis, should I do this too?


 




             reply	other threads:[~2011-04-18 12:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 12:14 evil sloot [this message]
2011-04-21  7:32 ` xclerc

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=609126.88288.qm@web120619.mail.ne1.yahoo.com \
    --to=toolslive@yahoo.com \
    --cc=caml-list@inria.fr \
    /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).