bugGNU Octave - Bugs: bug #54091, Octave not compiling successfully...

 
 

bug #54091: Octave not compiling successfully because of missing <iostream> declarations

Submitter:  Dan Sebald <sebald>
Submitted:  Sun 10 Jun 2018 12:44:48 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 11 Jun 2018 02:11:19 PM UTC, comment #9: 

I had the same problem (just back from vacation and trying to compile), and this was also with gcc 5.4.0.  The patch pushed this morning works for me.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 11 Jun 2018 01:45:25 PM UTC, comment #8: 

Dan: Thanks, I pushed your changeset.

I'm not exactly sure why, but I have no problem with GCC 6 or later.

It seems odd to include istream only, especially when I think iosfwd should be sufficient here, but it works, and seems better than including iostream in other source files.

John W. Eaton <jwe>
Group administrator
Mon 11 Jun 2018 12:25:57 PM UTC, comment #7: 

Same here with gcc version 4.8.5 (SUSE Linux).

Guillaume <gyom>
Sun 10 Jun 2018 05:02:30 PM UTC, comment #6: 

I also see these errors on Ubuntu 14.04 with GCC 4.8.2. First appeared on Friday.

Mike Miller <mtmiller>
Group Member
Sun 10 Jun 2018 04:01:12 PM UTC, comment #5: 

5.4.0


@linux ~ $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)


Dan Sebald <sebald>
Sun 10 Jun 2018 02:45:23 PM UTC, comment #4: 

What version of GCC are you using?

John W. Eaton <jwe>
Group administrator
Sun 10 Jun 2018 01:07:08 AM UTC, comment #3: 

Oh, I used "export tip" instead of "hg export tip" so the file was 0 bytes.  Should get it right this time...

(file #44341)

Dan Sebald <sebald>
Sun 10 Jun 2018 01:04:59 AM UTC, comment #2: 

Strange.  I'm almost certain I attached the file in the previous post.  Maybe I hit Preview first without thinking.  Trying again...

Dan Sebald <sebald>
Sun 10 Jun 2018 01:02:55 AM UTC, comment #1: 

The basic_iostream is declared via <istream> or <iostream>:

http://www.cplusplus.com/reference/istream/basic_iostream/?kw=basic_iostream

If you are allowing <istream>, then the attached works for me.

Dan Sebald <sebald>
Sun 10 Jun 2018 12:44:48 AM UTC, original submission:  

I'm seeing a whole host of errors when compiling:


  CXX      libinterp/corefcn/libinterp_corefcn_libcorefcn_la-oct-procbuf.lo
In file included from /home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:31:0:
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:68:53: error: ‘std::ios<char, std::char_traits<char> >::seekdir’ has not been declared
   std::streampos seekoff (std::streamoff, std::ios::seekdir,
                                                     ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:69:37: error: ‘std::ios<char, std::char_traits<char> >::openmode’ has not been declared
                           std::ios::openmode = std::ios::in | std::ios::out);
                                     ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:72:37: error: ‘std::ios<char, std::char_traits<char> >::openmode’ has not been declared
                           std::ios::openmode = std::ios::in | std::ios::out);
                                     ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:69:48: error: incomplete type ‘std::ios {aka std::basic_ios<char>}’ used in nested name specifier
                           std::ios::openmode = std::ios::in | std::ios::out);
                                                ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:69:63: error: incomplete type ‘std::ios {aka std::basic_ios<char>}’ used in nested name specifier
                           std::ios::openmode = std::ios::in | std::ios::out);
                                                               ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:72:48: error: incomplete type ‘std::ios {aka std::basic_ios<char>}’ used in nested name specifier
                           std::ios::openmode = std::ios::in | std::ios::out);
                                                ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:72:63: error: incomplete type ‘std::ios {aka std::basic_ios<char>}’ used in nested name specifier
                           std::ios::openmode = std::ios::in | std::ios::out);
                                                               ^
In file included from /home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:31:0:
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:184:53: error: ‘std::ios<char, std::char_traits<char> >::seekdir’ has not been declared
   std::streampos seekoff (std::streamoff, std::ios::seekdir,
                                                     ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:185:37: error: ‘std::ios<char, std::char_traits<char> >::openmode’ has not been declared
                           std::ios::openmode = std::ios::in | std::ios::out);
                                     ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:188:37: error: ‘std::ios<char, std::char_traits<char> >::openmode’ has not been declared
                           std::ios::openmode = std::ios::in | std::ios::out);
                                     ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:185:48: error: incomplete type ‘std::ios {aka std::basic_ios<char>}’ used in nested name specifier
                           std::ios::openmode = std::ios::in | std::ios::out);
                                                ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:185:63: error: incomplete type ‘std::ios {aka std::basic_ios<char>}’ used in nested name specifier
                           std::ios::openmode = std::ios::in | std::ios::out);
                                                               ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:188:48: error: incomplete type ‘std::ios {aka std::basic_ios<char>}’ used in nested name specifier
                           std::ios::openmode = std::ios::in | std::ios::out);
                                                ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:188:63: error: incomplete type ‘std::ios {aka std::basic_ios<char>}’ used in nested name specifier
                           std::ios::openmode = std::ios::in | std::ios::out);
                                                               ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:103:30: error: ‘seekdir_to_whence’ declared as an ‘inline’ variable
 seekdir_to_whence (std::ios::seekdir dir)
                              ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:103:20: error: incomplete type ‘std::ios {aka std::basic_ios<char>}’ used in nested name specifier
 seekdir_to_whence (std::ios::seekdir dir)
                    ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:104:1: error: expected ‘,’ or ‘;’ before ‘{’ token
 {
 ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:113:36: error: ‘std::ios<char, std::char_traits<char> >::seekdir’ has not been declared
                          std::ios::seekdir dir,
                                    ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:114:36: error: ‘std::ios<char, std::char_traits<char> >::openmode’ has not been declared
                          std::ios::openmode)
                                    ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc: In member function ‘std::streampos c_file_ptr_buf::seekoff(std::streamoff, int, int)’:
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:118:63: error: ‘seekdir_to_whence’ cannot be used as a function
       octave_fseeko_wrapper (f, offset, seekdir_to_whence (dir));
                                                               ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc: At global scope:
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:127:59: error: ‘std::ios<char, std::char_traits<char> >::openmode’ has not been declared
 c_file_ptr_buf::seekpos (std::streampos offset, std::ios::openmode)
                                                           ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:248:37: error: ‘std::ios<char, std::char_traits<char> >::seekdir’ has not been declared
                           std::ios::seekdir /* dir */,
                                     ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:249:37: error: ‘std::ios<char, std::char_traits<char> >::openmode’ has not been declared
                           std::ios::openmode)
                                     ^
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.cc:266:66: error: ‘std::ios<char, std::char_traits<char> >::openmode’ has not been declared
 c_zfile_ptr_buf::seekpos (std::streampos /* offset */, std::ios::openmode)
                                                                  ^
Makefile:17755: recipe for target 'libinterp/corefcn/libinterp_corefcn_libcorefcn_la-c-file-ptr-stream.lo' failed
make[2]: *** [libinterp/corefcn/libinterp_corefcn_libcorefcn_la-c-file-ptr-stream.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:31:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h: In instantiation of ‘class c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:45:12:   required from ‘octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::octave_tstdiostream(const string&, FILE_T, int, std::ios_base::openmode, octave::mach_info::float_format, typename BUF_T::close_fcn) [with BUF_T = c_file_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>; FILE_T = _IO_FILE*; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode; typename BUF_T::close_fcn = int (*)(_IO_FILE*)]’
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:113:45:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:105:1: error: invalid use of incomplete type ‘class std::basic_iostream<char>’
 c_file_ptr_stream : public STREAM_T
 ^
In file included from /usr/include/c++/5/iomanip:39:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/usr/include/c++/5/iosfwd:89:11: note: declaration of ‘class std::basic_iostream<char>’
     class basic_iostream;
           ^
In file included from /home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:31:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h: In instantiation of ‘class c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:45:12:   required from ‘octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::octave_tstdiostream(const string&, FILE_T, int, std::ios_base::openmode, octave::mach_info::float_format, typename BUF_T::close_fcn) [with BUF_T = c_zfile_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>; FILE_T = gzFile_s*; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode; typename BUF_T::close_fcn = int (*)(gzFile_s*)]’
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:151:29:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:105:1: error: invalid use of incomplete type ‘class std::basic_iostream<char>’
 c_file_ptr_stream : public STREAM_T
 ^
In file included from /usr/include/c++/5/iomanip:39:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/usr/include/c++/5/iosfwd:89:11: note: declaration of ‘class std::basic_iostream<char>’
     class basic_iostream;
           ^
In file included from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘bool octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::eof() const [with BUF_T = c_file_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>; FILE_T = _IO_FILE*]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:65:36: error: ‘class c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>’ has no member named ‘eof’
   bool eof (void) const { return s ? s->eof () : true; }
                                    ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘std::istream* octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::input_stream() [with BUF_T = c_file_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>; FILE_T = _IO_FILE*; std::istream = std::basic_istream<char>]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:71:73: error: cannot convert ‘c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>*’ to ‘std::istream* {aka std::basic_istream<char>*}’ in return
   std::istream * input_stream (void) { return (md & std::ios::in) ? s : nullptr; }
                                                                         ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘std::ostream* octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::output_stream() [with BUF_T = c_file_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>; FILE_T = _IO_FILE*; std::ostream = std::basic_ostream<char>]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:73:75: error: cannot convert ‘c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>*’ to ‘std::ostream* {aka std::basic_ostream<char>*}’ in return
   std::ostream * output_stream (void) { return (md & std::ios::out) ? s : nullptr; }
                                                                           ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘bool octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::eof() const [with BUF_T = c_zfile_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>; FILE_T = gzFile_s*]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:65:36: error: ‘class c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>’ has no member named ‘eof’
   bool eof (void) const { return s ? s->eof () : true; }
                                    ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘std::istream* octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::input_stream() [with BUF_T = c_zfile_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>; FILE_T = gzFile_s*; std::istream = std::basic_istream<char>]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:71:73: error: cannot convert ‘c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>*’ to ‘std::istream* {aka std::basic_istream<char>*}’ in return
   std::istream * input_stream (void) { return (md & std::ios::in) ? s : nullptr; }
                                                                         ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘std::ostream* octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::output_stream() [with BUF_T = c_zfile_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>; FILE_T = gzFile_s*; std::ostream = std::basic_ostream<char>]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:73:75: error: cannot convert ‘c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>*’ to ‘std::ostream* {aka std::basic_ostream<char>*}’ in return
   std::ostream * output_stream (void) { return (md & std::ios::out) ? s : nullptr; }
                                                                           ^
Makefile:18294: recipe for target 'libinterp/corefcn/libinterp_corefcn_libcorefcn_la-oct-prcstrm.lo' failed
make[2]: *** [libinterp/corefcn/libinterp_corefcn_libcorefcn_la-oct-prcstrm.lo] Error 1
make[2]: Leaving directory '/usr/local/src/octave/octave/build1'
Makefile:26612: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/octave/octave/build1'
Makefile:10217: recipe for target 'all' failed
make: *** [all] Error 2


If I put back in the iostream header file, compilation is fine.  The documentation for seekdir

http://www.cplusplus.com/reference/ios/ios_base/seekdir/?kw=seekdir

suggests we want ios_base which apparently can be gotten via either <ios> or <iostream>.  If I make the following change


diff --git a/libinterp/corefcn/c-file-ptr-stream.h b/libinterp/corefcn/c-file-pt
--- a/libinterp/corefcn/c-file-ptr-stream.h
+++ b/libinterp/corefcn/c-file-ptr-stream.h
@@ -27,6 +27,7 @@ along with Octave; see the file COPYING.

 #include <cstdio>

+#include <ios>
 #include <iosfwd>
 #include <streambuf>


it eliminates the majority of the errors.  The following errors remain:


  CXX      libinterp/corefcn/libinterp_corefcn_libcorefcn_la-oct-stream.lo
In file included from /home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:31:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h: In instantiation of ‘class c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:45:12:   required from ‘octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::octave_tstdiostream(const string&, FILE_T, int, std::ios_base::openmode, octave::mach_info::float_format, typename BUF_T::close_fcn) [with BUF_T = c_file_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>; FILE_T = _IO_FILE*; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode; typename BUF_T::close_fcn = int (*)(_IO_FILE*)]’
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:113:45:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:106:1: error: invalid use of incomplete type ‘class std::basic_iostream<char>’
 c_file_ptr_stream : public STREAM_T
 ^
In file included from /usr/include/c++/5/iomanip:39:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/usr/include/c++/5/iosfwd:89:11: note: declaration of ‘class std::basic_iostream<char>’
     class basic_iostream;
           ^
In file included from /home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:31:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h: In instantiation of ‘class c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:45:12:   required from ‘octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::octave_tstdiostream(const string&, FILE_T, int, std::ios_base::openmode, octave::mach_info::float_format, typename BUF_T::close_fcn) [with BUF_T = c_zfile_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>; FILE_T = gzFile_s*; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode; typename BUF_T::close_fcn = int (*)(gzFile_s*)]’
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:151:29:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/c-file-ptr-stream.h:106:1: error: invalid use of incomplete type ‘class std::basic_iostream<char>’
 c_file_ptr_stream : public STREAM_T
 ^
In file included from /usr/include/c++/5/iomanip:39:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/usr/include/c++/5/iosfwd:89:11: note: declaration of ‘class std::basic_iostream<char>’
     class basic_iostream;
           ^
In file included from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.h:28:0,
                 from /home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:29:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘bool octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::eof() const [with BUF_T = c_file_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>; FILE_T = _IO_FILE*]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:65:36: error: ‘class c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>’ has no member named ‘eof’
   bool eof (void) const { return s ? s->eof () : true; }
                                    ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘std::istream* octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::input_stream() [with BUF_T = c_file_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>; FILE_T = _IO_FILE*; std::istream = std::basic_istream<char>]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:71:73: error: cannot convert ‘c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>*’ to ‘std::istream* {aka std::basic_istream<char>*}’ in return
   std::istream * input_stream (void) { return (md & std::ios::in) ? s : nullptr; }
                                                                         ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘std::ostream* octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::output_stream() [with BUF_T = c_file_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>; FILE_T = _IO_FILE*; std::ostream = std::basic_ostream<char>]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:73:75: error: cannot convert ‘c_file_ptr_stream<std::basic_iostream<char>, _IO_FILE*, c_file_ptr_buf>*’ to ‘std::ostream* {aka std::basic_ostream<char>*}’ in return
   std::ostream * output_stream (void) { return (md & std::ios::out) ? s : nullptr; }
                                                                           ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘bool octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::eof() const [with BUF_T = c_zfile_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>; FILE_T = gzFile_s*]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:65:36: error: ‘class c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>’ has no member named ‘eof’
   bool eof (void) const { return s ? s->eof () : true; }
                                    ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘std::istream* octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::input_stream() [with BUF_T = c_zfile_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>; FILE_T = gzFile_s*; std::istream = std::basic_istream<char>]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:71:73: error: cannot convert ‘c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>*’ to ‘std::istream* {aka std::basic_istream<char>*}’ in return
   std::istream * input_stream (void) { return (md & std::ios::in) ? s : nullptr; }
                                                                         ^
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h: In instantiation of ‘std::ostream* octave_tstdiostream<BUF_T, STREAM_T, FILE_T>::output_stream() [with BUF_T = c_zfile_ptr_buf; STREAM_T = c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>; FILE_T = gzFile_s*; std::ostream = std::basic_ostream<char>]’:
/home/prog/octave/octave/octave/libinterp/corefcn/oct-prcstrm.cc:68:1:   required from here
/home/prog/octave/octave/octave/libinterp/corefcn/oct-stdstrm.h:73:75: error: cannot convert ‘c_file_ptr_stream<std::basic_iostream<char>, gzFile_s*, c_zfile_ptr_buf>*’ to ‘std::ostream* {aka std::basic_ostream<char>*}’ in return
   std::ostream * output_stream (void) { return (md & std::ios::out) ? s : nullptr; }
                                                                           ^
Makefile:18294: recipe for target 'libinterp/corefcn/libinterp_corefcn_libcorefcn_la-oct-prcstrm.lo' failed
make[2]: *** [libinterp/corefcn/libinterp_corefcn_libcorefcn_la-oct-prcstrm.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/usr/local/src/octave/octave/build1'
Makefile:26612: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/octave/octave/build1'
Makefile:10217: recipe for target 'all' failed
make: *** [all] Error 2


Would you like me to pursue this further, or do you (JWE) have changes in mind?  Attach a changeset here and I'll test it on my system.

Dan Sebald <sebald>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by gyom (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by sebald (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-11 rik5 CategoryNone Configuration and Build System
        StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-06-11 jwe StatusNone Ready For Test
    2018-06-10 sebald Attached File- Added octave-iostream_declarations-djs2018jun09.patch, #44341

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code