caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Ocaml and OpenBSD's port system
@ 2007-02-08 10:53 Bruce O'Neel
  2007-02-08 11:07 ` Anil Madhavapeddy
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce O'Neel @ 2007-02-08 10:53 UTC (permalink / raw)
  To: caml-list, Anil Madhavapeddy

Hi,

Ocaml installs very nicely from the OpenBSD ports system, with one small glitch.

ocaml believes that it can't load dynamic librarys in OpenBSD and therefore 
doesn't let you load .cma files.  `This is slightly annoying just because I 
wanted to play around with sockets and this means I can't do it interactivly
at the ocaml prompt.

It turns out this is quite easy to solve.  Ocaml doesn't think it can load 
dynamic librarys on it's own because it hasn't been told so.  Around line 486 of
configure the list of OSes that can do dynamic loading is checked, and 
OpenBDS just has to be added.  I changed my line to:  

case "$host" in
      *-*-linux-gnu|*-*-linux|*-*-openbsd[3-9]*|*-*-gnu*)

but it might be better to say:

case "$host" in
      *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd[3-4]*|*-*-gnu*)

The whole sequence for my installation from ports is more complex than needed
just because I don't understand ports very well yet:

make fetch
make checksum
make depends
make extract
make patch

vi w-ocaml-3.09.2/ocaml-3.09.2/configure 

Change around line 486 from freebsd to openbsd  

if test $withsharedlibs = "yes"; then
  case "$host" in
      *-*-linux-gnu|*-*-linux|*-*-openbsd[3-9]*|*-*-gnu*)


make configure
make build
make fake
make package
make install

ln ./w-ocaml-3.09.2/fake-macppc/usr/local/lib/ocaml/stublibs/dll* /usr/local/lib
/ocaml/stublibs/

Note that the stublibs won't be known by the package system.

tar czvf /usr/ports/packages/powerpc/all/ocaml-3.09.2-stublibs.tgz /usr/local/li
b/ocaml/stublibs/

I tested this on sparc, macppc, and sparc64.  I assume that it works on x86 as well. 

Thanks for ocaml and thanks for a nice OpenBSD port of it!

cheers

bruce


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

end of thread, other threads:[~2007-02-08 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-08 10:53 Ocaml and OpenBSD's port system Bruce O'Neel
2007-02-08 11:07 ` Anil Madhavapeddy

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