octave-maintainers
[Top][All Lists]
Advanced

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

MINGW build


From: John W. Eaton
Subject: MINGW build
Date: Mon, 23 Sep 2002 10:37:35 -0500

On 22-Sep-2002, Paul Kienzle <address@hidden> wrote:

| 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?

Sure, but I've fixed some now (see below).

| 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?

I don't know what would be causing that.

| configure.in:
| 
|   #if !defined(HAVE_XXX_T)
|   typedef xxx_t type
|   #endif
| 
| => change typedef lines to
| 
|   typedef type xxx_t;

Oops, should be fixed now.

| liboctave/{file-ops,oct-passwd,oct-syscalls,oct-group}.cc
|       
|   #define NOT_SUPPORT(nm) \
|     nm ## ": not supported on this system"
| 
| 
| => remove ##

Should be fixed now.

| liboctave/lo-specfun.cc:
| 
|    M_PI is not defined
| 
| => move def of M_PI from lo-mappers.cc where it is not needed

I don't see a definition for M_PI.  Shouldn't it come from a C header
that is already included?

| liboctave/{LP,LPsolve}.h
| 
|    LP conflicts with a definition in winnt.h
| 
| => rename LP to octLP

OK, I fixed this.

| 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.

OK, we'll need a better fix.

| 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

OK, fixed.

| 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

OK, we'll have to come up with a better solution.

| liboctave/lo-specfun.cc:
| 
|    dacosh, dasinh, datanh, derf, derfc undeclared
| 
| => use the declared x... functions --- why do we need the x... versions?

Can you send a patch for the changes?  We need the x versions because
then the return values come back in the arg list, which we know how to
deal with.  My experience was that Fortran functions could return
values in different incompatible ways, so the wrapper was the easiest
solution.

| 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

OK, configure.in should already have a check.  I added code in
cmd-edit.cc.

| src/debug.cc:
| 
|   index undecared
| 
| => use strchr like the rest of octave

I don't see any calls to index in my current sources.

| 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 */

OK, I'm not sure what to do with this either.

| 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.

OK.

| 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.

OK.

| src/{parse.h,lex.l,y.tab.h}
| 
|    TEXT redefined in winnt.h
| 
| => use token STRING rather than token TEXT

OK, can you submit a patch for this?

| 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.

OK, can you submit a patch for this?

| 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.

OK.

My changes should be checked in to the public CVS archive in a few
minutes.


Thanks,

jwe



reply via email to

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