caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] problems with ocamlbuild in 3.12
@ 2011-04-18 12:14 evil sloot
  2011-04-21  7:32 ` xclerc
  0 siblings, 1 reply; 2+ messages in thread
From: evil sloot @ 2011-04-18 12:14 UTC (permalink / raw)
  To: caml-list

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?


 




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-21  7:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 12:14 [Caml-list] problems with ocamlbuild in 3.12 evil sloot
2011-04-21  7:32 ` xclerc

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).