I did some more debugging on this and found that the "glob" and "binary" 
commands fail to load due to the fact that the "package" command is not 
included in the build.

Adding "package" to the "--with-ext" option in configure.ac fixes the problem, 
but possibly the "better" solution is to add the dependency to auto.def.  The 
following patch does that.  I also added the dependency to "rlprompt" and 
"tree", which also require "package"  Both approaches fix the problem.


diff --git a/auto.def b/auto.def
index fc32b68..a692eb7 100644
--- a/auto.def
+++ b/auto.def
@@ -286,17 +286,17 @@ dict set extdb attrs {
 # check=[expr] expression to evaluate to determine if the extension can be used
 # libdep=list of 'define' symbols for dependent libraries
 dict set extdb info {
-    binary   { dep pack }
+    binary   { dep {package pack} }
     exec     { check {([have-feature vfork] && [have-feature waitpid]) || 
[have-feature system]} }
-    glob     { dep readdir }
+    glob     { dep {package readdir} }
     load     { check {[have-feature dlopen-compat] || 
[cc-check-function-in-lib dlopen dl]} libdep lib_dlopen }
     mk       { check {[check-metakit]} libdep lib_mk }
     namespace { dep nshelper }
     posix    { check {[have-feature waitpid]} }
     readdir  { check {[have-feature opendir]} }
     readline { pkg-config readline check {[cc-check-function-in-lib readline 
readline]} libdep lib_readline}
-    rlprompt { dep readline }
-    tree     { dep oo }
+    rlprompt { dep {package readline} }
+    tree     { dep {package oo} }
     sdl      { pkg-config SDL_gfx check {[cc-check-function-in-lib 
SDL_SetVideoMode SDL] && [cc-check-function-in-lib rectangleRGBA SDL_gfx]}
                libdep {lib_SDL_SetVideoMode lib_rectangleRGBA}
              }
@@ -304,7 +304,7 @@ dict set extdb info {
     sqlite3  { pkg-config sqlite3 check {[cc-check-function-in-lib 
sqlite3_prepare_v2 sqlite3]} libdep lib_sqlite3_prepare_v2 }
     zlib     { pkg-config zlib check {[cc-check-function-in-lib deflate z]} 
libdep lib_deflate }
     syslog   { check {[have-feature syslog]} }
-    tree     { dep oo }
+    tree     { dep {package oo} }
     win32    { check {[have-feature windows]} }
 }

--
 
> -----Original Message-----
> From: Frazier, Mitch [AUTOSOL/FLMC/US]
> Sent: Tuesday, March 07, 2017 8:32 AM
> To: Frazier, Mitch [AUTOSOL/FLMC/US]; 'Paul Fertser'
> Cc: '[email protected]'
> Subject: RE: [OpenOCD-devel] missing tcl commands in 0.10.0
> 
> Looks like I jumped the gun: this does not entirely fix my problem.
> The "file" command is now present:
> 
>       > info commands file
>       file
> 
> but the "glob" and "binary" commands are still missing:
> 
>       > info commands glob
>       # no output
>       > info commands binary
>       # no output
> 
> Note that both these extensions are pure tcl extensions.
> 
> 
> This is the relevant part from my modified configure.ac:
> 
> AS_IF([test "x$use_internal_jimtcl" = "xyes"], [
>   AS_IF([test -f "$srcdir/jimtcl/configure.ac"], [
>     AX_CONFIG_SUBDIR_OPTION([jimtcl], [--disable-install-jim --with-
> ext="eventloop array clock regexp stdlib tclcompat aio binary exec file
> glob" --without-ext="default"])
>   ], [
>     AC_MSG_ERROR([jimtcl not found, run git submodule init and git
> submodule update.])
>   ])
> ])
> 
> I reran bootstrap after modifying the file.
> 
> The jimtcl build directory does appear to have built and called the
> initialization code for both extensions, but neither seems to be
> present.
> 
> 
> 
> > -----Original Message-----
> > From: Frazier, Mitch [AUTOSOL/FLMC/US]
> > Sent: Monday, February 27, 2017 9:15 AM
> > To: 'Paul Fertser'
> > Cc: [email protected]
> > Subject: RE: [OpenOCD-devel] missing tcl commands in 0.10.0
> >
> > I built a new openocd exe with the changes from your patch, and that
> > does indeed fix the problem for me.
> >
> > > -----Original Message-----
> > > From: Paul Fertser [mailto:[email protected]]
> > > Sent: Saturday, February 18, 2017 3:50 AM
> > > To: Frazier, Mitch [AUTOSOL/FLMC/US]
> > > Cc: [email protected]
> > > Subject: Re: [OpenOCD-devel] missing tcl commands in 0.10.0
> > >
> > > On Wed, Feb 15, 2017 at 08:07:00PM +0000, [email protected]
> > > wrote:
> > > > Looking a bit closer, it appears there are a number of missing
> > > > commands which will probably cause problems in my existing
> scripts.
> > >
> > > Please see if http://openocd.zylin.com/4001 covers your usecases.
> > >
> > > --
> > > Be free, use free (http://www.gnu.org/philosophy/free-sw.html)
> > > software!
> > > mailto:[email protected]


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to