Quantcast

octave forge packages with current CVS

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

octave forge packages with current CVS

Bugzilla from barrowes@alum.mit.edu
I just compiled and installed the latest octave cvs, and then tried to install octave forge
packages. However, after I downloaded the octave forge packages and cd'ed into the main
directory and input:

pkg install specfun-1.0.3.tar.gz

I got sent straight to debug, whereupon lasterr told me:

octave:1> pkg install specfun-1.0.3.tar.gz
debug> lasterr
ans = error: load: unable to find file /home/barrowes/.octave_packages
debug>

How does .octave_packages get created? What is its format? Did I skip a step?


octave:2> ver
----------------------------------------------------------------------
GNU Octave Version 2.9.15+
GNU Octave License: GNU General Public License
Operating System: Linux 2.6.22.9-server-1mdv #1 SMP Thu Sep 27 04:28:02 CEST 2007 i686
----------------------------------------------------------------------
octave:3>


bb

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: octave forge packages with current CVS

David Bateman-6
Ben Barrowes wrote:

> I just compiled and installed the latest octave cvs, and then tried to install octave forge
> packages. However, after I downloaded the octave forge packages and cd'ed into the main
> directory and input:
>
> pkg install specfun-1.0.3.tar.gz
>
> I got sent straight to debug, whereupon lasterr told me:
>
> octave:1> pkg install specfun-1.0.3.tar.gz
> debug> lasterr
> ans = error: load: unable to find file /home/barrowes/.octave_packages
> debug>
>
> How does .octave_packages get created? What is its format? Did I skip a step?
>
>
> octave:2> ver
> ----------------------------------------------------------------------
> GNU Octave Version 2.9.15+
> GNU Octave License: GNU General Public License
> Operating System: Linux 2.6.22.9-server-1mdv #1 SMP Thu Sep 27 04:28:02 CEST 2007 i686
> ----------------------------------------------------------------------
> octave:3>
>
>
> bb

Most odd, it should be created if it doesn't exist.. Does it exist? If
so remove it and try again..

D.
_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: octave forge packages with current CVS

Bugzilla from barrowes@alum.mit.edu
On Monday 22 October 2007, David Bateman wrote:

> Ben Barrowes wrote:
> > I just compiled and installed the latest octave cvs, and then tried to install octave forge
> > packages. However, after I downloaded the octave forge packages and cd'ed into the main
> > directory and input:
> >
> > pkg install specfun-1.0.3.tar.gz
> >
> > I got sent straight to debug, whereupon lasterr told me:
> >
> > octave:1> pkg install specfun-1.0.3.tar.gz
> > debug> lasterr
> > ans = error: load: unable to find file /home/barrowes/.octave_packages
> > debug>
> >
> > How does .octave_packages get created? What is its format? Did I skip a step?
> >
> >
> > octave:2> ver
> > ----------------------------------------------------------------------
> > GNU Octave Version 2.9.15+
> > GNU Octave License: GNU General Public License
> > Operating System: Linux 2.6.22.9-server-1mdv #1 SMP Thu Sep 27 04:28:02 CEST 2007 i686
> > ----------------------------------------------------------------------
> > octave:3>
> >
> >
> > bb
>
> Most odd, it should be created if it doesn't exist.. Does it exist? If
> so remove it and try again..
>
> D.
>
>

/home/barrowes/.octave_packages doesn't exist. When I touch it, even though it exists, an
install command gives:

octave:6> pkg install specfun-1.0.3.tar.gz
debug> lasterr
ans = error: load: file `/home/barrowes/.octave_packages' seems to be empty!
debug>

octave:7> which installed_packages
which: `installed_packages' is undefined
octave:8>


bb

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: octave forge packages with current CVS

Ben Barrowes-2
In reply to this post by David Bateman-6
On Monday 22 October 2007, David Bateman wrote:

> Ben Barrowes wrote:
> > I just compiled and installed the latest octave cvs, and then tried to install octave forge
> > packages. However, after I downloaded the octave forge packages and cd'ed into the main
> > directory and input:
> >
> > pkg install specfun-1.0.3.tar.gz
> >
> > I got sent straight to debug, whereupon lasterr told me:
> >
> > octave:1> pkg install specfun-1.0.3.tar.gz
> > debug> lasterr
> > ans = error: load: unable to find file /home/barrowes/.octave_packages
> > debug>
> >
> > How does .octave_packages get created? What is its format? Did I skip a step?
> >
> >
> > octave:2> ver
> > ----------------------------------------------------------------------
> > GNU Octave Version 2.9.15+
> > GNU Octave License: GNU General Public License
> > Operating System: Linux 2.6.22.9-server-1mdv #1 SMP Thu Sep 27 04:28:02 CEST 2007 i686
> > ----------------------------------------------------------------------
> > octave:3>
> >
> >
> > bb
>
> Most odd, it should be created if it doesn't exist.. Does it exist? If
> so remove it and try again..
>
> D.
>
>

I have found out what is going on here. I had set:

debug_on_error(1)

so that in pkg.m, when it gets to:

  try
    local_packages = load (local_list).local_packages;
  catch
    local_packages = {};
  end_try_catch

it was throwing an error at the load line before the catch happened. Thus the error. When I
turned debug_on_error off, the package installs fine.

I tested the behavior in ML. Consider a script, test2.m

clear all
try
 a(2)
catch
 'ccccccccccc'
end
a(3)

In ML, the output is:

>> test2
ans =
ccccccccccc
??? Index exceeds matrix dimensions.
Error in ==> test2 at 7
a(3)
7   a(3)
K>>


So, ML ignores the equivalent of debug_on_error calls ("dbstop if error", BTW) when inside a
try block.


bb





--
--- Ben Barrowes ----------- [hidden email] ---
Cold Regions Research & Engineering Lab    Phone:(603)646-4822
72 Lyme Road, Hanover, NH 03755-1290         FAX:(978)702-0448
--------------------------------------------------------------

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: octave forge packages with current CVS

Bugzilla from barrowes@alum.mit.edu
On Friday 28 December 2007, Ben Barrowes wrote:

> On Monday 22 October 2007, David Bateman wrote:
> > Ben Barrowes wrote:
> > > I just compiled and installed the latest octave cvs, and then tried to install octave forge
> > > packages. However, after I downloaded the octave forge packages and cd'ed into the main
> > > directory and input:
> > >
> > > pkg install specfun-1.0.3.tar.gz
> > >
> > > I got sent straight to debug, whereupon lasterr told me:
> > >
> > > octave:1> pkg install specfun-1.0.3.tar.gz
> > > debug> lasterr
> > > ans = error: load: unable to find file /home/barrowes/.octave_packages
> > > debug>
> > >
> > > How does .octave_packages get created? What is its format? Did I skip a step?
> > >
> > >
> > > octave:2> ver
> > > ----------------------------------------------------------------------
> > > GNU Octave Version 2.9.15+
> > > GNU Octave License: GNU General Public License
> > > Operating System: Linux 2.6.22.9-server-1mdv #1 SMP Thu Sep 27 04:28:02 CEST 2007 i686
> > > ----------------------------------------------------------------------
> > > octave:3>
> > >
> > >
> > > bb
> >
> > Most odd, it should be created if it doesn't exist.. Does it exist? If
> > so remove it and try again..
> >
> > D.
> >
> >
>
> I have found out what is going on here. I had set:
>
> debug_on_error(1)
>
> so that in pkg.m, when it gets to:
>
>   try
>     local_packages = load (local_list).local_packages;
>   catch
>     local_packages = {};
>   end_try_catch
>
> it was throwing an error at the load line before the catch happened. Thus the error. When I
> turned debug_on_error off, the package installs fine.
>
> I tested the behavior in ML. Consider a script, test2.m
>
> clear all
> try
>  a(2)
> catch
>  'ccccccccccc'
> end
> a(3)
>
> In ML, the output is:
>
> >> test2
> ans =
> ccccccccccc
> ??? Index exceeds matrix dimensions.
> Error in ==> test2 at 7
> a(3)
> 7   a(3)
> K>>
>
>
> So, ML ignores the equivalent of debug_on_error calls ("dbstop if error", BTW) when inside a
> try block.
>
>
> bb
>
>
>

Dave,

Would the right thing to do here be do disable debug_on_error within a try block? I'm not
sure how hard that would be to do.

bb

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: octave forge packages with current CVS

John W. Eaton-6
On  7-Jan-2008, Ben Barrowes wrote:

| Would the right thing to do here be do disable debug_on_error within a try block? I'm not
| sure how hard that would be to do.

How about the following patch?  I checked it in on the cvs trunk and
3.0 branch.

I might have noticed this earlier if it had been reported as a bug on
the [hidden email] list.

jwe



src/ChangeLog:

2008-01-07  John W. Eaton  <[hidden email]>

        * src/pt-except.cc (tree_try_catch_command::eval):
        Set Vdebug_on_error and Vdebug_on_warning to false while executing
        try block.

        * error.cc (Vdebug_on_error, Vdebug_on_warning): No longer static.
        * error.h: Provide decls.


Index: src/error.cc
===================================================================
RCS file: /cvs/octave/src/error.cc,v
retrieving revision 1.130
diff -u -u -r1.130 error.cc
--- src/error.cc 28 Dec 2007 20:56:56 -0000 1.130
+++ src/error.cc 7 Jan 2008 19:28:37 -0000
@@ -53,11 +53,11 @@
 // TRUE means that Octave will try to enter the debugger when an error
 // is encountered.  This will also inhibit printing of the normal
 // traceback message (you will only see the top-level error message).
-static bool Vdebug_on_error = false;
+bool Vdebug_on_error = false;
 
 // TRUE means that Octave will try to enter the debugger when a warning
 // is encountered.
-static bool Vdebug_on_warning = false;
+bool Vdebug_on_warning = false;
 
 // TRUE means that Octave will try to display a stack trace when a
 // warning is encountered.
Index: src/error.h
===================================================================
RCS file: /cvs/octave/src/error.h,v
retrieving revision 1.44
diff -u -u -r1.44 error.h
--- src/error.h 12 Oct 2007 21:27:29 -0000 1.44
+++ src/error.h 7 Jan 2008 19:28:37 -0000
@@ -88,6 +88,15 @@
 extern OCTINTERP_API void disable_warning (const std::string& id);
 extern OCTINTERP_API void initialize_default_warning_state (void);
 
+// TRUE means that Octave will try to enter the debugger when an error
+// is encountered.  This will also inhibit printing of the normal
+// traceback message (you will only see the top-level error message).
+extern OCTINTERP_API bool Vdebug_on_error;
+
+// TRUE means that Octave will try to enter the debugger when a warning
+// is encountered.
+extern OCTINTERP_API bool Vdebug_on_warning;
+
 // Current error state.
 extern OCTINTERP_API int error_state;
 
Index: src/pt-except.cc
===================================================================
RCS file: /cvs/octave/src/pt-except.cc,v
retrieving revision 1.27
diff -u -u -r1.27 pt-except.cc
--- src/pt-except.cc 28 Dec 2007 20:56:57 -0000 1.27
+++ src/pt-except.cc 7 Jan 2008 19:28:37 -0000
@@ -96,7 +96,12 @@
   MAYBE_DO_BREAKPOINT;
 
   unwind_protect_int (buffer_error_messages);
+  unwind_protect_bool (Vdebug_on_error);
+  unwind_protect_bool (Vdebug_on_warning);
+
   buffer_error_messages++;
+  Vdebug_on_error = false;
+  Vdebug_on_warning = false;
 
   unwind_protect::add (do_catch_code, catch_code);
 
@@ -118,7 +123,10 @@
       // For clearing the do_catch_code cleanup function.
       unwind_protect::discard ();
 
-      // For restoring buffer_error_messages.
+      // For restoring Vdebug_on_warning, Vdebug_on_error, and
+      // buffer_error_messages.
+      unwind_protect::run ();
+      unwind_protect::run ();
       unwind_protect::run ();
 
       // Also clear the frame marker.

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: octave forge packages with current CVS

Bugzilla from barrowes@alum.mit.edu
On Monday 07 January 2008, John W. Eaton wrote:

> On  7-Jan-2008, Ben Barrowes wrote:
>
> | Would the right thing to do here be do disable debug_on_error within a try block? I'm not
> | sure how hard that would be to do.
>
> How about the following patch?  I checked it in on the cvs trunk and
> 3.0 branch.
>
> I might have noticed this earlier if it had been reported as a bug on
> the [hidden email] list.
>
> jwe
>
>
>

That fixed it. Since I ran into this installing packages, I initially reported it to
[hidden email] and ended up keeping the thread there.

Thanks,
bb

_______________________________________________
Help-octave mailing list
[hidden email]
https://www.cae.wisc.edu/mailman/listinfo/help-octave
Loading...