pkgsrc-Users archive

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

Re: NetBSD 11 bulk build state: please help!



On Sat, Sep 19, 2026 at 06:31:59PM +0200, Thomas Klausner wrote:
> Hi!
> 
> I've tried fixing the NetBSD 11.0/x86_64 bulk build breakages, but
> I'll stop now.
> 
> If you want to work on this, here's an overview of the remaining
> breakage as of the last-but-one bulk build (because the newest one has
> ruby33 breakage that I think is already fixed).
> [...]
> - devel/openocd
> 
> broken by jimtcl update, there's already a thread about this; openocd
> hasn't had a release in a long time, and the code in HEAD is quite
> different.

not netbsd-11 specific. The attached patch fixes the build on both
-10 and -11 (x86_64). I've not tried to run it yet.


-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/openocd/distinfo,v
retrieving revision 1.14
diff -u -r1.14 distinfo
--- distinfo	15 Sep 2026 07:51:36 -0000	1.14
+++ distinfo	20 Sep 2026 21:53:19 -0000
@@ -6,6 +6,7 @@
 SHA1 (patch-Makefile.in) = 4035163eb0563254dc4f1bc4a0abac9fbea633e1
 SHA1 (patch-configure) = 6ac5d618048426dfc11fa4502357b0fb80fb6cbb
 SHA1 (patch-src_flash_nor_fm4.c) = b14914ebe08a7c7d9f12c3999c5e6edeae2569e0
+SHA1 (patch-src_helper_command.c) = f68ae39791cb6893b846ee974e1440930a4e9280
 SHA1 (patch-src_helper_configuration.h) = fa3da409b1fdb162aea2cd635df084503b3923d9
 SHA1 (patch-src_helper_jim-nvp.c) = 0e5c7de9feb48dcd47c3d79bbaf41787bb1e799d
-SHA1 (patch-src_openocd.c) = d2b7ebdca9800c15fc27b23e9e8c28665900fa5b
+SHA1 (patch-src_openocd.c) = fd94e7011c1326c0c00630aa1f74eb1b6e8431fe
Index: patches/patch-src_helper_command.c
===================================================================
RCS file: patches/patch-src_helper_command.c
diff -N patches/patch-src_helper_command.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_helper_command.c	20 Sep 2026 21:53:19 -0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_openocd.c,v 1.1 2025/04/06 10:07:06 adam Exp $
+
+Fix build with jimtcl 0.84.
+
+--- src/helper/command.c.orig	2026-09-20 23:24:01.082032876 +0200
++++ src/helper/command.c	2026-09-20 23:26:01.586476179 +0200
+@@ -48,17 +48,18 @@
+ /* set of functions to wrap jimtcl internal data */
+ static inline bool jimcmd_is_proc(Jim_Cmd *cmd)
+ {
+-	return cmd->isproc;
++	return ((cmd->flags & JIM_CMD_ISPROC) != 0);
++
+ }
+ 
+ bool jimcmd_is_oocd_command(Jim_Cmd *cmd)
+ {
+-	return !cmd->isproc && cmd->u.native.cmdProc == jim_command_dispatch;
++	return !jimcmd_is_proc(cmd) && cmd->u.native.cmdProc == jim_command_dispatch;
+ }
+ 
+ void *jimcmd_privdata(Jim_Cmd *cmd)
+ {
+-	return cmd->isproc ? NULL : cmd->u.native.privData;
++	return jimcmd_is_proc(cmd) ? NULL : cmd->u.native.privData;
+ }
+ 
+ static void tcl_output(void *privData, const char *file, unsigned line,
Index: patches/patch-src_openocd.c
===================================================================
RCS file: /cvsroot/pkgsrc/devel/openocd/patches/patch-src_openocd.c,v
retrieving revision 1.1
diff -u -r1.1 patch-src_openocd.c
--- patches/patch-src_openocd.c	6 Apr 2025 10:07:06 -0000	1.1
+++ patches/patch-src_openocd.c	20 Sep 2026 21:53:19 -0000
@@ -1,19 +1,24 @@
 $NetBSD: patch-src_openocd.c,v 1.1 2025/04/06 10:07:06 adam Exp $
 
-Fix build with jimtcl 0.83.
+Fix build with jimtcl 0.84.
 
---- src/openocd.c.orig	2025-04-06 05:49:36.109698542 +0000
-+++ src/openocd.c
-@@ -255,9 +255,9 @@ static int jim_expr_command(Jim_Interp *
+--- src/openocd.c.orig	2022-09-18 15:46:16.000000000 +0200
++++ src/openocd.c	2026-09-20 23:39:56.430639363 +0200
+@@ -255,15 +255,8 @@
  		Jim_Obj *obj = Jim_ConcatObj(interp, argc - 1, argv + 1);
  		Jim_IncrRefCount(obj);
  		const char *s = Jim_String(obj);
 -		struct jim_scriptobj *script = Jim_GetIntRepPtr(interp->currentScriptObj);
 -		if (interp->currentScriptObj == interp->emptyObj ||
 -				strcmp(interp->currentScriptObj->typePtr->name, "script") ||
-+		struct jim_scriptobj *script = Jim_GetIntRepPtr(interp->unused_currentScriptObj);
-+		if (interp->unused_currentScriptObj == interp->emptyObj ||
-+				strcmp(interp->unused_currentScriptObj->typePtr->name, "script") ||
- 				script->subst_flags ||
- 				script->filename_obj == interp->emptyObj)
- 			LOG_WARNING("DEPRECATED! use 'expr { %s }' not 'expr %s'", s, s);
+-				script->subst_flags ||
+-				script->filename_obj == interp->emptyObj)
+-			LOG_WARNING("DEPRECATED! use 'expr { %s }' not 'expr %s'", s, s);
+-		else
+-			LOG_WARNING("DEPRECATED! (%s:%d) use 'expr { %s }' not 'expr %s'",
+-						Jim_String(script->filename_obj), script->linenr, s, s);
++		LOG_WARNING("DEPRECATED! use 'expr { %s }' not 'expr %s'", s, s);
++
+ 		int retcode = Jim_EvalExpression(interp, obj);
+ 		Jim_DecrRefCount(interp, obj);
+ 		return retcode;


Home | Main Index | Thread Index | Old Index