pkgsrc-Users archive

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

Re: sysutils/xentools48 build failure



I hacked my local ocaml in pkgsrc to allow an option in mk.conf

PKG_OPTIONS.ocaml+=default-unsafe-string

to disable safe-strings. I'm sure this isn't ideal, but at least this way if my patch accidentally
gets lost, it will fail with a useful error when it tries to rebuild so I can put it back. 

Harry Waddell

-------

diff --git a/lang/ocaml/options.mk b/lang/ocaml/options.mk
index c3d862d6c9e..3f28c8b514d 100644
--- a/lang/ocaml/options.mk
+++ b/lang/ocaml/options.mk
@@ -1,7 +1,7 @@
 # $NetBSD: options.mk,v 1.1 2017/09/08 09:12:44 jaapb Exp $

 PKG_OPTIONS_VAR=       PKG_OPTIONS.ocaml
-PKG_SUPPORTED_OPTIONS= pic flambda spacetime
+PKG_SUPPORTED_OPTIONS= pic flambda spacetime default-unsafe-string
 PKG_SUGGESTED_OPTIONS= pic

 .include "../../mk/bsd.prefs.mk"
@@ -18,3 +18,7 @@ CONFIGURE_ARGS+=      -flambda
 .if !empty(PKG_OPTIONS:Mspacetime)
 CONFIGURE_ARGS+=       -spacetime
 .endif
+
+.if !empty(PKG_OPTIONS:Mdefault-unsafe-string)
+CONFIGURE_ARGS+=        -default-unsafe-string
+.endif


On Fri, 12 Jan 2018 14:18:33 +0000
Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:

> Adding '-unsafe-string'  the the Makefiles in the ocaml directories
> eventually made the compilation possible. I am sure xentools
> maintainers will have picked this up already and it will be sorted out
> soon enough; there were a handful of files, which appeared to be
> causing the problem.
> 
> Thanks,
> 
> Chavdar Ivanov
> 
> On 12 January 2018 at 10:10, Jaap Boender <jaapb%kerguelen.org@localhost> wrote:
> > On 11/01/2018 17:57, Chavdar Ivanov wrote:  
> >>
> >> Hi,
> >>
> >> Using the latest ocaml-4.06 my build of sysutils/xentools48 (also
> >> updated, together with all other ocaml packages I already had) fails
> >> as follows:  
> >
> >
> > Yup, this happens quite a lot with 4.06. The -safe-string option is now
> > enabled by default, which means that strings are immutable (bytes is then
> > the type for mutable strings) and this kind of thing happens.
> >
> > As a temporary fix, you can use the -unsafe-string compile option with
> > ocamlc (which will make the string and bytes types identical), but of course
> > this should really be fixed upstream.
> >
> > best
> >
> >   Jaap  
> 
> 
> 
> -- 
> ----


Home | Main Index | Thread Index | Old Index