ports/142444: building lang/ruby18 with oniguruma fails.

Tsurutani Naoki turutani at scphys.kyoto-u.ac.jp
Thu Jan 7 23:10:02 UTC 2010


>Number:         142444
>Category:       ports
>Synopsis:       building lang/ruby18 with oniguruma fails.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 07 23:10:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Tsurutani Naoki
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD h120.65.226.10.32118.vlan.kuins.net 7.2-STABLE FreeBSD 7.2-STABLE #20: Thu Sep 10 08:32:10 JST 2009 turutani at h120.65.226.10.32118.vlan.kuins.net:/usr/local/work/usr/obj/usr/src/sys/POLYMER i386


	
>Description:
	building lang/ruby18 with "WITH_ONIGURUMA=1" fails.
	
>How-To-Repeat:
	% cd /usr/ports/lang/ruby18
	% make WITH_ONIGURUMA=1
	...
	--------------------------
	|diff -ruN gc.c gc.c
	|--- gc.c       2008-08-04 07:24:26.000000000 +0400
	|+++ gc.c       2009-02-12 18:40:36.000000000 +0300
	--------------------------
	Patching file gc.c using Plan A...
	Hunk #1 succeeded at 1058 (offset 46 lines).
	Hmm...  The next patch looks like a unified diff to me...
	The text leading up to this was:
	--------------------------
	|diff -ruN re.c re.c
	|--- re.c       2008-06-06 14:39:57.000000000 +0400
	|+++ re.c       2009-02-12 18:43:31.000000000 +0300
	--------------------------
	Patching file re.c using Plan A...
	Hunk #1 succeeded at 485.
	Hunk #2 succeeded at 625.
	Hunk #3 succeeded at 636.
	Hunk #4 succeeded at 681.
	Hunk #5 succeeded at 707 (offset 8 lines).
	Hunk #6 succeeded at 857 (offset 4 lines).
	Hunk #7 succeeded at 936 (offset 8 lines).
	Hunk #8 succeeded at 958 (offset 4 lines).
	Hunk #9 succeeded at 1200 (offset 18 lines).
	Hunk #10 succeeded at 1232 (offset 4 lines).
	Hunk #11 succeeded at 2145 (offset 24 lines).
	Hunk #12 succeeded at 2141 (offset 4 lines).
	Hunk #13 succeeded at 2176 (offset 24 lines).
	Hunk #14 succeeded at 2433 (offset 4 lines).
	Hmm...  The next patch looks like a unified diff to me...
	The text leading up to this was:
	--------------------------
	|diff -ruN re.h re.h
	|--- re.h       2007-02-13 02:01:19.000000000 +0300
	|+++ re.h       2009-02-12 18:40:36.000000000 +0300
	--------------------------
	Patching file re.h using Plan A...
	Hunk #1 failed at 24.
	1 out of 1 hunks failed--saving rejects to re.h.rej
	Hmm...  The next patch looks like a unified diff to me...
	The text leading up to this was:
	--------------------------
	|diff -ruN string.c string.c
	|--- string.c   2008-07-17 16:33:59.000000000 +0400
	|+++ string.c   2009-02-12 18:40:36.000000000 +0300
	--------------------------
	Patching file string.c using Plan A...
	Hunk #1 succeeded at 2039 (offset 14 lines).
	Hunk #2 succeeded at 2164 (offset 14 lines).
	done
	*** Error code 1

	Stop in /usr/ports/devel/oniguruma/work/oniguruma.
	*** Error code 1

	Stop in /usr/ports/lang/ruby18.
	*** Error code 1

	Stop in /usr/ports/lang/ruby18.

	
>Fix:
	ruby187p72-oniguruma.patch cannot be applied to the current
	ruby source.
	here is a patch to devel/oniguruma:

--- Makefile.orig	2009-02-13 06:50:32.000000000 +0900
+++ Makefile	2010-01-08 07:42:22.000000000 +0900
@@ -30,6 +30,7 @@
 post-patch:
 	${CP} ${DISTDIR}/${DIST_SUBDIR}/ruby187p72-oniguruma.patch \
 		${WRKSRC}/ruby187.patch
+	${PATCH} -d ${WRKSRC} < ${FILESDIR}/ruby187p72-oniguruma.patch
 
 post-configure:
 	${SED} -e 's|%%PREFIX%%|${PREFIX}|' \
--- files/ruby187p72-oniguruma.patch.orig	1970-01-01 09:00:00:00.000000000 +0900
+++ files/ruby187p72-oniguruma.patch	2010-01-08 07:43:36.000000000 +0900
@@ -0,0 +1,160 @@
+--- ruby187.patch.orig	2010-01-08 06:57:00.000000000 +0900
++++ ruby187.patch	2010-01-08 07:25:35.000000000 +0900
+@@ -1,7 +1,6 @@
+-diff -ruN gc.c gc.c
+---- gc.c	2008-08-04 07:24:26.000000000 +0400
+-+++ gc.c	2009-02-12 18:40:36.000000000 +0300
+-@@ -1012,6 +1012,7 @@
++--- gc.c.orig	2010-01-08 07:05:31.000000000 +0900
+++++ gc.c	2010-01-08 07:05:34.000000000 +0900
++@@ -1058,6 +1058,7 @@
+  	break;
+  
+        case T_MATCH:
+@@ -9,9 +8,8 @@
+  	if (obj->as.match.str) {
+  	    ptr = obj->as.match.str;
+  	    goto again;
+-diff -ruN re.c re.c
+---- re.c	2008-06-06 14:39:57.000000000 +0400
+-+++ re.c	2009-02-12 18:43:31.000000000 +0300
++--- re.c.orig	2009-03-09 10:02:58.000000000 +0900
+++++ re.c	2010-01-08 07:05:34.000000000 +0900
+ @@ -485,11 +485,13 @@
+  	    goto again;
+  	}
+@@ -74,7 +72,7 @@
+      match->regs = ALLOC(struct re_registers);
+      MEMZERO(match->regs, struct re_registers, 1);
+  
+-@@ -693,6 +699,7 @@
++@@ -701,6 +707,7 @@
+  	rb_raise(rb_eTypeError, "wrong argument class");
+      }
+      RMATCH(obj)->str = RMATCH(orig)->str;
+@@ -82,7 +80,7 @@
+      re_free_registers(RMATCH(obj)->regs);
+      RMATCH(obj)->regs->allocated = 0;
+      re_copy_registers(RMATCH(obj)->regs, RMATCH(orig)->regs);
+-@@ -846,14 +853,14 @@
++@@ -858,14 +865,14 @@
+      }
+  
+      if (need_recompile) {
+@@ -101,7 +99,7 @@
+  	    rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len, err, re);
+  	}
+      }
+-@@ -921,15 +928,16 @@
++@@ -933,15 +940,16 @@
+      if (FL_TEST(re, KCODE_FIXED))
+  	rb_kcode_reset_option();
+  
+@@ -126,7 +124,7 @@
+      }
+  
+      match = rb_backref_get();
+-@@ -946,6 +954,7 @@
++@@ -958,6 +966,7 @@
+      re_copy_registers(RMATCH(match)->regs, &regs);
+      re_free_registers(&regs);
+      RMATCH(match)->str = rb_str_new4(str);
+@@ -134,7 +132,7 @@
+      rb_backref_set(match);
+  
+      OBJ_INFECT(match, re);
+-@@ -1173,6 +1182,23 @@
++@@ -1195,6 +1204,23 @@
+  }
+  
+  
+@@ -158,7 +156,7 @@
+  /*
+   *  call-seq:
+   *     mtch[i]               => obj
+-@@ -1202,10 +1228,37 @@
++@@ -1224,10 +1250,37 @@
+  
+      rb_scan_args(argc, argv, "11", &idx, &rest);
+  
+@@ -199,7 +197,7 @@
+  }
+  
+  static VALUE match_entry _((VALUE, long));
+-@@ -2068,12 +2121,14 @@
++@@ -2096,12 +2149,14 @@
+  }
+  
+  VALUE
+@@ -216,7 +214,7 @@
+      int no;
+  
+      p = s = RSTRING(str)->ptr;
+-@@ -2082,12 +2137,12 @@
++@@ -2110,12 +2165,12 @@
+      while (s < e) {
+  	char *ss = s;
+  
+@@ -233,7 +231,7 @@
+  
+  	if (!val) {
+  	    val = rb_str_buf_new(ss-p);
+-@@ -2097,13 +2152,38 @@
++@@ -2125,13 +2180,38 @@
+  	    rb_str_buf_cat(val, p, ss-p);
+  	}
+  
+@@ -276,7 +274,7 @@
+  	  case '&':
+  	    no = 0;
+  	    break;
+-@@ -2349,6 +2429,7 @@
++@@ -2377,6 +2457,7 @@
+      rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(RE_OPTION_IGNORECASE));
+      rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(RE_OPTION_EXTENDED));
+      rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(RE_OPTION_MULTILINE));
+@@ -284,10 +282,9 @@
+  
+      rb_global_variable(&reg_cache);
+  
+-diff -ruN re.h re.h
+---- re.h	2007-02-13 02:01:19.000000000 +0300
+-+++ re.h	2009-02-12 18:40:36.000000000 +0300
+-@@ -24,13 +24,14 @@
++--- re.h.orig	2009-08-04 11:04:58.000000000 +0900
+++++ re.h	2010-01-08 07:23:09.000000000 +0900
++@@ -24,6 +24,7 @@
+      struct RBasic basic;
+      VALUE str;
+      struct re_registers *regs;
+@@ -295,6 +292,7 @@
+  };
+  
+  #define RMATCH(obj)  (R_CAST(RMatch)(obj))
++@@ -31,7 +32,7 @@
+  
+  VALUE rb_reg_regcomp _((VALUE));
+  long rb_reg_search _((VALUE, VALUE, long, long));
+@@ -303,10 +301,9 @@
+  long rb_reg_adjust_startpos _((VALUE, VALUE, long, long));
+  void rb_match_busy _((VALUE));
+  VALUE rb_reg_quote _((VALUE));
+-diff -ruN string.c string.c
+---- string.c	2008-07-17 16:33:59.000000000 +0400
+-+++ string.c	2009-02-12 18:40:36.000000000 +0300
+-@@ -2025,7 +2025,7 @@
++--- string.c.orig	2009-12-14 00:59:51.000000000 +0900
+++++ string.c	2010-01-08 07:05:34.000000000 +0900
++@@ -2039,7 +2039,7 @@
+  	    rb_backref_set(match);
+  	}
+  	else {
+@@ -315,7 +312,7 @@
+  	}
+  	rb_str_modify(str);
+  	if (OBJ_TAINTED(repl)) tainted = 1;
+-@@ -2150,7 +2150,7 @@
++@@ -2164,7 +2164,7 @@
+  	    rb_backref_set(match);
+  	}
+  	else {
	


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list