Menu

#39 pfstools 2.0.3 fails to build with octave 4.0.0

v1.0 (example)
closed-fixed
nobody
None
5
2015-07-14
2015-07-07
No

Fails to build against octave 4.0.0:

[ 64%] Generating pfsclose.oct
cd /builddir/build/BUILD/pfstools-2.0.3/src/octave && /usr/bin/mkoctfile /builddir/build/BUILD/pfstools-2.0.3/src/octave/pfsclose.cpp -I/builddir/build/BUILD/pfstools-2.0.3/src/pfs/ -I/builddir/build/BUILD/pfstools-2.0.3/src/octave/help_files -L/builddir/build/BUILD/pfstools-2.0.3/src/pfs -lpfs
/builddir/build/BUILD/pfstools-2.0.3/src/octave/pfsclose.cpp: In function 'octave_value_list Fpfsclose(const octave_value_list&, int)':
/builddir/build/BUILD/pfstools-2.0.3/src/octave/pfsclose.cpp:56:3: error: 'Octave_map' was not declared in this scope
   Octave_map pfsStream = args(0).map_value();
   ^
/builddir/build/BUILD/pfstools-2.0.3/src/octave/pfsclose.cpp:58:3: error: 'Octave_map' is not a class or namespace
   Octave_map::const_iterator itFH = pfsStream.seek( "FH" );
   ^
/builddir/build/BUILD/pfstools-2.0.3/src/octave/pfsclose.cpp:59:7: error: 'itFH' was not declared in this scope
   if( itFH == pfsStream.end() ||
       ^
/builddir/build/BUILD/pfstools-2.0.3/src/octave/pfsclose.cpp:59:15: error: 'pfsStream' was not declared in this scope
   if( itFH == pfsStream.end() ||
               ^
/builddir/build/BUILD/pfstools-2.0.3/src/octave/pfsclose.cpp:65:29: error: 'pfsStream' was not declared in this scope
   FILE *fh = (FILE*)((long)(pfsStream.contents( itFH )(0).double_value()));
                             ^
/builddir/build/BUILD/pfstools-2.0.3/src/octave/pfsclose.cpp:65:49: error: 'itFH' was not declared in this scope
   FILE *fh = (FILE*)((long)(pfsStream.contents( itFH )(0).double_value()));
                                                 ^
src/octave/CMakeFiles/pfsclose.cpp.dir/build.make:63: recipe for target 'src/octave/pfsclose.oct' failed

Octave_map should be octave_map. Attached patch changes.

Now I get:

/builddir/build/BUILD/pfstools-2.0.3/src/octave/pfsget.cpp:111:47: error: no matching function for call to 'octave_map::assign(const char*, Matrix&)'
           channels.assign( ch->getName(), mat );
                                               ^

So something else needs to be changed as well.

1 Attachments

Discussion

  • Orion Poplawski

    Orion Poplawski - 2015-07-13

    Response from octave list:

    Hi

    I don't know if you know about the doxygen documentation (I didn't when I started working on some cpp functions with Octave). The page for octave_map is here: http://octave.org/doxygen/4.0/d5/da6/classoctave__map.html

    First of all do you want 'channels' to be a struct (then you would want to declare it as octave_scalar_map) or a struct array (in which you need to declare like you did). In any case you cannot pass a 'const char *' as the key (it only accepts std::strings) so you need to construct the string first, e.g. "octave_map::assign(std::string("channels"))".

    Looking at getpwent.cc, getgrent.cc, getrusage.cc, time.cc, signalhandlers.cc in libinterp/corefcn helped me. They all return structs, or struct arrays.

    Piotr

     
  • Rafal Mantiuk

    Rafal Mantiuk - 2015-07-14

    This should be fixed now (in git).

     
  • Rafal Mantiuk

    Rafal Mantiuk - 2015-07-14
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB