compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

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

compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

tmacchant
Hello

I have just tried to build the recent development source.

The changeset date and time
Tue Sep 21 13:09:12 2010 +0200
changeset 11008 3622db30ff05

Beginning of this month, I have not met such errors.

Is this better to report on the bug tracker?

Regards

Tatsuro

libtool: compile:  g++ -shared-libgcc -DHAVE_CONFIG_H -I. -I../../../hg/octave-work/liboctave -I..
-I/c/Programs/gpnewlib/include -I/c/Programs/OctaveLibs/include -I/GnuWin32/include -I../libgnu
-I../../../hg/octave-work/libgnu -I../../../hg/octave-work/libcruft/misc
-I/c/Programs/gpnewlib/include -I/c/Programs/OctaveLibs/include -I/GnuWin32/include -O3
-fomit-frame-pointer -DHAVE_CONFIG_H -mieee-fp -IC:/Programs/GnuWin32/include
-I/c/Programs/gpnewlib/include/freetype2 -I/c/Programs/gpnewlib/include -IC:/Programs/gpnewlib/include
-Wall -W -Wshadow -Wold-style-cast -Wformat -O3 -fomit-frame-pointer -O3 -fomit-frame-pointer -MT
liboctave_la-oct-env.lo -MD -MP -MF .deps/liboctave_la-oct-env.Tpo -c
../../../hg/octave-work/liboctave/oct-env.cc  -DDLL_EXPORT -DPIC -o .libs/liboctave_la-oct-env.o
In file included from ../../../hg/octave-work/liboctave/oct-env.cc:61:0:
../../../hg/octave-work/liboctave/oct-syscalls.h:61:62: error: macro "waitpid" passed 4 arguments, but
takes just 3
../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected identifier before numeric
constant
../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected ',' or '...' before numeric
constant
../../../hg/octave-work/liboctave/oct-env.cc: In member function 'std::string
octave_env::do_get_host_name() const':
../../../hg/octave-work/liboctave/oct-env.cc:455:20: error: 'gethostname' is not a member of 'gnulib'
make[3]: *** [liboctave_la-oct-env.lo] Error 1
make[3]: Leaving directory `/home/octaves/OctBuild/hg-devel/liboctave'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/octaves/OctBuild/hg-devel/liboctave'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/octaves/OctBuild/hg-devel'
make: *** [all] Error 2



--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

bpabbott
Administrator
On Sep 21, 2010, at 9:03 PM, Tatsuro MATSUOKA wrote:

> Hello
>
> I have just tried to build the recent development source.
>
> The changeset date and time
> Tue Sep 21 13:09:12 2010 +0200
> changeset 11008 3622db30ff05
>
> Beginning of this month, I have not met such errors.
>
> Is this better to report on the bug tracker?
>
> Regards
>
> Tatsuro
>
> libtool: compile:  g++ -shared-libgcc -DHAVE_CONFIG_H -I. -I../../../hg/octave-work/liboctave -I..
> -I/c/Programs/gpnewlib/include -I/c/Programs/OctaveLibs/include -I/GnuWin32/include -I../libgnu
> -I../../../hg/octave-work/libgnu -I../../../hg/octave-work/libcruft/misc
> -I/c/Programs/gpnewlib/include -I/c/Programs/OctaveLibs/include -I/GnuWin32/include -O3
> -fomit-frame-pointer -DHAVE_CONFIG_H -mieee-fp -IC:/Programs/GnuWin32/include
> -I/c/Programs/gpnewlib/include/freetype2 -I/c/Programs/gpnewlib/include -IC:/Programs/gpnewlib/include
> -Wall -W -Wshadow -Wold-style-cast -Wformat -O3 -fomit-frame-pointer -O3 -fomit-frame-pointer -MT
> liboctave_la-oct-env.lo -MD -MP -MF .deps/liboctave_la-oct-env.Tpo -c
> ../../../hg/octave-work/liboctave/oct-env.cc  -DDLL_EXPORT -DPIC -o .libs/liboctave_la-oct-env.o
> In file included from ../../../hg/octave-work/liboctave/oct-env.cc:61:0:
> ../../../hg/octave-work/liboctave/oct-syscalls.h:61:62: error: macro "waitpid" passed 4 arguments, but
> takes just 3
> ../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected identifier before numeric
> constant
> ../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected ',' or '...' before numeric
> constant
> ../../../hg/octave-work/liboctave/oct-env.cc: In member function 'std::string
> octave_env::do_get_host_name() const':
> ../../../hg/octave-work/liboctave/oct-env.cc:455:20: error: 'gethostname' is not a member of 'gnulib'
> make[3]: *** [liboctave_la-oct-env.lo] Error 1
> make[3]: Leaving directory `/home/octaves/OctBuild/hg-devel/liboctave'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/home/octaves/OctBuild/hg-devel/liboctave'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/octaves/OctBuild/hg-devel'
> make: *** [all] Error 2

I had some trouble building today as well. If I understand correctly, the problem was related to a change in the gnulib dependencies.. John's suggestion worked for me.

        http://www-old.cae.wisc.edu/pipermail/octave-maintainers/2010-September/017131.html

Ben






Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

tmacchant
Hello

Thank you for your information.

I always delete the old gnulib repository and use the most recent tip of gnulib. for the  build.

Thus the treatment you have pointed out thus have no effect for my case.

Regards

Tatsuro

--- Ben Abbott  wrote:

> On Sep 21, 2010, at 9:03 PM, Tatsuro MATSUOKA wrote:
>
> > Hello
> >
> > I have just tried to build the recent development source.
> >
> > The changeset date and time
> > Tue Sep 21 13:09:12 2010 +0200
> > changeset 11008 3622db30ff05
> >
> > Beginning of this month, I have not met such errors.
> >
> > Is this better to report on the bug tracker?
> >
> > Regards
> >
> > Tatsuro
> >
> > libtool: compile:  g++ -shared-libgcc -DHAVE_CONFIG_H -I. -I../../../hg/octave-work/liboctave
> -I..
> > -I/c/Programs/gpnewlib/include -I/c/Programs/OctaveLibs/include -I/GnuWin32/include
> -I../libgnu
> > -I../../../hg/octave-work/libgnu -I../../../hg/octave-work/libcruft/misc
> > -I/c/Programs/gpnewlib/include -I/c/Programs/OctaveLibs/include -I/GnuWin32/include -O3
> > -fomit-frame-pointer -DHAVE_CONFIG_H -mieee-fp -IC:/Programs/GnuWin32/include
> > -I/c/Programs/gpnewlib/include/freetype2 -I/c/Programs/gpnewlib/include
> -IC:/Programs/gpnewlib/include
> > -Wall -W -Wshadow -Wold-style-cast -Wformat -O3 -fomit-frame-pointer -O3 -fomit-frame-pointer
> -MT
> > liboctave_la-oct-env.lo -MD -MP -MF .deps/liboctave_la-oct-env.Tpo -c
> > ../../../hg/octave-work/liboctave/oct-env.cc  -DDLL_EXPORT -DPIC -o
> .libs/liboctave_la-oct-env.o
> > In file included from ../../../hg/octave-work/liboctave/oct-env.cc:61:0:
> > ../../../hg/octave-work/liboctave/oct-syscalls.h:61:62: error: macro "waitpid" passed 4
> arguments, but
> > takes just 3
> > ../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected identifier before
> numeric
> > constant
> > ../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected ',' or '...' before
> numeric
> > constant
> > ../../../hg/octave-work/liboctave/oct-env.cc: In member function 'std::string
> > octave_env::do_get_host_name() const':
> > ../../../hg/octave-work/liboctave/oct-env.cc:455:20: error: 'gethostname' is not a member of
> 'gnulib'
> > make[3]: *** [liboctave_la-oct-env.lo] Error 1
> > make[3]: Leaving directory `/home/octaves/OctBuild/hg-devel/liboctave'
> > make[2]: *** [all] Error 2
> > make[2]: Leaving directory `/home/octaves/OctBuild/hg-devel/liboctave'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/home/octaves/OctBuild/hg-devel'
> > make: *** [all] Error 2
>
> I had some trouble building today as well. If I understand correctly, the problem was related to
> a change in the gnulib dependencies.. John's suggestion worked for me.
>
> http://www-old.cae.wisc.edu/pipermail/octave-maintainers/2010-September/017131.html
>
> Ben
>
>
>
>
>
>


--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

John W. Eaton
Administrator
On 22-Sep-2010, Tatsuro MATSUOKA wrote:

| Hello
|
| Thank you for your information.
|
| I always delete the old gnulib repository and use the most recent tip of gnulib. for the  build.
|
| Thus the treatment you have pointed out thus have no effect for my case.

But did you also remove the generated files in the libgnu directory and
re-run autogen.sh and configure?  In this case, that is needed because
a new module was added.  Simply updating the gnulib directory is not
always sufficient.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

tmacchant
Hello

--- "John W. Eaton"  wrote:

> On 22-Sep-2010, Tatsuro MATSUOKA wrote:
>
> | Hello
> |
> | Thank you for your information.
> |
> | I always delete the old gnulib repository and use the most recent tip of gnulib. for the
> build.
> |
> | Thus the treatment you have pointed out thus have no effect for my case.
>
> But did you also remove the generated files in the libgnu directory and
> re-run autogen.sh and configure?  In this case, that is needed because
> a new module was added.  Simply updating the gnulib directory is not
> always sufficient.

Yes. Once I delete all working source directory and clone it from the original.

The below is what I have done for build.

I use mecurial and git on the cygwin

On the cygwin
cd "D:\usr\Tatsu\mingwhome\octaves\hg/octave"
hg pull http://www.octave.org/hg/octave
hg update

cd "D:\usr\Tatsu\mingwhome\octaves\hg"
rm -rf ./octave-work
hg clone ./octave ./octave-work

# attach patch and modification before ./autogen.sh
cd "D:\usr\Tatsu\mingwhome\octaves\hg/octave-work"
patch -p 1 <  ../FLTK.patch
patch -p 1 <  ../oct-hist.diff

cd "D:\usr\Tatsu\mingwhome\octaves\hg/octave-work"
./autogen.sh --copy  

After that I move Msys+mingw tool chain, and carry out configure and make.

To the beginning of September, the build process went well.  

Regards

Tatsuro


--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
Reply | Threaded
Open this post in threaded view
|

compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

John W. Eaton
Administrator
In reply to this post by tmacchant
On 22-Sep-2010, Tatsuro MATSUOKA wrote:

| libtool: compile:  g++ -shared-libgcc -DHAVE_CONFIG_H -I. -I../../../hg/octave-work/liboctave -I..
| -I/c/Programs/gpnewlib/include -I/c/Programs/OctaveLibs/include -I/GnuWin32/include -I../libgnu
| -I../../../hg/octave-work/libgnu -I../../../hg/octave-work/libcruft/misc
| -I/c/Programs/gpnewlib/include -I/c/Programs/OctaveLibs/include -I/GnuWin32/include -O3
| -fomit-frame-pointer -DHAVE_CONFIG_H -mieee-fp -IC:/Programs/GnuWin32/include
| -I/c/Programs/gpnewlib/include/freetype2 -I/c/Programs/gpnewlib/include -IC:/Programs/gpnewlib/include
| -Wall -W -Wshadow -Wold-style-cast -Wformat -O3 -fomit-frame-pointer -O3 -fomit-frame-pointer -MT
| liboctave_la-oct-env.lo -MD -MP -MF .deps/liboctave_la-oct-env.Tpo -c
| ../../../hg/octave-work/liboctave/oct-env.cc  -DDLL_EXPORT -DPIC -o .libs/liboctave_la-oct-env.o
| In file included from ../../../hg/octave-work/liboctave/oct-env.cc:61:0:
| ../../../hg/octave-work/liboctave/oct-syscalls.h:61:62: error: macro "waitpid" passed 4 arguments, but
| takes just 3
| ../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected identifier before numeric
| constant
| ../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected ',' or '...' before numeric
| constant

It looks like the gnulib sys/wait.h is defining waitpid, even for C++.
Probably it should not do that.

| ../../../hg/octave-work/liboctave/oct-env.cc: In member function 'std::string
| octave_env::do_get_host_name() const':
| ../../../hg/octave-work/liboctave/oct-env.cc:455:20: error: 'gethostname' is not a member of 'gnulib'

The unistd.h file from gnulib should provide gnulib::gethostname.  Are
the following defined in your configh.h file?

  GNULIB_TEST_GETHOSTNAME
  HAVE_GETHOSTNAME
  HAVE_RAW_DECL_GETHOSTNAME

jwe
Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

tmacchant
Hello

Thank you for your reply.

--- "John W. Eaton" wrote:
nstant
> | ../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected ',' or '...' before
> numeric
> | constant
>
> It looks like the gnulib sys/wait.h is defining waitpid, even for C++.
> Probably it should not do that.

In sys/wait.h in the directory 'libgnu' in the build tree, I found

*****************************
# ifdef __cplusplus
extern "C" {
# endif

/* Declarations of functions.  */

# ifdef __cplusplus
}
# endif

#else
/* Native Windows API.  */

# include <process.h>

# define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)

/* The following macros apply to an argument x, that is a status of a process,
   as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess().
   This value is simply an 'int', not composed of bit fields.  */

/* When an unhandled fatal signal terminates a process, the exit code is 3.  */
# define WIFSIGNALED(x) ((x) == 3)
# define WIFEXITED(x) ((x) != 3)
# define WIFSTOPPED(x) 0

/* The signal that terminated a process is not known posthum.  */
# define WTERMSIG(x) SIGTERM

# define WEXITSTATUS(x) (x)

/* There are no core dumps.  */
# define WCOREDUMP(x) 0

#endif

# include <process.h>

# define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)

*********************************************************

I attached sys/wait.h as a refrence.





>
> | ../../../hg/octave-work/liboctave/oct-env.cc: In member function 'std::string
> | octave_env::do_get_host_name() const':
> | ../../../hg/octave-work/liboctave/oct-env.cc:455:20: error: 'gethostname' is not a member of
> 'gnulib'
>
> The unistd.h file from gnulib should provide gnulib::gethostname.  Are
> the following defined in your configh.h file?
>
>   GNULIB_TEST_GETHOSTNAME
>   HAVE_GETHOSTNAME
>   HAVE_RAW_DECL_GETHOSTNAME
>
In config.h, I found the following:

/* Define to 1 when the gnulib module gethostname should be tested. */
#define GNULIB_TEST_GETHOSTNAME 1

/* Define to 1 if you have the `gethostname' function. */
/* #undef HAVE_GETHOSTNAME */

/* Define to 1 if gethostname is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_GETHOSTNAME */

Any suggestions?

Regards

Tatsuro

--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/

wait.h (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

John W. Eaton
Administrator
On 23-Sep-2010, Tatsuro MATSUOKA wrote:

| In sys/wait.h in the directory 'libgnu' in the build tree, I found
|
| ...
|
| # define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)

We need to discuss this with the gnulib maintainers.  For C++, it
would be helpful if this were a function instead of a macro.

| > | ../../../hg/octave-work/liboctave/oct-env.cc: In member function 'std::string
| > | octave_env::do_get_host_name() const':
| > | ../../../hg/octave-work/liboctave/oct-env.cc:455:20: error: 'gethostname' is not a member of
| > 'gnulib'
| >
| > The unistd.h file from gnulib should provide gnulib::gethostname.  Are
| > the following defined in your configh.h file?
| >
| >   GNULIB_TEST_GETHOSTNAME
| >   HAVE_GETHOSTNAME
| >   HAVE_RAW_DECL_GETHOSTNAME
| >
| In config.h, I found the following:
|
| /* Define to 1 when the gnulib module gethostname should be tested. */
| #define GNULIB_TEST_GETHOSTNAME 1
|
| /* Define to 1 if you have the `gethostname' function. */
| /* #undef HAVE_GETHOSTNAME */
|
| /* Define to 1 if gethostname is declared even after undefining macros. */
| /* #undef HAVE_RAW_DECL_GETHOSTNAME */

What do you have in the generated libgnu/unistd.h file?  I have:

  #if 1
  /* Return the standard host name of the machine.
     WARNING! The host name may or may not be fully qualified.

     Put up to LEN bytes of the host name into NAME.
     Null terminate it if the name is shorter than LEN.
     If the host name is longer than LEN, set errno = EINVAL and return -1.
     Return 0 if successful, otherwise set errno and return -1.  */
  # if 0
  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  #   undef gethostname
  #   define gethostname rpl_gethostname
  #  endif
  _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len)
                                      _GL_ARG_NONNULL ((1)));
  _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len));
  # else
  #  if !1
  _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len)
                                      _GL_ARG_NONNULL ((1)));
  #  endif
  /* Need to cast, because on Solaris 10 systems, the second parameter is
                                                        int len.  */
  _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
  # endif
  _GL_CXXALIASWARN (gethostname);
  #elif 0
  # undef gethostname
  # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
  #elif defined GNULIB_POSIXCHECK
  # undef gethostname
  # if HAVE_RAW_DECL_GETHOSTNAME
  _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
                   "use gnulib module gethostname for portability");
  # endif
  #endif

The corresponding code in gnulib/lib/unistd.in.h is

  #if @GNULIB_GETHOSTNAME@
  /* Return the standard host name of the machine.
     WARNING! The host name may or may not be fully qualified.

     Put up to LEN bytes of the host name into NAME.
     Null terminate it if the name is shorter than LEN.
     If the host name is longer than LEN, set errno = EINVAL and return -1.
     Return 0 if successful, otherwise set errno and return -1.  */
  # if @UNISTD_H_HAVE_WINSOCK2_H@
  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  #   undef gethostname
  #   define gethostname rpl_gethostname
  #  endif
  _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len)
                                      _GL_ARG_NONNULL ((1)));
  _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len));
  # else
  #  if !@HAVE_GETHOSTNAME@
  _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len)
                                      _GL_ARG_NONNULL ((1)));
  #  endif
  /* Need to cast, because on Solaris 10 systems, the second parameter is
                                                        int len.  */
  _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
  # endif
  _GL_CXXALIASWARN (gethostname);
  #elif @UNISTD_H_HAVE_WINSOCK2_H@
  # undef gethostname
  # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
  #elif defined GNULIB_POSIXCHECK
  # undef gethostname
  # if HAVE_RAW_DECL_GETHOSTNAME
  _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
                   "use gnulib module gethostname for portability");
  # endif
  #endif

so you can see where the various "#if 1" and "#if 0" lines come from.
The values are substituted when you run configure (see config.status
for the values of these @NAME@ variables on your system.  Is
GNULIB_GETHOSTNAME defined to be 1 and substituted correctly for you?

Finally, could you add -save-temps to CXXFLAGS and compile oct-env.cc
and send the resulting oct-env.ii file?  That should show how all
these macros are expanded by the preprocessor.

jwe
Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

tmacchant
Hello

--- "John W. Eaton" wrote:

> On 23-Sep-2010, Tatsuro MATSUOKA wrote:
>
> | In sys/wait.h in the directory 'libgnu' in the build tree, I found
> |
> | ...
> |
> | # define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)
>
> We need to discuss this with the gnulib maintainers.  For C++, it
> would be helpful if this were a function instead of a macro.

Just the above the below

> | # define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)

Should I ask the gnulib ML by myself?

Honestly speaking, I cannot find what should I do
In oct-syscall.h, I found,
  static pid_t waitpid (pid_t, int *status, int);
  static pid_t waitpid (pid_t, int *status, int, std::string&);

How should I modify sys_wait.in.h considering C++ calling?

Sorry for my ignorance and give suggestions.

Regards

Tatsuro


--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

tmacchant
Hello John

Following your suggestion,

> > | # define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)
> >
> > We need to discuss this with the gnulib maintainers.  For C++, it
> > would be helpful if this were a function instead of a macro.

I have posted the issue to gnulib ML.  The gnulib team kindly consider the modification
http://old.nabble.com/definition-of-waitpid-in-sys_wait.in.h-for-C%2B%2B-on-windows-td29835577.html

The compile issue from the definition of waitpid for the windows is solved.

Thanks!!

BTW, the other error from gnulib::gethostname is
treated by the similar way that for 'unlink'.

http://octave.1599824.n4.nabble.com/Error-unlink-is-not-a-member-of-gnulib-on-the-recent-check-out-of-development-branch-was-Re-MinGW-co-td2252605.html#a2252632

The function 'gnulib::gethostname' was replaced by 'gethostname'.

I do not think that this is correct way but did it to go forward.

I have met different problem.  I will report it in another post.

Regards

Tatsuro

--- Tatsuro MATSUOKA  wrote:

> Hello
>
> --- "John W. Eaton" wrote:
>
> > On 23-Sep-2010, Tatsuro MATSUOKA wrote:
> >
> > | In sys/wait.h in the directory 'libgnu' in the build tree, I found
> > |
> > | ...
> > |
> > | # define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)
> >
> > We need to discuss this with the gnulib maintainers.  For C++, it
> > would be helpful if this were a function instead of a macro.
>
> Just the above the below
>
> > | # define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)
>
> Should I ask the gnulib ML by myself?
>
> Honestly speaking, I cannot find what should I do
> In oct-syscall.h, I found,
>   static pid_t waitpid (pid_t, int *status, int);
>   static pid_t waitpid (pid_t, int *status, int, std::string&);
>
> How should I modify sys_wait.in.h considering C++ calling?
>
> Sorry for my ignorance and give suggestions.
>
> Regards
>
> Tatsuro
>
>
> --------------------------------------
> Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
> http://pr.mail.yahoo.co.jp/ie8/
>


--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/
Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

John W. Eaton
Administrator
On  2-Oct-2010, Tatsuro MATSUOKA wrote:

| Hello John
|
| Following your suggestion,
|
| > > | # define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)
| > >
| > > We need to discuss this with the gnulib maintainers.  For C++, it
| > > would be helpful if this were a function instead of a macro.
|
| I have posted the issue to gnulib ML.  The gnulib team kindly consider the modification
| http://old.nabble.com/definition-of-waitpid-in-sys_wait.in.h-for-C%2B%2B-on-windows-td29835577.html
|
| The compile issue from the definition of waitpid for the windows is solved.
|
| Thanks!!
|
| BTW, the other error from gnulib::gethostname is
| treated by the similar way that for 'unlink'.
|
| http://octave.1599824.n4.nabble.com/Error-unlink-is-not-a-member-of-gnulib-on-the-recent-check-out-of-development-branch-was-Re-MinGW-co-td2252605.html#a2252632
|
| The function 'gnulib::gethostname' was replaced by 'gethostname'.
|
| I do not think that this is correct way but did it to go forward.

Right, it would be better to understand what is happening to cause the
error and fix it.  To start, please send me your libgnu/unistd.h file.

jwe
Reply | Threaded
Open this post in threaded view
|

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32

tmacchant
Hello

--- "John W. Eaton"  wrote:

> On  2-Oct-2010, Tatsuro MATSUOKA wrote:
>
> | Hello John
> |
> | Following your suggestion,
> |
> | > > | # define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)
> | > >
> | > > We need to discuss this with the gnulib maintainers.  For C++, it
> | > > would be helpful if this were a function instead of a macro.
> |
> | I have posted the issue to gnulib ML.  The gnulib team kindly consider the modification
> |
> http://old.nabble.com/definition-of-waitpid-in-sys_wait.in.h-for-C%2B%2B-on-windows-td29835577.html
> |
> | The compile issue from the definition of waitpid for the windows is solved.
> |
> | Thanks!!
> |
> | BTW, the other error from gnulib::gethostname is
> | treated by the similar way that for 'unlink'.
> |
> |
>
http://octave.1599824.n4.nabble.com/Error-unlink-is-not-a-member-of-gnulib-on-the-recent-check-out-of-development-branch-was-Re-MinGW-co-td2252605.html#a2252632
> |
> | The function 'gnulib::gethostname' was replaced by 'gethostname'.
> |
> | I do not think that this is correct way but did it to go forward.
>
> Right, it would be better to understand what is happening to cause the
> error and fix it.  To start, please send me your libgnu/unistd.h file.


I have upload libgnu/unistd.h to
http://www.geocities.co.jp/tmoctwin/files/oct2010_1003.html
as
unistd.h.bz2 (compressed by bzip2)

Regards

Tatsuro

--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/