octave-maintainers
[Top][All Lists]
Advanced

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

Re: [Forge] IO still gives error


From: PhilipNienhuis
Subject: Re: [Forge] IO still gives error
Date: Tue, 7 Jan 2014 06:27:50 -0800 (PST)

Carnë Draug-4 wrote
> On 7 January 2014 13:33, Carnë Draug <

> carandraug@

> > wrote:
>> On 7 January 2014 13:03, Juan Pablo Carbajal <

> ajuanpi+dev@

> > wrote:
>>> Hi,
>>> I am still running into this error in Ubuntu 13.10, GNU Octave 3.8
>>>
>>> octave:1> pkg -forge install io
>>> 'chk_spreadsheet_support' undefined near line 41 column 16
>>> error: called from
>>> '/home/juanpi/.octave/io-2.0.1/x86_64-unknown-linux-gnu-api-v49+/PKG_ADD'
>>> in file
>>> /home/juanpi/.octave/io-2.0.1/x86_64-unknown-linux-gnu-api-v49+/PKG_ADD
>>> near line 41, column 14
>>> error: called from:
>>> error:   /usr/local/share/octave/3.8.0-rc1/m/pkg/private/install.m at
>>> line 241, column 5
>>> error:   /usr/local/share/octave/3.8.0-rc1/m/pkg/pkg.m at line 394,
>>> column 9
>>>
>>> If one install twice then the error disappears, so it seems like a
>>> load path problem or something of the like.
>>>
>>> In the mailing list there were temporal solutions presented, like
>>> erase io before installing and the such... anyone have a better idea?
>>> It seems to be a java class problem.
>>
>> What causes the problem is that the PKG_ADD script of the io package
>> uses functions from the io package. So when you load a package, the
>> following happens@
>>
>> 1 - adds the directory with oct files to the path
>> 2 - finds the PKG_ADD file and runs it
>> 3 - the PKG_ADD calls chk_spreadsheet_support which is not in the path
>> yet
>> 4 - fails
>>
>> When the directory with m files is added first to the path, then there
>> is no problem. However, it seems that sometimes it happens the other
>> way around.
>>
>> Note that the fix for this is not add the directory with m files
>> always first otherwise you'll have the same problem when PKG_ADD calls
>> an oct function from the same package.
>>
>> Carnë
> 
> If you take a look at the post_install function of the io package, it
> has some code that removed the PKG_ADD from the oct file directory as
> a workaround for this. However, for some reason it was commented out
> for the latest release.
> 
> Carnë

I even removed post_install.m completely from io-2.0.1 (just uploaded to
patch tracker). Maybe too early, but before reinstating it I need more info
(see bottom).

FYI: Nitzan added post_install.m to automatically load the spreadsheet I/O
Java class libs (a great idea at that). 
However, rather than moving PKG_ADD to
/share/octave/.../io_version>/packinfo/ it simply removed the PKG_ADD in
lib/octave/.../io-<version>/<arch> so that PKG_ADD was no more called.
After some experimenting in later io package versions I concluded (but I may
be wrong) that the issue of the failing call to chk_preadsheet_support.m
from PKG_ADD was merely a timing issue; i.e., time needed for fully loading
the io package, especially after installation.

On Windows, I didn't encounter problems after adding a little delay (0.25 s)
in PKG_ADD, just before calling chk_spreadsheet_support.m. Apparently that
was sufficient to allow the io package to be fully loaded and have
chk_spreadsheet_support.m available.

On my Linux box I initially got the same error as Juanpi. But then a second
attempt worked OK. So I wonder, maybe that is because on Linux various calls
are more easily forked than on Windows, and consequently there is more
chance for this sort of "race" condition in pkg.m?

Juan, could you please try to increase the delay in PKG_ADD and see if the
problem disappears?

Thanks,

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Forge-IO-still-gives-error-tp4660735p4660741.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]