« Return to Thread: release 3.0.2 again

Re: release 3.0.2 again

by Thomas Treichl :: Rate this Message:

Reply to Author | View in Thread

Thomas Treichl schrieb:

> John W. Eaton schrieb:
>> On 20-Aug-2008, Thomas Treichl wrote:
>>
>> | I've got bad news, I'm sorry for that. But the same '--path' option
>> problem | still exists in 3.0.2 as in 3.0.1. Not always, ie. if I
>> start up Octave with the | --no-initial-path option and also add a
>> --path option then it works, in all | other cases --path does not work
>> resp. the path is not added.
>> | I can remember that this problem somewhen was solved (or was it just
>> solved for | the default-branch, I can't remember anymore). Can
>> somebody else please check | this, I don't think this is a Mac-only
>> problem?!
>>
>> Can you please provide a complete and precise description (including
>> the exact values of the arguments you are using, etc.) or point to a
>> previous bug report that includes this information?
>
> Yes sure, sorry.
>
> First of all I've to say that I cannot see this problem with 3.0.0 and I
> cannot see it in the current default-branch. It somehow appeared with
> 3.0.1 and I also thought that I somewhen saw it disappear - but I must
> gone wrong somwhow. I thought that my build scripts were broken, but I
> used the same scripts for building 3.0.0 as I have used for building
> 3.0.1 and 3.0.2 and the current default branch...
>
> Now, by example, I startup Octave 3.0.0 with the --path option
>
>   $ ~/bin/Octave.app.3.0.0/Octave.app/Contents/Resources/bin/octave
>   --path ~/tmp/Unfinished/Ieval --quiet
>   octave-3.0.0:1> which ieval
>   ieval is the user-defined function from the file
>   /Users/Thomas/tmp/Unfinished/Ieval/ieval.m
>   octave-3.0.0:2> path
>   Octave's search path contains the following directories:
>   .
>   /Users/Thomas/tmp/Unfinished/Ieval
> /Users/Thomas/bin/Octave.app.3.0.0/Octave.app/Contents/Resources/share/octave/si
>
> te/m
>   <SNIP>
>
> If I do the same with 3.0.1 or 3.0.2 then that path is ignored
>
>   $ ~/bin/Octave.app.3.0.2/Octave.app/Contents/Resources/bin/octave
>   --path ~/tmp/Unfinished/Ieval --quiet
>   octave-3.0.2:1> which ieval
>   which: `ieval' is undefined
>   octave-3.0.2:2> path
>   Octave's search path contains the following directories:
>   .
> /Users/Thomas/bin/Octave.app.3.0.2/Octave.app/Contents/Resources/libexec/octave/
>
> site/oct/api-v32/i386-apple-darwin8.9.1
>   <SNIP>
>
> on the other hand, if I also use the --no-initial-path option too, then
> the current path and the path that I passed from command line are there
> (all Octave paths are not there, of course) - this can also be pure luck
>
>   $ ~/bin/Octave.app.3.0.2/Octave.app/Contents/Resources/bin/octave
>   --path ~/tmp/Unfinished/Ieval --quiet --no-initial-path
>   octave-3.0.2:1> which ieval
>   ieval is the user-defined function from the file
>   /Users/Thomas/tmp/Unfinished/Ieval/ieval.m
>   octave-3.0.2:2> path
>   Octave's search path contains the following directories:
>   .
>   /Users/Thomas/tmp/Unfinished/Ieval
>   octave-3.0.2:3>
>
> Because ./run-octave uses the --no-initial-path option I cannot see this
> problem if I run the local ./run-octave script, with this script
> everything works fine.

Hi,

it took me a while (like always ;) but finally I found the origin of that
problem. There has been a change to load-path.cc from Octave version 3.0.0 to
3.0.1 from

   static void
   maybe_add_path_elts (std::string& path, const std::string& dir)
   {
     std::string tpath = genpath (dir);

     if (! tpath.empty ())
       path += dir_path::path_sep_str + tpath;
   }

into

   static void
   maybe_add_path_elts (std::string& path, const std::string& dir)
   {
     std::string tpath = genpath (dir);

     if (! tpath.empty ())
       {
         if (path.empty ())
          path = tpath;
         else
          path += dir_path::path_sep_str + tpath;
       }
   }

With this new function the '--path' option from command line does not work
anymore in 3.0.1 and 3.0.2 on my system. I replaced that new function in the
3.0.1 and 3.0.2 sources with the function from the 3.0.0 sources and recreated
the binaries of Octave.app once again. Both (3.0.1 and 3.0.2) then accepted the
'--path' option correctly.

Maybe this also addresses Vic's problem who found out another strange path
problem at startup (but I'm not sure about this as I don't have any BBedit
available)

   https://www-old.cae.wisc.edu/pipermail/help-octave/2008-August/010660.html

Could we revert the change of maybe_add_path_elts for the 3.0.3 version and use
the 3.0.0 function once again?

Thanks and regards

   Thomas

 « Return to Thread: release 3.0.2 again