octave-maintainers
[Top][All Lists]
Advanced

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

Re: 3.0.1 release? (report on mingw)


From: Tatsuro MATSUOKA
Subject: Re: 3.0.1 release? (report on mingw)
Date: Tue, 8 Apr 2008 15:48:22 +0900 (JST)

Hello

To test what Michae pointed out. I used lo-sysdep.cc in 3.0.1a.

I have confirmed the stream.
file-ops.h > str-vec.h > Array.h > lo-utils.h > windows.h (around line 69).

After configure, I checked the config.h.

386 /* Define to 1 if you have the `LoadLibrary' function. */
387 /* #undef HAVE_LOADLIBRARY */

HAVE_LOADLIBRARY was not set.
So I have checked config.log

configure:23059: checking for LoadLibrary in -lwsock32
configure:23102: gcc -o conftest.exe -g -O2 -I/mingw/include -I/GnuWin32/include
-I/usr/local/octave-3.0.1b/include -Ic:/progra~1/Pcre/include -L/mingw/lib 
-L/GnuWin32/lib
-L/usr/local/octave-3.0.1b/lib conftest.c -lwsock32  -lhdf5 -lz -lm -luuid 
-lwsock32 -lws2_32 -lgmp
-lws2_32 -lkernel32 >&5
C:/DOCUME~1/Tatsu/LOCALS~1/Temp/cci2baaa.o: In function `main':
d:/usr/Tatsu/mingwhome/octaves/OctBuild/octave-3.0.1b/conftest.c:160: undefined 
reference to
`LoadLibrary'
collect2: ld returned 1 exit status
configure:23108: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define OCTAVE_SOURCE 1
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SEPCHAR ';'
| #define SEPCHAR_STR ";"
| #define __NO_MATH_INLINES 1
| #define CXX_NEW_FRIEND_TEMPLATE_DECL 1
| #define CXX_ISO_COMPLIANT_LIBRARY 1
| #define CXX_BROKEN_REINTERPRET_CAST 1
| #define CXX_ABI gnu_v3
| #define HAVE_LIBM 1
| #define HAVE_QHULL 1
| #define HAVE_PCRE 1
| #define HAVE_REGEX 1
| #define HAVE_ZLIB_H 1
| #define HAVE_ZLIB 1
| #define HAVE_HDF5_H 1
| #define HAVE_HDF5 1
| #define HAVE_H5GGET_NUM_OBJS 1
| #define HAVE_FFTW3 1
| #define HAVE_GLPK_H 1
| #define GLPK_PRE_4_14 1
| #define HAVE_GLPK 1
| #define HAVE_CURL_CURL_H 1
| #define HAVE_CURL 1
| #define HAVE_IEEE754_DATA_FORMAT 1
| #define F77_FUNC(name,NAME) name ## _
| #define F77_FUNC_(name,NAME) name ## __
| #define HAVE_BLAS 1
| #define HAVE_SUITESPARSE_UMFPACK_H 1
| #define HAVE_UMFPACK 1
| #define UMFPACK_SEPARATE_SPLIT 1
| #define HAVE_SUITESPARSE_COLAMD_H 1
| #define HAVE_COLAMD 1
| #define HAVE_SUITESPARSE_CCOLAMD_H 1
| #define HAVE_CCOLAMD 1
| #define HAVE_SUITESPARSE_CHOLMOD_H 1
| #define HAVE_CHOLMOD 1
| #define HAVE_SUITESPARSE_CS_H 1
| #define HAVE_CXSPARSE 1
| #define uid_t int
| #define gid_t int
| #define HAVE_DEV_T 1
| #define HAVE_INO_T 1
| #define HAVE_LONG_LONG_INT 1
| #define HAVE_UNSIGNED_LONG_LONG_INT 1
| #define HAVE_SIGSET_T 1
| #define HAVE_SIG_ATOMIC_T 1
| #define SIZEOF_SHORT 2
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 4
| #define SIZEOF_LONG_LONG 8
| #define HAVE_ALLOCA 1
| #define NPOS std::string::npos
| #define HAVE_PLACEMENT_DELETE 1
| #define HAVE_DYNAMIC_AUTO_ARRAYS 1
| #define STDC_HEADERS 1
| #define HAVE_DIRENT_H 1
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_ASSERT_H 1
| #define HAVE_CURSES_H 1
| #define HAVE_DIRECT_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_FLOAT_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_NCURSES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_UTIME_H 1
| #define HAVE_TERMCAP_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_SSTREAM 1
| #define HAVE_GLOB_H 1
| #define HAVE_FNMATCH_H 1
| #define HAVE_CONIO_H 1
| #define HAVE_ATEXIT 1
| #define HAVE_BASENAME 1
| #define HAVE_CHMOD 1
| #define HAVE_DUP2 1
| #define HAVE_EXECVP 1
| #define HAVE_GETCWD 1
| #define HAVE_GETPID 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE__KBHIT 1
| #define HAVE_LGAMMA 1
| #define HAVE_MEMMOVE 1
| #define HAVE_MKDIR 1
| #define HAVE_PUTENV 1
| #define HAVE_RAISE 1
| #define HAVE_RENAME 1
| #define HAVE_RMDIR 1
| #define HAVE_ROUND 1
| #define HAVE_SETLOCALE 1
| #define HAVE_SETVBUF 1
| #define HAVE_SNPRINTF 1
| #define HAVE_STAT 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR 1
| #define HAVE_STRICMP 1
| #define HAVE_STRNCASECMP 1
| #define HAVE_STRNICMP 1
| #define HAVE_TEMPNAM 1
| #define HAVE_TGAMMA 1
| #define HAVE_UMASK 1
| #define HAVE_UNLINK 1
| #define HAVE_UTIME 1
| #define HAVE_VFPRINTF 1
| #define HAVE_VSPRINTF 1
| #define HAVE_VSNPRINTF 1
| #define HAVE__CHMOD 1
| #define HAVE__SNPRINTF 1
| #define HAVE_STRFTIME 1
| #define OCTAVE_HAVE_BROKEN_STRPTIME 1
| #define _WIN32_WINNT 0x0403
| /* end confdefs.h.  */
| 
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char LoadLibrary ();
| #ifdef F77_DUMMY_MAIN
| 
| #  ifdef __cplusplus
|      extern "C"
| #  endif
|    int F77_DUMMY_MAIN() { return 1; }
| 
| #endif
| int
| main ()
| {
| return LoadLibrary ();
|   ;
|   return 0;
| }
I have made a source of conftest.c and Complied it.

$ gcc -o conftest.exe -g -O2 -E -I/mingw/include -I/GnuWin32/include
-I/usr/local/octave-3.0.1b/include -Ic:/progra~1/Pcre/include -L/mingw/lib 
-L/GnuWin32/lib
-L/usr/local/octave-3.0.1b/lib conftest.c -lwsock32  -lhdf5 -lz -lm -luuid 
-lwsock32 -lws2_32 -lgmp
-lws2_32 -lkernel32
gcc.exe: -lwsock32: linker input file unused because linking not done
gcc.exe: -lhdf5: linker input file unused because linking not done
gcc.exe: -lz: linker input file unused because linking not done
gcc.exe: -lm: linker input file unused because linking not done
gcc.exe: -luuid: linker input file unused because linking not done
gcc.exe: -lwsock32: linker input file unused because linking not done
gcc.exe: -lws2_32: linker input file unused because linking not done
gcc.exe: -lgmp: linker input file unused because linking not done
gcc.exe: -lws2_32: linker input file unused because linking not done
gcc.exe: -lkernel32: linker input file unused because linking not done

conftest.exe was made.
I execute it. The console go to MD-DOS mode and the followin message (it was in 
Japanese so I
translate in  English.)
NTVDM CPU detects improper commands CS:272b IP:0184 OP:63 6f 6e 66 74

I manually modified the config.h as 

386 /* Define to 1 if you have the `LoadLibrary' function. */
387 #define HAVE_LOADLIBRARY  1 /* #undef HAVE_LOADLIBRARY */

After that lo-sysdep.cc was complied without problem.
So serious problem in mingw for is LoadLibrary (); check failes.

I don't know how I can overcome mingw specific this problem.

Hi Michael, do you have any suggestion on this matter.


BTW:
The results of make check were the same as those of 3.0.1a.

Regards

Tatsuro

  
******************************
On Fri, Apr 4, 2008 at 4:23 AM, John W. Eaton <address@hidden> wrote:
> On  3-Apr-2008, Tatsuro MATSUOKA wrote:
>
>  | Hello
>  |
>  | --- "John W. Eaton" <address@hidden> wrote:
>  |
>  | > On  3-Apr-2008, Tatsuro MATSUOKA wrote:
>  | >
>  | > | This time I'll report on mingw build.
>  | > |
>  | > | 1. The  C++ source in liboctave,  lo-sysdep.cc should be patched for 
> win32 native octave
>  | > | (For cygwin it is not required.)
>  | > |
>  | > |
>  | > | *** lo-sysdep.org.cc      Thu Apr  3 03:43:36 2008
>  | > | --- lo-sysdep.cc  Thu Apr  3 08:55:24 2008
>  | > | ***************
>  | > | *** 39,44 ****
>  | > | --- 39,48 ----
>  | > |   #include <fcntl.h>
>  | > |   #endif
>  | > |
>  | > | + #if defined (__WIN32__) && ! defined (__CYGWIN__)
>  | > | + #include <windows.h>
>  | > | + #endif
>  | > | +
>  | > |   #include "file-ops.h"
>  | > |   #include "lo-error.h"
>  | > |   #include "pathlen.h"
>  | >
>  | > What problem does this solve?
>  | >
>  | > jwe
>  | >
>  |
>  | It is required to see the source:
>  | The below uses the Win32 API so that it was impossible to be complied 
> without windows.h included
>
>  OK, I made this change.

I don't understand why this change is needed. At that point, windows.h
should already
have been included using the following sequence:

file-ops.h > str-vec.h > Array.h > lo-utils.h > windows.h (around line 69).

I think that the problem you have is a symptom of another problem:
HAVE_LOADLIBRARY_API
is not defined, that means that the configure check for LoadLibrary failed.

The patch above is not a problem for MSVC. But when something does not work
under MinGW, the first thing you should ask yourself is "Damn, why does it work
under MSVC?". Because if it wouldn't work, then I would also have the problem,
and I would probably fix it ASAP... :-)

Michael.



--------------------------------------
GANBARE! NIPPON! Win your ticket to Olympic Games 2008.
http://pr.mail.yahoo.co.jp/ganbare-nippon/


reply via email to

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