Help needed: 'fread' error (Octave 2.1.57): 'unable to find matching native data type for uchar=>char'

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help needed: 'fread' error (Octave 2.1.57): 'unable to find matching native data type for uchar=>char'

Yaman.Aksu
I'm trying to use Octave 2.1.57 on RedHat to run a system of Matlab .m files I had written. Ran into various error messages, was able to go past them without asking for help (such as by using online info sources), but now I'm running into a new error I could use direct help with:

Firstly, I know what I'm using is an old version, but note that the RedHat version I'm using is similarly 4-5 years old also. Also, I was able to go past several errors already, and so, I'd like to just continue to move forward with porting my .m code -- for now I want to postpone the hassle of a potentially necessary version upgrade as much as possible, even though I'm experienced with software/OS installs and such. I'm not sure how I came to have Octave on this RedHat machine, I think it was installed simply as part of my installation of RedHat around 2006.

The error is when 'fread' is invoked:
error: invalid data type specified
error: unable to find matching native type for uchar=>char
error: fread: invalid data type specified
error: evaluating if command near line 187, column 2

The line is:
    [text, foo1] = fread(fid, 'uchar=>char');

Changing the line to
    [text, foo1] = fread(fid, '*char');
gives the same error. (I tried this change just in case, to learn more about the problem.)

I'm aware of the following past thread that discussed a very similar '*char' problem. That thread provided a patch for that problem. But the error I'm getting is different.
   http://octave.1599824.n4.nabble.com/TYPE-is-shorthand-for-TYPE-gt-TYPE-Bug-td1659032.html

I looked online for Release Notes, to see whether  2.1.57 did not yet (surprisingly) include sufficient support for 'char' and 'uchar' for 'fread'. I found this but it wasn't detailed enough:
     http://octave.org/wiki/index.php?title=FAQ#What.27s_new_in_Octave
If there are more detailed Release Notes than this, please point me to them.

What would you recommend for me to try with my existing installation (2.1.57) to port the above problematic 'fread' line to Octave? What exactly is the problem, do you know?? Is there a patch?? If so, could you provide complete installation instructions for the patch? I see that the above thread discussed a .cc file, for example. Will I have to compile code when trying to go past this 'fread' problem? Please note that I'm not yet familiar with the installation structure of Octave - all I know is that my installation folder apparently is /usr/share/octave/2.1.57.

Thank you in advance.
Yaman Aksu, Ph.D.
Pennsylvania, USA
Reply | Threaded
Open this post in threaded view
|

Re: Help needed: 'fread' error (Octave 2.1.57): 'unable to find matching native data type for uchar=>char'

Thomas Weber-3
On Tue, Feb 28, 2012 at 01:47:43PM -0800, Yaman.Aksu wrote:
> What would you recommend for me to try with my existing installation
> (2.1.57) to port the above problematic 'fread' line to Octave? What exactly
> is the problem, do you know??

You will not like the answer, but here it is: upgrade to 3.6.1.

No one will take the time to dive into old source code that is totally
different from the current source code. Add to that the fact that you
are also working with old libraries where again no one has current
experience with.

        Thomas
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave