Libsdl build fails w/ cygwin 1.7-GCC can't build Win32 execs

Hello,

First time building on Cygwin. The version I’m using is v1.7 (fresh installs). GCC version is 4.3.4 20090804 (release) 1.
FWIW, I’m able to build other (open source) projects using GNU autotools. Cygwin doesn’t seem to distribute v1.5 anymore, except in support of Win95/98/ME.

I’ve tried this on both Windows XP 32-bit and Vista 64-bit. The build fails at the configure step with the error: “Your compiler (gcc) does not produce Win32 executables!”

Any pointers?
Thanks.

Full output of configure:

Code:
checking for gcc… gcc
checking for C compiler default output file name… a.exe
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables… .exe
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking how to run the C preprocessor… gcc -E
checking for grep that handles long lines and -e… /usr/bin/grep
checking for egrep… /usr/bin/grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking minix/config.h usability… no
checking minix/config.h presence… no
checking for minix/config.h… no
checking whether it is safe to define EXTENSIONS… yes
checking build system type… i686-pc-cygwin
checking host system type… i686-pc-cygwin
checking for a sed that does not truncate output… /usr/bin/sed
checking for fgrep… /usr/bin/grep -F
checking for ld used by gcc… /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld… yes
checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface… BSD nm
checking whether ln -s works… yes
checking the maximum length of command line arguments… 8192
checking whether the shell understands some XSI constructs… yes
checking whether the shell understands “+=”… yes
checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object files… -r
checking for objdump… objdump
checking how to recognize dependent libraries… pass_all
checking for ar… ar
checking for strip… strip
checking for ranlib… ranlib
checking command to parse /usr/bin/nm -B output from gcc object… ok
checking for dlfcn.h… yes
checking for as… as
checking for dlltool… dlltool
checking for objdump… (cached) objdump
checking for objdir… .libs
checking if gcc supports -fno-rtti -fno-exceptions… no
checking for gcc option to produce PIC… -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works… yes
checking if gcc static flag -static works… no
checking if gcc supports -c -o file.o… yes
checking if gcc supports -c -o file.o… (cached) yes
checking whether the gcc linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared libraries… yes
checking whether -lc should be explicitly linked in… yes
checking dynamic linker characteristics… Win32 ld.exe
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking whether byte ordering is bigendian… no
checking for gcc… (cached) gcc
checking whether we are using the GNU C compiler… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for gcc option to accept ISO C89… (cached) none needed
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking whether we are using the GNU C++ compiler… (cached) yes
checking whether g++ accepts -g… (cached) yes
checking how to run the C++ preprocessor… g++ -E
checking for ld used by g++… /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld… yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared libraries… yes
checking for g++ option to produce PIC… -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works… yes
checking if g++ static flag -static works… no
checking if g++ supports -c -o file.o… yes
checking if g++ supports -c -o file.o… (cached) yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared libraries… yes
checking dynamic linker characteristics… Win32 ld.exe
checking how to hardcode library paths into programs… immediate
checking for a BSD-compatible install… /usr/bin/install -c
checking whether make sets $(MAKE)… yes
checking for windres… windres
checking for an ANSI C-conforming const… no
checking for inline… no
checking for working volatile… no
checking for ANSI C header files… (cached) yes
checking for sys/types.h… (cached) yes
checking stdio.h usability… no
checking stdio.h presence… no
checking for stdio.h… no
checking for stdlib.h… (cached) yes
checking stddef.h usability… no
checking stddef.h presence… no
checking for stddef.h… no
checking stdarg.h usability… no
checking stdarg.h presence… no
checking for stdarg.h… no
checking malloc.h usability… no
checking malloc.h presence… no
checking for malloc.h… no
checking for memory.h… (cached) yes
checking for string.h… (cached) yes
checking for strings.h… (cached) yes
checking for inttypes.h… (cached) yes
checking for stdint.h… (cached) yes
checking ctype.h usability… no
checking ctype.h presence… no
checking for ctype.h… no
checking math.h usability… no
checking math.h presence… no
checking for math.h… no
checking iconv.h usability… no
checking iconv.h presence… no
checking for iconv.h… no
checking signal.h usability… no
checking signal.h presence… no
checking for signal.h… no
checking for size_t… no
checking for int64_t… no
checking for working memcmp… no
checking for working strtod… no
checking for pow… no
checking for pow in -lm… no
configure: WARNING: cannot find library containing definition of pow
checking for mprotect… no
checking for malloc… no
checking for calloc… no
checking for realloc… no
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!

We had similar issues at work. Cygwin 1.7 doesn’t seem to work nicely with GCC 4. You should try with version 3.

Thanks. I should’ve mentioned this as part of the question. It built fine with gcc-3.

I was trying to get gcc-4 to work as other 3rd party stuff that my project uses and my own code rely on gcc-4 features. I was trying to keep the toolchain the same to avoid issues that may arise from using different compilers/linkers, etc.

Doing a further search (after having spent several hours last night) using slightly different terms (native win32 rather than win32 executables) yields this relevant result:

http://www.cygwin.com/ml/cygwin/2009-08/msg00280.html>

Re: real native win32 binaries with gcc 4.x

* From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
* To: cygwin at cygwin dot com
* Date: Mon, 10 Aug 2009 00:22:35 -0400
* Subject: Re: real native win32 binaries with gcc 4.x
* References: <h5nd3s$4eh$1 at ger.gmane.org>
* Reply-to: cygwin at cygwin dot com

On 08/09/2009 04:47 PM, Thomas Steinbach wrote:

Hello,

is there meanwhile a solution for compiling real native
win32 binaries with gcc 4.3.x?


I mean something like the "-mno-cygwin" linker switch
within the gcc 3.x compiler collection/tools


Or how does a makefile looks like, if I want to compile
real native win32 executables with gcc >= 4.3.x?


Does anybody has a small example makefile/prog, which
demonstrates the use of the switches with gcc 4.x?

The cross-compiler is not available as yet. It’s still in the works.
In the meantime, you can use ‘gcc-3’ and ‘-mno-cygwin’.


Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746


A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

Hi,

why don’t you use mingw/msys? They have gcc 4.4.0 (and their own share
of problems).Am 19.01.2010 22:39, schrieb telluriuminc:

Doing a further search (after having spent several hours last night)
using slightly different terms (native win32 rather than win32
executables) yields this relevant result:

http://www.cygwin.com/ml/cygwin/2009-08/msg00280.html


Christoph Nelles

E-Mail : @Christoph_Nelles
Jabber : eazrael at evilazrael.net ICQ : 78819723

PGP-Key : ID 0x424FB55B on subkeys.pgp.net
or http://evilazrael.net/pgp.txt

Or better yet. Assuming that you have broadband connection, just download
the Windows SDK + Visual Studio Express

http://msdn.microsoft.com/en-us/windows/bb980924.aspx
http://www.microsoft.com/express/Windows/--
Paulo

On Tue, Jan 19, 2010 at 10:47 PM, Christoph Nelles <evilazrael at evilazrael.de wrote:

Hi,

why don’t you use mingw/msys? They have gcc 4.4.0 (and their own share
of problems).

Am 19.01.2010 22:39, schrieb telluriuminc:

Doing a further search (after having spent several hours last night)
using slightly different terms (native win32 rather than win32
executables) yields this relevant result:

http://www.cygwin.com/ml/cygwin/2009-08/msg00280.html


Christoph Nelles

E-Mail : evilazrael at evilazrael.de
Jabber : eazrael at evilazrael.net ICQ : 78819723

PGP-Key : ID 0x424FB55B on subkeys.pgp.net
or http://evilazrael.net/pgp.txt


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