From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id D040ABC69 for ; Thu, 8 Feb 2007 11:53:03 +0100 (CET) Received: from smtp1.infomaniak.ch (smtp1.infomaniak.ch [84.16.68.89]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l18Ar3SC007557 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 Feb 2007 11:53:03 +0100 Received: from webmail.infomaniak.ch (mta-web6.infomaniak.ch [84.16.68.39]) by smtp1.infomaniak.ch (8.13.6/8.13.6) with ESMTP id l18Ar2eo022464; Thu, 8 Feb 2007 11:53:02 +0100 Date: Thu, 08 Feb 2007 11:53:02 +0100 From: "Bruce O'Neel" To: caml-list@inria.fr, Anil Madhavapeddy Subject: Ocaml and OpenBSD's port system Message-ID: <1170931982-adbcea581cc1da11920658d8c44695a9@pckswarms.ch> X-Mailer: Infomaniak Webmail X-Origin-IP: 89.217.9.235 MIME-Version: 1.0 X-Priority: 3 (Normal) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Antivirus: Dr.Web (R) for Mail Servers on smtp1 host X-Antivirus-Code: 100000 X-Miltered: at discorde with ID 45CB010F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 sockets:01 ocaml-:01 usr:01 lib:01 stublibs:01 usr:01 lib:01 stublibs:01 powerpc:01 ocaml-:01 cheers:01 tar:01 cma:01 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