Hi,
I want to cross build wxMSW-2.8.10 under fedora 12, but when I did a configure, it gave me the following error message: checking size of boolean... configure: error: cannot compute sizeof(boolean), 77 See `config.log' for more details.
I had no problems cross building wxMSW-2.8.10 under fedora 11.
The configure options I used is: ./configure --prefix=/usr/i686-pc-mingw32/sys-root/mingw --host=i686-pc-mingw32 --build=i686-linux --enable-monolithic --disable-shared --enable-unicode --disable-threads
The config.log file contained some error message: ... ... configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "wxWidgets" | #define PACKAGE_TARNAME "wxwidgets" | #define PACKAGE_VERSION "2.8.10" | #define PACKAGE_STRING "wxWidgets 2.8.10" | #define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org" | #ifdef __cplusplus | extern "C" void exit (int); | #endif | #define __WIN32__ 1 | #define __WIN95__ 1 | #define __WINDOWS__ 1 | #define __GNUWIN32__ 1 | #define STRICT 1 | #define HAVE_STRCASECMP_IN_STRING_H 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 HAVE_STDLIB_H 1 | #define HAVE_MALLOC_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define SIZEOF_CHAR 1 | #define SIZEOF_SHORT 2 | #define SIZEOF_VOID_P 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 4 | #define SIZEOF_SIZE_T 4 | #define SIZEOF_LONG_LONG 8 | #define SIZEOF_WCHAR_T 2 | #define HAVE_VA_COPY 1 | #define HAVE_VARIADIC_MACROS 1 | #define HAVE_IOSTREAM 1 | #define HAVE_BOOL 1 | #define HAVE_EXPLICIT 1 | #define HAVE_CONST_CAST | #define HAVE_REINTERPRET_CAST | #define HAVE_STATIC_CAST | #define HAVE_STD_WSTRING 1 | #define HAVE_STD__ISTREAM 1 | #define HAVE_STD__OSTREAM 1 | #define HAVE_COS 1 | #define HAVE_FLOOR 1 | #define HAVE_WCSTOULL 1 | #define wxUSE_REGEX 1 | #define wxUSE_ZLIB 1 | #define wxUSE_LIBPNG 1 | #define wxUSE_LIBJPEG 1 | #define HAVE_BOOLEAN 1 | /* end confdefs.h. */ | | #undef HAVE_BOOLEAN | #include <stdio.h> | #include <jpeglib.h> | | | int | main () | { | static int test_array [1 - 2 * !(((long) (sizeof (boolean))) >= 0)]; | test_array [0] = 0 | | ; | return 0; | } configure:26896: i686-pc-mingw32-gcc -c conftest.c >&5 conftest.c: In function 'main': conftest.c:68: error: 'boolean' undeclared (first use in this function) conftest.c:68: error: (Each undeclared identifier is reported only once conftest.c:68: error: for each function it appears in.) configure:26902: $? = 1 configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "wxWidgets" | #define PACKAGE_TARNAME "wxwidgets" | #define PACKAGE_VERSION "2.8.10" | #define PACKAGE_STRING "wxWidgets 2.8.10" | #define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org" | #ifdef __cplusplus | extern "C" void exit (int); | #endif | #define __WIN32__ 1 | #define __WIN95__ 1 | #define __WINDOWS__ 1 | #define __GNUWIN32__ 1 | #define STRICT 1 | #define HAVE_STRCASECMP_IN_STRING_H 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 HAVE_STDLIB_H 1 | #define HAVE_MALLOC_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_WCHAR_H 1 | #define SIZEOF_CHAR 1 | #define SIZEOF_SHORT 2 | #define SIZEOF_VOID_P 4 | #define SIZEOF_INT 4 | #define SIZEOF_LONG 4 | #define SIZEOF_SIZE_T 4 | #define SIZEOF_LONG_LONG 8 | #define SIZEOF_WCHAR_T 2 | #define HAVE_VA_COPY 1 | #define HAVE_VARIADIC_MACROS 1 | #define HAVE_IOSTREAM 1 | #define HAVE_BOOL 1 | #define HAVE_EXPLICIT 1 | #define HAVE_CONST_CAST | #define HAVE_REINTERPRET_CAST | #define HAVE_STATIC_CAST | #define HAVE_STD_WSTRING 1 | #define HAVE_STD__ISTREAM 1 | #define HAVE_STD__OSTREAM 1 | #define HAVE_COS 1 | #define HAVE_FLOOR 1 | #define HAVE_WCSTOULL 1 | #define wxUSE_REGEX 1 | #define wxUSE_ZLIB 1 | #define wxUSE_LIBPNG 1 | #define wxUSE_LIBJPEG 1 | #define HAVE_BOOLEAN 1 | /* end confdefs.h. */ | | #undef HAVE_BOOLEAN | #include <stdio.h> | #include <jpeglib.h> | | | int | main () | { | static int test_array [1 - 2 * !(((long) (sizeof (boolean))) < 0)]; | test_array [0] = 0 | | ; | return 0; | } configure:27042: error: cannot compute sizeof (boolean), 77 See `config.log' for more details.
Thanks.
On Tue, Dec 01, 2009 at 05:51:03PM +0800, aaron lwe wrote:
Hi,
I want to cross build wxMSW-2.8.10 under fedora 12, but when I did a configure, it gave me the following error message: checking size of boolean... configure: error: cannot compute sizeof(boolean), 77 See `config.log' for more details.
I had no problems cross building wxMSW-2.8.10 under fedora 11. configure:26896: i686-pc-mingw32-gcc -c conftest.c >&5 conftest.c: In function 'main': conftest.c:68: error: 'boolean' undeclared (first use in this function) conftest.c:68: error: (Each undeclared identifier is reported only once conftest.c:68: error: for each function it appears in.)
You'll probably want to have a look at the configure.{in,ac} file to see what causes this error. But the error itself is pretty clear: C doesn't define a type called "boolean"! The code should probably be using _Bool instead (standardized in C99).
Rich.
On Tue, 1 Dec 2009 17:51:03 +0800 aaron lwe aaron.lwe@gmail.com wrote:
The configure options I used is: ./configure --prefix=/usr/i686-pc-mingw32/sys-root/mingw --host=i686-pc-mingw32 --build=i686-linux --enable-monolithic --disable-shared --enable-unicode --disable-threads
Isn't it better to use mingw-configure instead of ./configure?
Regards, Nerijus
On Wed, Dec 09, 2009 at 02:02:08PM +0200, Nerijus Baliunas wrote:
On Tue, 1 Dec 2009 17:51:03 +0800 aaron lwe aaron.lwe@gmail.com wrote:
The configure options I used is: ./configure --prefix=/usr/i686-pc-mingw32/sys-root/mingw --host=i686-pc-mingw32 --build=i686-linux --enable-monolithic --disable-shared --enable-unicode --disable-threads
Isn't it better to use mingw-configure instead of ./configure?
It depends. mingw32-configure is just a convenient helper script. It's there if you find it helpful, but you don't have to use it.
In many situations it is sufficient just to do:
./configure --host=i686-pc-mingw32
Only the --host parameter is required. It's what triggers cross- compilation.
You can find out what mingw32-configure would do by using this command:
rpm --eval '%{_mingw32_configure}'
It expands to a couple of pages of code on my local machine.
BTW the --build parameter that Aaron used really is unnecessary, and possibly wrong. I can't think of a situation when ./configure wouldn't be able to correctly determine the current build system.
Rich.
On Wed, Dec 9, 2009 at 10:11 PM, Richard W.M. Jones rjones@redhat.com wrote:
It depends. mingw32-configure is just a convenient helper script. It's there if you find it helpful, but you don't have to use it.
In many situations it is sufficient just to do:
./configure --host=i686-pc-mingw32
yes, I tried to use mingw32-configure instead of ./configure, and the error is still there.
BTW the --build parameter that Aaron used really is unnecessary, and possibly wrong. I can't think of a situation when ./configure wouldn't be able to correctly determine the current build system.
Thanks for this information.