Compiling 1.8.1 for Windows using mingw

I’m trying to create a statically linked ruby.exe using mingw.

Here’s what I did:

$ ./configure --target=i386-mingw32
(seemed to configure OK)
$ make

Here was the result:

gc.c: In function 'Init_stack’
gc.c:1425: error: storage size of ‘rlim’ isn’t known
gc.c:1427: error: ‘RLIMIT_STACK’ undeclared (first use in this function)

Do I need more/different arguments to configure?

Phil

Hi,

At Thu, 18 Mar 2004 05:04:34 +0900,
Phil Tomson wrote in [ruby-talk:95143]:

$ ./configure --target=i386-mingw32

$ ./configure CFLAGS=‘gcc -mno-cygwin’

···


Nobu Nakada

In article 200403172100.i2HL0Zo1031498@sharui.nakada.niregi.kanuma.tochigi.jp,

Hi,

At Thu, 18 Mar 2004 05:04:34 +0900,
Phil Tomson wrote in [ruby-talk:95143]:

$ ./configure --target=i386-mingw32

$ ./configure CFLAGS=‘gcc -mno-cygwin’

I tried your suggestion:

$ ./configure CFLAGS=‘gcc -mno-cygwin’
checking build system type… i686-pc-cygwin
checking host system type… i686-pc-cygwin
checking target system type… i686-pc-cygwin ← this is not correct!
checking for gcc… gcc
checking for C compiler default output file name… configure: error: C
compiler
cannot create executables
See `config.log’ for more details.

I tried this next:

$ ./configure CFLAGS=‘-mno-cygwin’ --target=i386-mingw32

$ make
gcc -mno-cygwin -I. -I. -c array.c
gcc -mno-cygwin -I. -I. -c bignum.c
bignum.c:18:20: ieeefp.h: No such file or directory
make: *** [bignum.o] Error 1

So it was even worse with -mno-cygwin…

Phil

···

nobu.nokada@softhome.net wrote:

In Message-Id: 200403172100.i2HL0Zo1031498@sharui.nakada.niregi.kanuma.tochigi.jp
nobu.nokada@softhome.net writes:

$ ./configure --target=i386-mingw32

$ ./configure CFLAGS=‘gcc -mno-cygwin’

Should it be “CC=‘gcc -mno-cygwin’” or “CFLAGS=‘-mno-cygwin’”?

···


kjana@dm4lab.to March 18, 2004
Every body’s business is nobody’s business.

Hi,

At Thu, 18 Mar 2004 06:54:34 +0900,
Phil Tomson wrote in [ruby-talk:95151]:

I tried your suggestion:

$ ./configure CFLAGS=‘gcc -mno-cygwin’
checking build system type… i686-pc-cygwin
checking host system type… i686-pc-cygwin
checking target system type… i686-pc-cygwin ← this is not correct!

Don’t mind it. configure checks for mingw32 environment later.

checking for gcc… gcc
checking for C compiler default output file name… configure: error: C
compiler
cannot create executables
See `config.log’ for more details.

Seems you haven’t installed mingw package. Check config.log.

···


Nobu Nakada

Hi,

At Thu, 18 Mar 2004 21:12:04 +0900,
YANAGAWA Kazuhisa wrote in [ruby-talk:95219]:

$ ./configure --target=i386-mingw32

$ ./configure CFLAGS=‘gcc -mno-cygwin’

Should it be “CC=‘gcc -mno-cygwin’” or “CFLAGS=‘-mno-cygwin’”?

Ooops, you’re right. Thank you.

···


Nobu Nakada

In article 200403172219.i2HMJk2B006552@sharui.nakada.niregi.kanuma.tochigi.jp,

···

nobu.nokada@softhome.net wrote:

Hi,

At Thu, 18 Mar 2004 06:54:34 +0900,
Phil Tomson wrote in [ruby-talk:95151]:

I tried your suggestion:

$ ./configure CFLAGS=‘gcc -mno-cygwin’
checking build system type… i686-pc-cygwin
checking host system type… i686-pc-cygwin
checking target system type… i686-pc-cygwin ← this is not correct!

Don’t mind it. configure checks for mingw32 environment later.

checking for gcc… gcc
checking for C compiler default output file name… configure: error: C
compiler
cannot create executables
See `config.log’ for more details.

Seems you haven’t installed mingw package. Check config.log.

I have it installed under cygwin - the cygwin package manager shows it
installed, but when I looked in config.log it shows:

checking for mingw32 environment: no

I do find the mingw32 headers, though.

…so looks like I need to install it seperately.

Phil