caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Anil Madhavapeddy <anil@recoil.org>
To: "Bruce O'Neel" <ocaml@pckswarms.ch>
Cc: caml-list@inria.fr, ports@openbsd.org
Subject: Re: Ocaml and OpenBSD's port system
Date: Thu, 8 Feb 2007 11:07:48 +0000	[thread overview]
Message-ID: <20070208110748.GA28307@fork.recoil.org> (raw)
In-Reply-To: <1170931982-adbcea581cc1da11920658d8c44695a9@pckswarms.ch>

[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]

On Thu, Feb 08, 2007 at 11:53:02AM +0100, Bruce O'Neel wrote:
> 
> 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.

Woops, I've had this patch in my outgoing OpenBSD queue for a month
now.  Just re-testing it on sparc64 (which has shared libs but no
native code) to check for regression.  It's attached against
OpenBSD-current and fixes a string termination error in yacc which
Ray Lai found as well.

Incidentally, you can just do 'make clean && make patch' and skip
all the intermediate steps when messing around with the port.  Some
good comes from using make :-)

-- 
Anil Madhavapeddy                                 http://anil.recoil.org
XenSource Inc.                                  http://www.xensource.com

[-- Attachment #2: patch-ocaml-shared-yacc --]
[-- Type: text/plain, Size: 3113 bytes --]

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/ocaml/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- Makefile	26 Dec 2006 22:07:18 -0000	1.37
+++ Makefile	8 Feb 2007 10:57:40 -0000
@@ -6,6 +6,7 @@
 
 BASENAME=	ocaml-3.09
 DISTNAME=	${BASENAME}.3
+PKGNAME=	${DISTNAME}p0
 CATEGORIES=	lang
 MASTER_SITES=	http://caml.inria.fr/distrib/${BASENAME}/
 DOCFILES=	${BASENAME}-refman.html.tar.gz
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/lang/ocaml/patches/patch-configure,v
retrieving revision 1.9
diff -u -r1.9 patch-configure
--- patches/patch-configure	28 May 2006 15:28:54 -0000	1.9
+++ patches/patch-configure	8 Feb 2007 10:57:40 -0000
@@ -1,6 +1,15 @@
 $OpenBSD: patch-configure,v 1.9 2006/05/28 15:28:54 avsm Exp $
---- configure.orig	Thu Mar 30 11:00:19 2006
-+++ configure	Tue May  2 12:02:42 2006
+--- configure.orig	Tue Dec 26 23:30:01 2006
++++ configure	Tue Dec 26 23:29:28 2006
+@@ -483,7 +483,7 @@ mksharedlibrpath=''
+ 
+ if test $withsharedlibs = "yes"; then
+   case "$host" in
+-    *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-gnu*)
++    *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd*|*-*-gnu*)
+       sharedcccompopts="-fPIC"
+       mksharedlib="$bytecc -shared -o"
+       bytecclinkopts="$bytecclinkopts -Wl,-E"
 @@ -566,6 +566,7 @@ case "$host" in
    alpha*-*-freebsd*)            arch=alpha; system=freebsd;;
    alpha*-*-netbsd*)             arch=alpha; system=netbsd;;
Index: patches/patch-yacc_reader_c
===================================================================
RCS file: patches/patch-yacc_reader_c
diff -N patches/patch-yacc_reader_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-yacc_reader_c	8 Feb 2007 10:57:40 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- yacc/reader.c.orig	Fri Dec 29 21:32:48 2006
++++ yacc/reader.c	Fri Dec 29 21:36:44 2006
+@@ -163,6 +163,7 @@ char *substring (char *str, int start, i
+   for (i = 0; i < len; i++){
+     buf[i] = str[start+i];
+   }
++  buf[i] = '\0';
+   return buf;
+ }
+ 
Index: pkg/PFRAG.shared
===================================================================
RCS file: pkg/PFRAG.shared
diff -N pkg/PFRAG.shared
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.shared	8 Feb 2007 10:57:40 -0000
@@ -0,0 +1,11 @@
+@comment $OpenBSD$
+lib/ocaml/stublibs/dllbigarray.so
+lib/ocaml/stublibs/dllgraphics.so
+lib/ocaml/stublibs/dlllabltk.so
+lib/ocaml/stublibs/dllmldbm.so
+lib/ocaml/stublibs/dllnums.so
+lib/ocaml/stublibs/dllstr.so
+lib/ocaml/stublibs/dllthreads.so
+lib/ocaml/stublibs/dlltkanim.so
+lib/ocaml/stublibs/dllunix.so
+lib/ocaml/stublibs/dllvmthreads.so
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/ocaml/pkg/PLIST,v
retrieving revision 1.17
diff -u -r1.17 PLIST
--- pkg/PLIST	26 Dec 2006 22:07:18 -0000	1.17
+++ pkg/PLIST	8 Feb 2007 10:57:40 -0000
@@ -1,4 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.17 2006/12/26 22:07:18 avsm Exp $
+%%SHARED%%
 bin/camlp4
 bin/camlp4o
 bin/camlp4r

      reply	other threads:[~2007-02-08 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08 10:53 Bruce O'Neel
2007-02-08 11:07 ` Anil Madhavapeddy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070208110748.GA28307@fork.recoil.org \
    --to=anil@recoil.org \
    --cc=caml-list@inria.fr \
    --cc=ocaml@pckswarms.ch \
    --cc=ports@openbsd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).