[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ocaml-dns



Hi,

On Sun, Mar 17, 2013 at 4:05 PM, Anastasia Gornostaeva <ermine@xxxxxxxx> wrote:
On Sun, Mar 17, 2013 at 10:39:51AM -0500, Anil Madhavapeddy wrote:

It is difficult to use opam still.
I would to switch to opam when it compile and install pgocaml and eliom at least.

FYI opam is designed to work in parallel with other package managers. Personally I use Debian binary packages for some tasks and use opam for others, all on the same box.

Cheers,
Dave

So I've compiled ocaml-dns not using opam and as you've seen it failed
because:
1) ocaml setupm.ml -configure does not check all dependences
2) it checks if opam is installed on the machine but does not check if
was compiled via opam. It is really mystery :-)


> On 17 Mar 2013, at 09:52, Anastasia Gornostaeva <ermine@xxxxxxxx> wrote:
>
> > On Sat, Mar 16, 2013 at 04:37:43PM -0500, Anil Madhavapeddy wrote:
> >
> >> implement that in pure OCaml.
> >>
> >> Let us know if you run into any problems (the library's still beta, so
> >> we can break interfaces if needed before a 1.0 release).
> >
> >
> > ocamlfind: Package `ocplib-endian' not found - required by `cstruct'
> > ocamlfind: Package `optcomp' not found - required by `ocplib-endian'
> > Error: Unbound module Re_str
>
> ocplib-endian is a library which implements integer marshalling/unmarshal
> support into Bigarray.  OCaml-4.01.0 and higher support compiler primitives
> which eliminate a lot of intermediate boxing, and hence perform better.
>
> optcomp provides #if preprocessor support to detect the right compiler
> version, and fall back to the slower manual functions on older compilers.
>
> cstruct provides the syntax extension that's analogous to Bitstring,
> except that it works directly on Bigarray and avoids copies.  Performance
> is higher as a result (note that Cstruct doesn't currently do much of
> the static analysis that Bitstring does, so it can get even better with
> some more effort).
>
> > $ ... install (outside of opam)
> > W: Cannot find source header for module Zone_lexer in library dns
> > W: Cannot find source header for module Zone_parser in library dns
> > ocamlfind: Package dns is already installed
> > - (file /home/ermine/.opam/system/lib/dns/META already exists)
>
> Presumably this is because you've already installed a DNS package?
> OCamlfind doesn't let you keep multiple installations with the same name,
> so remove the old one first.
>
> > So many strange dependences!
>
> They're only strange until you know what they're for :-)  OPAM takes care
> of all this for you, so it's not really an issue any more.  We've been
> working on improving *BSD compatibility there, btw, so it should be better
> than it used to be.
>
> However, it looks from your example above that you already used OPAM to
> install it, so it's a bit of a mystery to me why you didn't have the
> dependencies installed:
>
> depends: ["lwt" {>="2.4.1"} "cstruct" {>="0.6.0"} "ocamlfind"
>            "cryptokit" "re" "uri" "cmdliner" ]
>
>
> > Looking at github.com/ygrek/yadns - it requeres only bitstring to parse
> > dns stuff.
>
> Sure... if you don't mind Bitstring copying into OCaml strings, then it's
> more straightforward (we used to use it in ocaml-dns also). The Mirage DNS
> (and the rest of the stack) tries to minimise data copies, as it also has to
> append the UDP/Ethernet headers after it assembles a packet.
>
> Using OCaml strings locks you into a world where you have more heap and GC
> pressure, and then you're stuck at a certain level of performance forever...
>
> -anil




--
Dave Scott

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.