octave-maintainers
[Top][All Lists]
Advanced

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

Re: safer way to use gnulib (MinGW build, quit.cc)


From: Tatsuro MATSUOKA
Subject: Re: safer way to use gnulib (MinGW build, quit.cc)
Date: Wed, 17 Mar 2010 10:28:39 +0900 (JST)

Hello

--- "John W. Eaton"  wrote:
The error cquit.c 
http://old.nabble.com/complie-error-of-cquit.c-(libcruft)-(MinGW-build-for-3.5.50%2B)-td27832386.html

was disappeared 

Thank you for the change for
 http://hg.savannah.gnu.org/hgweb/octave/rev/d2ac9433cd09

BTW, a new error appeared the latest development source concerning the gnulib.

In compiling, quit.cc

/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -shared-libgcc 
-DHAVE_CONFIG_H -I.
-I../../../hg/octave-work/libcruft -I..  -I/WinDevTools/include 
-I/GnuWin32/include -I../libgnu
-I../../../hg/octave-work/libgnu -I/WinDevTools/include -I/GnuWin32/include -O3 
-fomit-frame-pointer 
-DHAVE_CONFIG_H -mieee-fp -IC:/Programs/GnuWin32/include 
-I/WinDevTools/bin/../include/freetype2
-I/WinDevTools/bin/../include -Ic:/Programs/WinDevTools/include   -Wall -W 
-Wshadow -Wold-style-cast
-Wformat -O3 -fomit-frame-pointer  -O3 -fomit-frame-pointer -MT 
misc/libcruft_la-quit.lo -MD -MP -MF
misc/.deps/libcruft_la-quit.Tpo -c -o misc/libcruft_la-quit.lo `test -f 
'misc/quit.cc' || echo
'../../../hg/octave-work/libcruft/'`misc/quit.cc
libtool: compile:  g++ -shared-libgcc -DHAVE_CONFIG_H -I. 
-I../../../hg/octave-work/libcruft -I..
-I/WinDevTools/include -I/GnuWin32/include -I../libgnu 
-I../../../hg/octave-work/libgnu
-I/WinDevTools/include -I/GnuWin32/include -O3 -fomit-frame-pointer 
-DHAVE_CONFIG_H -mieee-fp
-IC:/Programs/GnuWin32/include -I/WinDevTools/bin/../include/freetype2 
-I/WinDevTools/bin/../include
-Ic:/Programs/WinDevTools/include -Wall -W -Wshadow -Wold-style-cast -Wformat 
-O3 -fomit-frame-pointer
-O3 -fomit-frame-pointer -MT misc/libcruft_la-quit.lo -MD -MP -MF 
misc/.deps/libcruft_la-quit.Tpo -c
../../../hg/octave-work/libcruft/misc/quit.cc  -DDLL_EXPORT -DPIC -o 
misc/.libs/libcruft_la-quit.o
In file included from ../libgnu/wchar.h:66:0,
                 from 
c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/cwchar:47,
                 from 
c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/bits/postypes.h:42,
                 from 
c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/iosfwd:42,
                 from c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/ios:39,
                 from 
c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/ostream:40,
                 from 
c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/iostream:40,
                 from ../../../hg/octave-work/libcruft/misc/quit.cc:29:
../libgnu/time.h:350:1: error: 'nanosleep' was not declared in this scope
../libgnu/time.h:350:29: error: invalid type in declaration before ';' token
../libgnu/time.h:385:1: error: 'localtime_r' was not declared in this scope
../libgnu/time.h:385:31: error: invalid type in declaration before ';' token
../libgnu/time.h:400:1: error: 'gmtime_r' was not declared in this scope
../libgnu/time.h:400:28: error: invalid type in declaration before ';' token
../libgnu/time.h:424:1: error: 'strptime' was not declared in this scope
../libgnu/time.h:424:28: error: invalid type in declaration before ';' token
make[2]: *** [misc/libcruft_la-quit.lo] Error 1
make[2]: Leaving directory `/home/octaves/OctBuild/hg-devel/libcruft'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/octaves/OctBuild/hg-devel'
make: *** [all] Error 2


I found nanosleep.o in libgnu/.libs. 
I look  nanosleep.o by a binary editor.  I found the symbol '_rpl_nanosleep'. 
But the symbol
'nanosleep is not found. 

In time.h,
# if 1
#  if 1
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
#    define nanosleep rpl_nanosleep
#   endif
??

quit.cc is c++ source and GNULIB_NAMESPACE perhaps is defined.

As a trial, I made a change
# if 1
#  if 1
//#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
#    define nanosleep rpl_nanosleep
//#   endif

The error concerning  nanosleep wa disappeared.

I do not think my modification is right. Perhaps other good way should exist.

It seems that the error belong to the octave issue itself but the gnulib issue 
to the
C++ implementation for the system which is not full GNU.  (MinGW is a 
minimalist GNU staff).

# Implementation the gnulib libraries seem to be a tough work but it is a smart 
way to improve
portability. Issues caused importing the gnulib are worth to overcome.

Regards

Tatsuro


  




--------------------------------------
VANCOUVER 2010 PARALYMPIC GAMES News
http://pr.mail.yahoo.co.jp/para/


reply via email to

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