SDL in cygwin fails to ./configure

Hello,

I’m trying to compile SDL from source in a cygwin bash shell, but I
notice that nothing is found and the ./configure fails with the last
messages :

checking for free… no
checking for getenv… no
checking for putenv… no
checking for unsetenv… no
checking for qsort… no
checking for abs… no
checking for bcopy… no
checking for memset… no
checking for memcpy… no
checking for memmove… no
checking for strlen… no
checking for strlcpy… no
checking for strlcat… no
checking for strdup… no
checking for _strrev… no
checking for _strupr… no
checking for _strlwr… no
checking for strchr… no
checking for strrchr… no
checking for strstr… no
checking for itoa… no
checking for _ltoa… no
checking for _uitoa… no
checking for _ultoa… no
checking for strtol… no
checking for strtoul… no
checking for _i64toa… no
checking for _ui64toa… no
checking for strtoll… no
checking for strtoull… no
checking for atoi… no
checking for atof… no
checking for strcmp… no
checking for strncmp… no
checking for _stricmp… no
checking for strcasecmp… no
checking for _strnicmp… no
checking for strncasecmp… no
checking for sscanf… no
checking for snprintf… no
checking for vsnprintf… no
checking for iconv… no
checking for sigaction… no
checking for setjmp… no
checking for nanosleep… no
checking for libiconv_open in -liconv… no
checking for pow in -lm… (cached) no
checking Win32 compiler… no
configure: error:
*** Your compiler (gcc) does not produce Win32 executables!

Do I miss something?

Here’s the complete config.log : http://markand.malikania.fr/config.log

Cheers,–
David Demelier

This might explain it:

"gcc: The -mno-cygwin flag has been removed; use a
 mingw-targeted cross-compiler."

Mixing new compilers and old build scripts, maybe…? (Haven’t seen this one
myself.)On Monday 29 August 2011, at 21.41.10, David Demelier <demelier.david at gmail.com> wrote:

Hello,

I’m trying to compile SDL from source in a cygwin bash shell, but I
notice that nothing is found and the ./configure fails with the last
messages :

checking for free… no
checking for getenv… no
checking for putenv… no
checking for unsetenv… no
checking for qsort… no
checking for abs… no
checking for bcopy… no
checking for memset… no
checking for memcpy… no
checking for memmove… no
checking for strlen… no
checking for strlcpy… no
checking for strlcat… no
checking for strdup… no
checking for _strrev… no
checking for _strupr… no
checking for _strlwr… no
checking for strchr… no
checking for strrchr… no
checking for strstr… no
checking for itoa… no
checking for _ltoa… no
checking for _uitoa… no
checking for _ultoa… no
checking for strtol… no
checking for strtoul… no
checking for _i64toa… no
checking for _ui64toa… no
checking for strtoll… no
checking for strtoull… no
checking for atoi… no
checking for atof… no
checking for strcmp… no
checking for strncmp… no
checking for _stricmp… no
checking for strcasecmp… no
checking for _strnicmp… no
checking for strncasecmp… no
checking for sscanf… no
checking for snprintf… no
checking for vsnprintf… no
checking for iconv… no
checking for sigaction… no
checking for setjmp… no
checking for nanosleep… no
checking for libiconv_open in -liconv… no
checking for pow in -lm… (cached) no
checking Win32 compiler… no
configure: error:
*** Your compiler (gcc) does not produce Win32 executables!

Do I miss something?

Here’s the complete config.log : http://markand.malikania.fr/config.log

Cheers,


//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://consulting.olofson.net http://olofsonarcade.com |
’---------------------------------------------------------------------’

This might explain it:

“gcc: The -mno-cygwin flag has been removed; use a
mingw-targeted cross-compiler.”

Mixing new compilers and old build scripts, maybe…? (Haven’t seen this one
myself.)

Hello,

I’m trying to compile SDL from source in a cygwin bash shell, but I
notice that nothing is found and the ./configure fails with the last
messages :

checking for free… no
checking for getenv… no
checking for putenv… no
checking for unsetenv… no
checking for qsort… no
checking for abs… no
checking for bcopy… no
checking for memset… no
checking for memcpy… no
checking for memmove… no
checking for strlen… no
checking for strlcpy… no
checking for strlcat… no
checking for strdup… no
checking for _strrev… no
checking for _strupr… no
checking for _strlwr… no
checking for strchr… no
checking for strrchr… no
checking for strstr… no
checking for itoa… no
checking for _ltoa… no
checking for _uitoa… no
checking for _ultoa… no
checking for strtol… no
checking for strtoul… no
checking for _i64toa… no
checking for _ui64toa… no
checking for strtoll… no
checking for strtoull… no
checking for atoi… no
checking for atof… no
checking for strcmp… no
checking for strncmp… no
checking for _stricmp… no
checking for strcasecmp… no
checking for _strnicmp… no
checking for strncasecmp… no
checking for sscanf… no
checking for snprintf… no
checking for vsnprintf… no
checking for iconv… no
checking for sigaction… no
checking for setjmp… no
checking for nanosleep… no
checking for libiconv_open in -liconv… no
checking for pow in -lm… (cached) no
checking Win32 compiler… no
configure: error:
*** Your compiler (gcc) does not produce Win32 executables!

Do I miss something?

Here’s the complete config.log : http://markand.malikania.fr/config.log

Cheers,

Yes that’s weird but I deinstalled mingw… maybe there is still some
files somewhere I don’t know …On 29/08/2011 21:51, David Olofson wrote:

On Monday 29 August 2011, at 21.41.10, David Demelier <@David_Demelier> wrote:


David Demelier

I’m trying to compile SDL from source in a cygwin bash shell, but I
notice that nothing is found and the ./configure fails with the last
messages :
[snip]
configure: error:
*** Your compiler (gcc) does not produce Win32 executables!

Do I miss something?

Cygwin’s gcc no longer supports the -mno-cygwin flag, which we use to
avoid the dependency on Cygwin’s runtime.

These are the options, as far as I can tell:

  • I suppose if you get desperate, you could remove the -mno-cygwin stuff
    from configure.in, and re-run autogen.sh. This should leave you with a
    configure script that gets past that error, but I can’t say if you’ll
    make it through the build after that.

  • (re)run Cygwin’s setup.exe, and install the gcc 3.x packages (instead
    of gcc4, or maybe along side of it?), as these supposedly still support
    the -mno-cygwin flag.

  • Install the mingw64-i686-* packages (this is currently gcc 4.5.3),
    which can definitely live along side the gcc4 packages. Note that there
    are several things called “mingw” in the package manager, so be
    careful what you install. mingw64, despite the name, handles 32-bit
    Windows if you install the i686 packages (there are also x86_64 packages
    for Win64 in there, but I haven’t tried these). The i686 compiler, at
    least, runs on win32…it’s possible the x86_64 does too and only
    outputs win64 binaries. You’ll have to run the configure script
    something like this…

    CC=i686-w64-mingw32-gcc ./configure

…and then run “make” like you always would.

I don’t have much experience with this, so assume all this information
is wrong until you’ve verified it yourself.

–ryan.

Just for the record, I cross-compile all my binaries using mingw64 from Linux, it works nicely, and I produce both win32 and win64 binaries this way with success.

In the hope that these scripts are useful, these are my main scripts for using mingw64 on Linux, installed to /opt/i686-w64-mingw32, these scripts may or may not be well designed and certainly were
not designed with Windows in mind, make what you will of it, but they work for me on Linux.

I’m not sure how to adapt these to .bat files or how to run them through bash on msys, so your mileage may vary, also the PREFIX obviously needs adjusting for wherever you installed mingw64, the
mingw32-opt-configure.sh script in particular may not even be needed (and if it is needed, the --build= part is probably quite wrong).

mingw32-opt-configure.sh: (use instead of ./configure)
#!/bin/sh
TARGET=i686-w64-mingw32
PREFIX=/opt/$TARGET
#PATH="$PREFIX/bin:$PREFIX/$TARGET/bin:$PATH"
#export PATH
cache=mingw64-config.cache
sh configure --cache-file="$cache"
–target=$TARGET --host=$TARGET --build=i386-linux
$*
status=$?
rm -f "$cache"
exit $status

mingw32-opt-make.sh: (use instead of make, note this hacks a few things to make it work with some packages that use only makefiles without configure, generally harmless)
#!/bin/sh
TARGET=i686-w64-mingw32
PREFIX=/opt/$TARGET
prefix=/opt/$TARGET
#PATH="$PREFIX/bin:$PREFIX/$TARGET/bin:$PATH"
export prefix
export PREFIX
export TARGET
#export PATH
exec make CC=$TARGET-gcc CXX=$TARGET-g++ SDL_CONFIG=$PREFIX/bin/$TARGET-sdl-config WINDRES=$TARGET-windres $*On 09/07/2011 11:06 PM, Ryan C. Gordon wrote:

I’m trying to compile SDL from source in a cygwin bash shell, but I
notice that nothing is found and the ./configure fails with the last
messages :
[snip]
configure: error:
*** Your compiler (gcc) does not produce Win32 executables!

Do I miss something?

Cygwin’s gcc no longer supports the -mno-cygwin flag, which we use to avoid the dependency on Cygwin’s runtime.

These are the options, as far as I can tell:

  • I suppose if you get desperate, you could remove the -mno-cygwin stuff from configure.in, and re-run autogen.sh. This should leave you with a configure script that gets past that error, but I can’t
    say if you’ll make it through the build after that.
  • (re)run Cygwin’s setup.exe, and install the gcc 3.x packages (instead of gcc4, or maybe along side of it?), as these supposedly still support the -mno-cygwin flag.
  • Install the mingw64-i686-* packages (this is currently gcc 4.5.3), which can definitely live along side the gcc4 packages. Note that there are several things called “mingw” in the package manager,
    so be careful what you install. mingw64, despite the name, handles 32-bit Windows if you install the i686 packages (there are also x86_64 packages for Win64 in there, but I haven’t tried these). The
    i686 compiler, at least, runs on win32…it’s possible the x86_64 does too and only outputs win64 binaries. You’ll have to run the configure script something like this…

CC=i686-w64-mingw32-gcc ./configure

…and then run “make” like you always would.

I don’t have much experience with this, so assume all this information is wrong until you’ve verified it yourself.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

Just for the record, I cross-compile all my binaries using mingw64 from
Linux, it works nicely, and I produce both win32 and win64 binaries this
way with success.

In the hope that these scripts are useful, these are my main scripts for
using mingw64 on Linux, installed to /opt/i686-w64-mingw32, these
scripts may or may not be well designed and certainly were not designed
with Windows in mind, make what you will of it, but they work for me on
Linux.

I’m not sure how to adapt these to .bat files or how to run them through
bash on msys, so your mileage may vary, also the PREFIX obviously needs
adjusting for wherever you installed mingw64, the
mingw32-opt-configure.sh script in particular may not even be needed
(and if it is needed, the --build= part is probably quite wrong).

mingw32-opt-configure.sh: (use instead of ./configure)
#!/bin/sh
TARGET=i686-w64-mingw32
PREFIX=/opt/$TARGET
#PATH="$PREFIX/bin:$PREFIX/$TARGET/bin:$PATH"
#export PATH
cache=mingw64-config.cache
sh configure --cache-file="$cache"
–target=$TARGET --host=$TARGET --build=i386-linux
$*
status=$?
rm -f "$cache"
exit $status

mingw32-opt-make.sh: (use instead of make, note this hacks a few things
to make it work with some packages that use only makefiles without
configure, generally harmless)
#!/bin/sh
TARGET=i686-w64-mingw32
PREFIX=/opt/$TARGET
prefix=/opt/$TARGET
#PATH="$PREFIX/bin:$PREFIX/$TARGET/bin:$PATH"
export prefix
export PREFIX
export TARGET
#export PATH
exec make CC=$TARGET-gcc CXX=$TARGET-g++
SDL_CONFIG=$PREFIX/bin/$TARGET-sdl-config WINDRES=$TARGET-windres $*

I’m trying to compile SDL from source in a cygwin bash shell, but I
notice that nothing is found and the ./configure fails with the last
messages :
[snip]
configure: error:
*** Your compiler (gcc) does not produce Win32 executables!

Do I miss something?

Cygwin’s gcc no longer supports the -mno-cygwin flag, which we use to
avoid the dependency on Cygwin’s runtime.

These are the options, as far as I can tell:

  • I suppose if you get desperate, you could remove the -mno-cygwin
    stuff from configure.in, and re-run autogen.sh. This should leave you
    with a configure script that gets past that error, but I can’t
    say if you’ll make it through the build after that.
  • (re)run Cygwin’s setup.exe, and install the gcc 3.x packages
    (instead of gcc4, or maybe along side of it?), as these supposedly
    still support the -mno-cygwin flag.
  • Install the mingw64-i686-* packages (this is currently gcc 4.5.3),
    which can definitely live along side the gcc4 packages. Note that
    there are several things called “mingw” in the package manager,
    so be careful what you install. mingw64, despite the name, handles
    32-bit Windows if you install the i686 packages (there are also x86_64
    packages for Win64 in there, but I haven’t tried these). The
    i686 compiler, at least, runs on win32…it’s possible the x86_64 does
    too and only outputs win64 binaries. You’ll have to run the configure
    script something like this…

CC=i686-w64-mingw32-gcc ./configure

…and then run “make” like you always would.

I don’t have much experience with this, so assume all this information
is wrong until you’ve verified it yourself.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

But I think you needed to install SDL twice isn’t it ? One for the linux
host and one cross compiled for mingw cross-compile tools right?

Cheers,On 08/09/2011 11:29, Forest Hale wrote:

On 09/07/2011 11:06 PM, Ryan C. Gordon wrote:


David Demelier

You may be thinking about this incorrectly - when doing a cross-compile you must make sure that the appropriately crafted cross-compile scripts are used for everything, for example I had to build SDL
in the cross-compile target and then copy sdl-config to i686-w64-mingw32-sdl-config in the appropriate bin directory and use SDL_CONFIG=i686-w64-mingw32-sdl-config when configuring/making stuff to
make it use the right one.

You do not want a conflict between sdl-config on the host and the target, it won’t work (they use different CFLAGS and LIBS and such, which is the whole point).On 09/11/2011 11:19 AM, David Demelier wrote:

But I think you needed to install SDL twice isn’t it ? One for the linux host and one cross compiled for mingw cross-compile tools right?

Cheers,


LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier