[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MINGW build
From: |
Paul Kienzle |
Subject: |
MINGW build |
Date: |
Sun, 22 Sep 2002 19:58:25 -0400 |
Hi,
I'm disappointed in the performance of octave under CYGWIN, and particularly
with the socket hack I'm using for communication, so I've been trying to
build under MINGW to see if performance is any better.
In the processes I've hit a number of unexpected points in the configuration
space of octave. I'll type my build log here. John, do you want be to
construct patches for any of these? Or do you want me to wait until I've
got a running MinGW system.
Right now I'm at the stage where everything compiles, but I'm getting the
following sort of error on link:
betainc.o: In function `ZNK12octave_value14print_name_tagERSoRKSs':
c:/cvs/octave-mingw/octave-2.1.36/src/ov.h(.ctors+0x0): undefined reference to
`_GLOBAL__I_FSbetainc_gnu_v3'
c:/cvs/octave-mingw/octave-2.1.36/src/ov.h(.dtors+0x0): undefined reference to
`_GLOBAL__D_FSbetainc_gnu_v3'
Here's the output from nm:
$ nm betainc.o | grep FSbetainc
U __GLOBAL__D_FSbetainc_gnu_v3
U __GLOBAL__I_FSbetainc_gnu_v3
00000320 T _FSbetainc_gnu_v3
This may be a gcc 3.2 issue (I've redisovered a number of those already).
Any ideas?
Paul Kienzle
address@hidden
===== Build Log for octave 2.1.36 under MinGW =====
$ gcc --version
gcc.exe (GCC) 3.2 (mingw special 20020817-1)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure.in:
#if !defined(HAVE_XXX_T)
typedef xxx_t type
#endif
=> change typedef lines to
typedef type xxx_t;
liboctave/{file-ops,oct-passwd,oct-syscalls,oct-group}.cc
#define NOT_SUPPORT(nm) \
nm ## ": not supported on this system"
=> remove ##
liboctave/lo-specfun.cc:
M_PI is not defined
=> move def of M_PI from lo-mappers.cc where it is not needed
liboctave/{LP,LPsolve}.h
LP conflicts with a definition in winnt.h
=> rename LP to octLP
liboctave/file-ops.cc:
::mkdir doesn't accept a mode argument
=> proper fix is to check in ./configure if mkdir accepts a mode argument
I hacked around it rather than fix ./configure.
liboctave/{file-stat.cc,statdefs.h}:
#ifndef S_ISLNK
#define lstat stat
#endif
conflicts with
#if !defined(HAVE_LSTAT)
static inline int lstat (...) { return stat (name, buf); }
#endif
=> change statdefs.h to
#ifndef S_ISLNK
#undef HAVE_LSTAT
#endif
liboctave/lo-mappers.cc:
compiler crashes when trying to call the octave error handler
=> compiling without -O2 avoids the problem. I don't know the correct fix.
liboctave/lo-mappers.cc:
isnan is not picked up in lo-mappers even though configure found it.
=> I faked an isnan function which always returns false, but I don't know
why it failed
liboctave/lo-specfun.cc:
dacosh, dasinh, datanh, derf, derfc undeclared
=> use the declared x... functions --- why do we need the x... versions?
liboctave/cmd-edit.cc:
::geteuid undeclared
=> test for geteuid in configure and use the following:
#if defined(HAVE_GETEUID)
temp = (::geteuid () == 0 ? "#" : "$" )
#else
temp = "$";
#endif
src/debug.cc:
index undecared
=> use strchr like the rest of octave
src/sighandlers.cc:
kill undeclared
SIGCHLD etc. undefined
SIGPIPE undefined
=> I don't know how to do windows signal handling. I was going to work on
this after I got the basics working. I hacked out the kill code. The
two functions sigchld_handler and sigpipe_handler should be wrapped #if's
#ifdef SIGCHLD
sigchld_handler (...) { ... }
#endif /* SIGCHLD */
#ifdef SIGPIPE
sigpipe_handler (...) { ... }
#endif /* SIGPIPE */
src/sysdep.cc:
termio stuf undefined
=> I will need to write a windows replacement for kbhit. MinGW defines
termio.h, but it is empty. I hacked around this with an #ifdef WIN32
but that is not the best solution. Again, not needed for the first cut.
src/sysdep.cc:
sleep undeclared
=> surprisingly usleep didn't cause problems. I don't know what the
consequences of using usleep rather than sleep are here. I just commented
it out, so pause and sleep will be broken.
src/toplev.cc
fork undeclared
=> comment it out --- system() will not work initial.
src/{parse.h,lex.l,y.tab.h}
TEXT redefined in winnt.h
=> use token STRING rather than token TEXT
src/pt-bp.cc
lst1, lst2 defined in dlgs.h
=> use lstA and lstB instead --- this is easier than figuring out exactly
why dlgs.h is being included.
kpathsea/config.h
The following leads to all sorts of conflicts:
#ifdef WIN32
#define __STDC__ 1
#include <kpathsea/win32lib.h>
#endif
=> instead use something like
#ifdef MINGW
#include <windws.h>
#include <fcntl.h>
#include <dirent.h>
#endif
Surely somebody has built kpathsea for MinGW, so it is a matter of finding
the correct fix.
- MINGW build,
Paul Kienzle <=
- MINGW build, John W. Eaton, 2002/09/23
- Re: MINGW build, Mumit Khan, 2002/09/23
- Re: MINGW build, Paul Kienzle, 2002/09/23
- Re: MINGW build, Paul Kienzle, 2002/09/24
- Re: MINGW build (kpathsea), Paul Kienzle, 2002/09/24