tags:

views:

59

answers:

1

On a fresh Debian system (Squeeze/Sid) I have installed the following packages using apt-get:

  1. ocaml-batteries-included
  2. libpcre-ocaml-dev
  3. libcamlnet-ssl-ocaml-dev
  4. libldap-ocaml-dev

When compiling code I get errors such as:

ocamlfind: [WARNING] The DLL dllnetaccel_c.so occurs in multiple directories: /usr/lib/ocaml/stublibs
ocamlfind: [WARNING] The DLL dllnetaccel_c.so occurs in multiple directories: /usr/local/lib/ocaml/3.11.2/stublibs
ocamlfind: [WARNING] The DLL dllnetsys.so occurs in multiple directories: /usr/lib/ocaml/stublibs
ocamlfind: [WARNING] The DLL dllnetsys.so occurs in multiple directories: /usr/local/lib/ocaml/3.11.2/stublibs

They are non-identical:

$ diff /usr/lib/ocaml/stublibs/dllnetsys.so /usr/local/lib/ocaml/3.11.2/stublibs/dllnetsys.so
Binary files /usr/lib/ocaml/stublibs/dllnetsys.so and /usr/local/lib/ocaml/3.11.2/stublibs/dllnetsys.so differ 

My code stll compiles, but which of these are the correct ones, and how can I suppress this apparently spurious warning?

Thanks!

+1  A: 

Official debian packages put dll*.so into /usr/lib/ocaml/stublibs. And /usr/local/lib/ocaml/<version>/stublibs is configured as the default install target for ocamlfind so that manually compiled and installed libraries will be immediately available (see /usr/lib/ocaml/ld.conf). So it means that you (or someone else on the machine) compiled and installed ocamlnet manually. Which installation is more "correct" is up to you, but having duplicate ocamlfind package is bad.

Note that debian package is tracked by package system and may be installed as a dependency. If you rebuild (e.g.) ocamlnet with some patches you will need to rebuild every needed reverse dependency against patched version and remove corresponding debian packages.

ygrek
Ah that must be it - I believed that this machine had not had OCaml on it before. I did apt-get remove ocaml*, deleted both directory trees and repeated the apt-get install and everything's happy now. Thanks!
Gaius