help-octave
[Top][All Lists]
Advanced

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

Re: Help in porting a toolbox


From: Mathieu Dubois
Subject: Re: Help in porting a toolbox
Date: Mon, 28 May 2012 12:10:03 +0200 (CEST)

Hello,

Sorry for the delay, the weather was nice this week-end and upgrade to Ubuntu 
12.04 took longuer than expected.

I have installed Octave 3.6.1 (for the moment under 11.04) and the 
som_read_data function works.

I have seen that 12.04 comes with Octave 3.2 
(http://askubuntu.com/questions/124731/when-will-octave-3-6-1-be-available-to-be-installed).
 Just to be sure I will re-run the test this afternoon.

Mathieu

----- Mail original -----
De: "Juan Pablo Carbajal" <address@hidden>
À: "Mathieu Dubois" <address@hidden>
Cc: "Jordi Gutiérrez Hermoso" <address@hidden>, address@hidden
Envoyé: Vendredi 25 Mai 2012 09:15:01
Objet: Re: Help in porting a toolbox

On Fri, May 25, 2012 at 7:56 AM, Mathieu Dubois
<address@hidden> wrote:
>
>
> ----- Mail original -----
> De: "Jordi Gutiérrez Hermoso" <address@hidden>
> À: "Octave-help" <address@hidden>
> Envoyé: Jeudi 24 Mai 2012 23:17:57
> Objet: Re: Help in porting a toolbox
>
> On 24 May 2012 16:35, Mathieu Dubois <address@hidden> wrote:
>
>> ----- Mail original -----
>> De: "Jordi Gutiérrez Hermoso" <address@hidden>
>> À: "Mathieu Dubois" <address@hidden>
>> Cc: address@hidden
>> Envoyé: Jeudi 24 Mai 2012 22:10:09
>> Objet: Re: Help in porting a toolbox
>>
>> On 24 May 2012 15:43, Mathieu Dubois
>> <address@hidden> wrote:
>>
>>> I wanted to port the SOM toolbox (see:
>>> http://www.cis.hut.fi/somtoolbox/) to Octave.
>> [snip]
>>>> I have some problems with code involving (s)scanf. I have read
>>>> that there are a lot of differences between Octave and Matlab in
>>>> this area. The problematic line can be found in som_read_data.m,
>>>> line 225:  [s, c, e, n] = sscanf(li, '%s%[^ \t]'); The goal of the
>>>> line is to read the header of a file which contains the data
>>>> label. The variable li (the line) contains "SepalL SepalW PetalL
>>>> PetalW". Under Matlab, s contains "SepalL" (the first label) and
>>>> the variable n (which causes the error) contains 8. Under Octave,
>>>> s contains the correct value but n is 0.
>>
>>> What Octave version? I just tried this example but got n = 6, not 0.
>>
>> I use Octave 3.2.4 (under Ubuntu 11.10).
>
>>Can you try a newer Octave version?
>
>>   
>>http://www.octave.org/wiki/index.php?title=Octave_for_GNU_Linux:_Binary_Octave_packages_for_GNU_Linux#Unofficial_binaries
>
> I have installed octave 3.6.1 for Ubuntu 11.04 (in fact I'm under 11.04 - I'm 
> in the process of upgrading to 12.04 :) but it fails to run:
> $ octave
> octave: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.15' 
> not found (required by /usr/local/lib/octave/3.6.1/liboctinterp.so.1)
> octave: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.15' 
> not found (required by /usr/local/lib/octave/3.6.1/liboctave.so.1)
> octave: /usr/lib/x86_64-linux-gnu/libgfortran.so.3: version `GFORTRAN_1.4' 
> not found (required by /usr/local/lib/octave/3.6.1/libcruft.so.1)
>
> Any solution?
>
>>>> Is there a way to know you're under octave (something like a
>>>> ISOCTAVE variable)? That would be a simple way to write
>>>> conditionnal code like
>>
>>>> if exists('ISOCTAVE')
>>>>  % Octave specific code
>>>> else
>>>>  % Matlab specific code
>>>> end
>>
>>> If you need to do this, then you have almost surely found an Octave
>>> bug. Please report it:
>>
>>>   http://www.gnu.org/software/octave/bugs.html
>> I don't do that! I was wondering if it would be a way to work aroud the bug.
>
>> No, yes, *please* report bugs if you find them. We can't make Octave
>> better if we don't even know what's wrong with it.
>
> Maybe I have not understood your message. You think it's a bug because we are 
> supposed to have the same behavior as Matlba, right?
> In that case, an if that persists with newer version, I will report it with 
> pleasure.
>
> - Jordi G. H.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave

Hi,

It looks like the problem is that those packages where built long ago
and now you have newer versions of the libraries. Since those aren't
good packages they can't check. I suggest you give it a try compiling
it yourself.
follow the instructions here
http://www.gnu.org/software/octave/doc/interpreter/Installation.html#Installation

If you find any errors, check here some Ubuntu specific explanations.
ther eis no hack involved just calling 'sudo apt-get install', quite
easy.
http://octave.org/wiki/index.php?title=Octave_for_GNU_Linux:_Binary_Octave_packages_for_GNU_Linux#Ubuntu

Cheers,


--
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

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