[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compile error of src/file-io.cc on octave-3.3.52+ by MinGW (GCC-4.5.
From: |
Tatsuro MATSUOKA |
Subject: |
Re: Compile error of src/file-io.cc on octave-3.3.52+ by MinGW (GCC-4.5.0) |
Date: |
Sun, 3 Oct 2010 09:24:18 +0900 (JST) |
Hello
--- "John W. Eaton wrote:
> On 2-Oct-2010, Tatsuro MATSUOKA wrote:
>
> | Hello
> |
> | I have checked the recent development source.
> |
> | changeset id : 11075 4e31d44a9763
> |
> | In compiling the src/file-io.cc, I have met the following error.
> |
> |
> | libtool: compile: g++ -shared-libgcc -DHAVE_CONFIG_H -I.
> -I../../../hg/octave-work/src -I..
> | -I/WinDevTools/include -I/GnuWin32/include -I../libgnu
> -I../../../hg/octave-work/libgnu
> | -I../../../hg/octave-work/libcruft/misc -I../liboctave
> -I../../../hg/octave-work/liboctave -I.
> | -I../../../hg/octave-work/src -I/WinDevTools/include -I/GnuWin32/include -O3
> -fomit-frame-pointer
> | -DHAVE_CONFIG_H -mieee-fp -IC:/Programs/GnuWin32/include
> -I/WinDevTools/include/freetype2
> | -I/WinDevTools/include -IC:/Programs/WinDevTools/include -Wall -W -Wshadow
> -Wold-style-cast
> -Wformat
> | -O3 -fomit-frame-pointer -O3 -fomit-frame-pointer -MT
> liboctinterp_la-file-io.lo -MD -MP -MF
> | .deps/liboctinterp_la-file-io.Tpo -c ../../../hg/octave-work/src/file-io.cc
> -DDLL_EXPORT
> -DPIC -o
> | .libs/liboctinterp_la-file-io.o
> | In file included from ../../../hg/octave-work/src/oct-prcstrm.h:27:0,
> | from ../../../hg/octave-work/src/file-io.cc:71:
> | ../../../hg/octave-work/src/oct-stdstrm.h: In constructor
> | 'octave_stdiostream::octave_stdiostream(const std::string&, FILE*,
> std::ios_base::openmode,
> | oct_mach_info::float_format, int (*)(FILE*))':
> | ../../../hg/octave-work/src/oct-stdstrm.h:111:86: error: expected
> id-expression before '('
> token
> | In file included from ../../../hg/octave-work/src/file-io.cc:77:0:
> | ../../../hg/octave-work/src/variables.h: At global scope:
> | ../../../hg/octave-work/src/variables.h:106:40: warning: use of old-style
> cast
> | ../../../hg/octave-work/src/variables.h:106:65: warning: use of old-style
> cast
> | ../../../hg/octave-work/src/file-io.cc: In function 'octave_stream
> do_stream_open(const
> std::string&,
> | const std::string&, const std::string&, int&)':
> | ../../../hg/octave-work/src/file-io.cc:497:30: error: expected
> id-expression before '(' token
> | make[3]: *** [liboctinterp_la-file-io.lo] Error 1
> |
> |
> |
> | Any suggestions?
>
> Is "fileno" defined as a macro on your system? If so, what is it
> expanding to?
I searched in config.h as a keyword fileno.
It was found in 'checking lex library'
configure:50594: checking lex library
configure:50608: gcc -shared-libgcc -o conftest.exe -O3 -fomit-frame-pointer
-I/WinDevTools/include
-I/GnuWin32/include -L/WinDevTools/lib -L/GnuWin32/lib
-Wl,--allow-multiple-definition
-Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc-v2 conftest.c
-liberty -lm -lpthread
-lgdi32 -lws2_32 -luser32 -lkernel32 -lgdi32 -lws2_32 -luser32 -lkernel32 >&5
C:\DOCUME~1\Tatsu\LOCALS~1\Temp\cc9SxFzl.o:conftest.c:(.text+0x992): undefined
reference to `yywrap'
C:\DOCUME~1\Tatsu\LOCALS~1\Temp\cc9SxFzl.o:conftest.c:(.text+0xeed): undefined
reference to `yywrap'
C:\DOCUME~1\Tatsu\LOCALS~1\Temp\cc9SxFzl.o:conftest.c:(.text+0x193b): undefined
reference to `yywrap'
collect2: ld returned 1 exit status
configure:50608: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU Octave"
| #define PACKAGE_TARNAME "octave"
| #define PACKAGE_VERSION "3.3.52+"
| #define PACKAGE_STRING "GNU Octave 3.3.52+"
<snip>
| /* If b is the current buffer, then yy_init_buffer was _probably_
| * called from yyrestart() or through yy_get_next_buffer.
| * In that case, we don't want to reset the lineno or column.
| */
| if (b != YY_CURRENT_BUFFER){
| b->yy_bs_lineno = 1;
| b->yy_bs_column = 0;
| }
|
| b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
| errno = oerrno;
I have carried out grep at /mingw/include and found
stdio.h(528): #define _fileno(__F) ((__F)->_file)
stdio.h(530): #define fileno(__F) ((__F)->_file)
> Can you please add -save-temps to the compile command above and send
> me the resulting file-io.ii file? You don't need to run configure with
> -save-temps in CXXFLAGS, just cd to the src subdirectory in your build
> tree and cut and paste the g++ command above and add -save-temps to
> it.
Thank you for your reply.
I have uploaded on the web
http://www.geocities.co.jp/tmoctwin/files/oct2010_1003.html
file-io.ii.bz2 (From some reason, I have compressed it by bzip2.).
Regards
Tatsuro
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/