bugGNU Octave - Bugs: bug #30920, Octave unable to find user...

 
 

bug #30920: Octave unable to find user functions after changing directory

Submitter:  None
Submitted:  Tue 31 Aug 2010 03:57:18 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  highegg
Originator Name:  Jacques Beilin Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.2.4
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 15 Sep 2010 06:30:30 PM UTC, comment #8: 

Likewise, using this recipe I can also reproduce the problem using Octave 3.2.4, but not with the development sources, so I think the problem has been fixed.

Sorry, I don't know which changeset it is that fixed the problem.  There have been quite a few changes to load-path.cc...

I'm closing this report since I think the problem is fixed.  If you can reproduce it with a copy of Octave built from the development sources, then reopen the bug report.

John W. Eaton <jwe>
Group administrator
Tue 14 Sep 2010 08:02:18 PM UTC, comment #7: 

I can reproduce this problem with octave-3.2.3 packaged by Ubuntu. However, I cannot reproduce the problem with self-compiled development sources.

Judd Storrs <judd>
Tue 14 Sep 2010 07:57:15 PM UTC, comment #6: 

Yes, it should be `/home/peter/nw/ltfat/pp/isoctave.m` with a slash, it was cut-n-paste error.

Filesystem is ext3, but I can also reproduce this in Ubuntu, Fedora and WinXP.

Simplest steps to reproduce it:

In a shell:

> mkdir pp
> cd pp
> echo "1" > testme.m
> mkdir qq
> octave


octave:2> addpath(pwd)
octave:3> cd qq
octave:4> testme
error: no such file, `/home/peter/pp/qq/testme.m`
error: no such file, `/home/peter/pp/qq/testme.m`

Peter Søndergaard <psoenderg>
Tue 14 Sep 2010 06:39:03 PM UTC, comment #5: 


error: no such file, `home/peter/nw/ltfat/pp/isoctave.m`


Shouldn't this be:


error: no such file, `/home/peter/nw/ltfat/pp/isoctave.m`


Note the initial slash I added before home/... Was that slash missing from octave's output or was this a typo when you entered the message into the bugtracker?

Judd Storrs <judd>
Tue 14 Sep 2010 06:03:11 PM UTC, comment #4: 

What kind of filesystem is/home/peter/nw/ltfat?  extN?  VFAT?  NTFS?

John W. Eaton <jwe>
Group administrator
Tue 14 Sep 2010 01:01:18 PM UTC, comment #3: 

I see something like this on:

- Ubuntu 32 bit, with Octave 3.2.3
- WinXP 32 bit, octave 3.2.4

I don't see it on

- Fedora 64 bit, Octave 3.2.4

In my case:

/home/peter/nw/ltfat

contains the function "isoctave.m", which return 1. "/home/peter/nw/ltfat" is in the path.

If pwd = /home/peter/nw/, which is not in the path, it works.
If pwd = /home/peter/nw/ltfat, it works.
If pwd = /home/peter/nw/ltfat/gabor, which is in the path, it works.

if pwd = /home/peter/nw/ltfat/pp, which is NOT in the path it get the following error messages:

error: no such file, `home/peter/nw/ltfat/pp/isoctave.m`
error: no such file, `home/peter/nw/ltfat/pp/isoctave.m`
error: no such file, `home/peter/nw/ltfat/pp/isoctave.m`
error: no such file, `home/peter/nw/ltfat/pp/isoctave.m`
error: no such file, `home/peter/nw/ltfat/pp/isoctave.m`

which is true: "isoctave" is not in /pp, it is in the parent directory.

I can't see a pattern of when and when not it works, as I get different incorrect behaviour depending on which machine I test, but the error message is always the same, it is looking in the wrong dir.

Peter Søndergaard <psoenderg>
Wed 08 Sep 2010 03:44:51 PM UTC, comment #2: 

I tried to reproduce this by doing this (linux):


# mkdir a
# mkdir b
# echo '"Pop!"' > b/boo.m
# cd a
# octave -qf
> cd ../b
> boo
ans = Pop!


This works for me in the 3.0.5, 3.2.3 from Ubuntu repositories and a self-compiled development version (also works without the -qf).

Judd Storrs <judd>
Wed 01 Sep 2010 07:35:33 AM UTC, comment #1: 

I can't reproduce this. Can anyone else?

Jaroslav Hajek <highegg>
Tue 31 Aug 2010 03:57:18 PM UTC, original submission:  

The problem happens also on linux.

1. using the cd command, I move to my script directory.
2. I try to run the script by typing exercice_alti in the terminal. I get the following message :

error: `exercice_alti' undefined near line 31 column 1

It seems to be ok if I run source ("exercice_alti.m")

I had the problem with this script but also on several other scripts.


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #21360:  exercice_alti.m added by None (964B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by psoenderg (Posted a comment)
  • -email is unavailable- added by judd (Posted a comment)
  • -email is unavailable- added by highegg (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-09-15 jwe StatusWorks For Me Fixed
        Open/ClosedOpen Closed
    2010-09-01 highegg CategoryNone Interpreter
        Item GroupOther Incorrect Result
        StatusNone Works For Me
        Assigned toNone highegg
    2010-08-31 None Attached File- Added exercice_alti.m, #21360

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code