[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't Install Or Load Packages
From: |
David Bateman |
Subject: |
Re: Can't Install Or Load Packages |
Date: |
Tue, 04 Mar 2008 17:29:57 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070914) |
A. Kalten wrote:
> On Tue, 04 Mar 2008 11:08:07 +0100
> David Bateman <address@hidden> wrote:
>
>> What OS and version of Octave? Also what does
>> pkg("global_list")
>> return?
>>
>
> The OS is Linux (x86_64-unknown-linux-gnu) and the version
> of octave is 3.0.0 compiled with gcc-4.3.2. As I mentioned,
> this problem was not present with previous versions.
>
> pkg("global_list"):
>
> /opt/octave/share/octave/octave_packages
On a fresh installed Octave 3.0.0 I see the following when run as root
octave:1> pkg install signal-1.0.6.tar.gz
warning: creating installation directory
/opt/octave-3.0/share/octave/packages
octave:3> pkg("global_list")
/opt/octave-3.0/share/octave/octave_packages
octave:4> ls -l /opt/octave-3.0/share/octave/octave_packages
-rw-r--r-- 1 root root 2408 2008-03-04 17:16
/opt/octave-3.0/share/octave/octave_packages
octave:5> ver
----------------------------------------------------------------------
GNU Octave Version 3.0.0
GNU Octave License: GNU General Public License
Operating System: Linux 2.6.22.18-desktop-1mdv #1 SMP Mon Feb 11
12:42:52 EST 2008 x86_64
----------------------------------------------------------------------
I therefore can not generate this issue and so have no chance of
debugging it. I'm equally running on an x86_64 and am using g++ 4.2.2 to
compile though this should not be an issue.
However, reading src/load-save.cc to find the source of the error
message you'll see
static void
do_save (std::ostream& os, const octave_value& tc,
const std::string& name, const std::string& help,
bool global, load_save_format fmt, bool save_as_floats)
{
switch (fmt)
{
case LS_ASCII:
save_ascii_data (os, tc, name, global, 0);
break;
case LS_BINARY:
save_binary_data (os, tc, name, help, global, save_as_floats);
break;
case LS_MAT_ASCII:
case LS_MAT_ASCII_LONG:
if (! save_mat_ascii_data (os, tc, fmt == LS_MAT_ASCII ? 8 : 16))
warning ("save: unable to save %s in ASCII format", name.c_str ());
break;
case LS_MAT_BINARY:
save_mat_binary_data (os, tc, name);
break;
#ifdef HAVE_HDF5
case LS_HDF5:
save_hdf5_data (os, tc, name, help, global, save_as_floats);
break;
#endif /* HAVE_HDF5 */
case LS_MAT5_BINARY:
save_mat5_binary_element (os, tc, name, global, false,
save_as_floats);
break;
case LS_MAT7_BINARY:
save_mat5_binary_element (os, tc, name, global, true, save_as_floats);
break;
default:
gripe_unrecognized_data_fmt ("save");
break;
}
}
So the error can only occur for MATLAB ascii file format.. The MATLAB
ascii file format allow only a single matrix argument to be saved and so
it is not an appropriate format to use for the complex structure that
contains the package manager information.
What does
default_save_options
return? I suspect it returns "-ascii" which is the default option for
matlab file formats. This was changed for compatibility with Matlab's
-ascii option a while back, and a warning message about the future
incompatibility has been issued for at least two years. Please change
your default_save_option to '-text' instead for the Octave ascii format.
> However, what is more interesting is that although I cannot load
> the package using "pkg load pkg-name" it *can* be loaded using
> "pkg load all".
This shouldn't work as far as I can see as the "all" option just load
all of the packages that it finds written to the global_list file..
D.