Unable to compile SDL2 on Cygwin

So, it looks like the configure script is grabbing paths from both the
mingw and cygwin/posix/gnu compilers (config.log mentions the
/usr/local/include/mingw path, Makefile is just referencing gcc and not
mingw-i686-gcc). Try uninstalling all of your mingw and cygwin
gcc/g++/gcc-core/etc., complete that uninstallation, then start the package
installer again and just grab gcc-4.7.x and g+±4.7.x (it’ll grab the
dependencies automagically for you). That will rebuild the gcc/g++ links
to the proper compiler. mingw and cygwin are quite incompatible, being
that mingw does not use posix, and if you try and mix them (like what’s
happening in this case, from the best I can assume), the compiler won’t be
able to sort out the library dependencies properly. If you want to keep
mingw-i686 compile tools, then you’re going to have to specify the compiler
in your ./configure call like this:

$ export TOOLCHAIN_DIR=/usr/x86_64-pc-cygwin/bin
$ …/configure CC=gcc.exe CXX=g++.exe LD=$TOOLCHAIN_DIR/ld.exe
AR=$TOOLCHAIN_DIR/ar.exe AS=$TOOLCHAIN_DIR/as.exe NM=$TOOLCHAIN_DIR/nm.exe
STRIP=$TOOLCHAIN_DIR/strip.exe RANLIB=$TOOLCHAIN_DIR/ranlib.exe
DLLTOOL=$TOOLCHAIN_DIR/dlltool.exe OBJDUMP=$TOOLCHAIN_DIR/objdump.exe

You may need to specify RESCOMP and find the path to windres.exe for cygwin
(if this exists, I can’t recall, and I’m in linux right now).
Your TOOLCHAIN_DIR may be different than the one I am specifying, so keep
that in mind. Check the /usr/ directory to see if you have a different
folder.

Let me know how this goes,
-AlexOn Tue, Jan 7, 2014 at 3:01 PM, phil12d3 wrote:

The output of cygcheck -c is:

https://dl.dropboxusercontent.com/u/86433876/cygwin/cygcheck.txt

MrOzBarry wrote:

What is the output of cygcheck -c from the terminal emulator? That
will list all installed packages.

Going back to my post that you linked to at the beginning, there was one
strange issue I was having with my old cygwin install; I had both the mingw
and regular gcc built utils installed, which was a problem because some
tools had the same name and were linking to both the cygwin and mingw
runtimes, meaning the compiling had some horribly bizarre errors.

If you are using the mingw toolchain, I might suggest just sticking to
mingw/msys. Not as robust (seriously, I love the cygwin terminal
emulator!), but it will work.

Now, if you’re determined to use the cygwin runtime, you should probably
clear out all the mingw build tools, and make sure your autotools and gcc
versions are all up to date. If you had installed the mingw build tools,
try uninstalling all of your compiler tools (cygwin/gnu and mingw), then
run the setup utility a second time for the cygwin/gnu so it creates all
the appropriate links automatically (otherwise it may be a pain).

Alberto made a good point that a clean install made it super easy to
build, so that may be a good option. You mentioned trying this already
with the same issue, and that seems strange, as Alberto and myself both
tried building from a clean install, and were successful, which means
either you are installing some sort of conflicting packages (like I
mentioned, possibly compiler conflicts?), or for some reason your installs
are being corrupted.

If you want to avoid a clean install, at the very least, try just wiping
out the SDL directory and re-extract/clone it and start building fresh -
when I used ./autogen in my previous/failed attempts, that seemed to cause
more trouble than it’s worth.

On Mon, Jan 6, 2014 at 7:22 PM, phil12d3 <> wrote:

Quote:

Sorry for the late reply. The files are shared from the below links:

https://dl.dropboxusercontent.com/u/86433876/cygwin/configure.in
https://dl.dropboxusercontent.com/u/86433876/cygwin/Makefile.in
https://dl.dropboxusercontent.com/u/86433876/cygwin/setup.ini

The below zip files contains my makefile and content just after building
and encountering the error:

https://dl.dropboxusercontent.com/u/86433876/cygwin/build.zip

Please let me know if you need any others.

Another side note, I’ve tried to install SDL2 on Cygwin64 on my machine at
work and I was previously getting the same error as I was at home. This
morning I got the latest code and built as MrOzBarry suggested and it
actually worked this time. So, i’m also quite certain that reinstalling
windows is not the way to go.

Many thanks for all your help.


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

Yep, if you want to troubleshoot anything on a computer, you need to have
something known good to work from. If it had been a fresh install of the
most current library and compiler that did not work as we thought before,
the next step would be to wipe out the operating system and then reinstall
those things again. This is a good thread for anyone that wants to fix a
software or hardware issue. But with the hardware you replace the software
portion like drivers or the program , if it fails then hardware portion
with a known good part, failing that its a wipe of the hard drive and
checking for corruption on it and reinstalling everything with the known
good part, failing that you know its the motherboard or socket connectors
or something like that . I know now I’m off topic now but in my mind it’s
all the same.On Jan 7, 2014 2:02 PM, “phil12d3” wrote:

The output of cygcheck -c is:

https://dl.dropboxusercontent.com/u/86433876/cygwin/cygcheck.txt

MrOzBarry wrote:

What is the output of cygcheck -c from the terminal emulator? That will
list all installed packages.

Going back to my post that you linked to at the beginning, there was one
strange issue I was having with my old cygwin install; I had both the mingw
and regular gcc built utils installed, which was a problem because some
tools had the same name and were linking to both the cygwin and mingw
runtimes, meaning the compiling had some horribly bizarre errors.

If you are using the mingw toolchain, I might suggest just sticking to
mingw/msys. Not as robust (seriously, I love the cygwin terminal
emulator!), but it will work.

Now, if you’re determined to use the cygwin runtime, you should probably
clear out all the mingw build tools, and make sure your autotools and gcc
versions are all up to date. If you had installed the mingw build tools,
try uninstalling all of your compiler tools (cygwin/gnu and mingw), then
run the setup utility a second time for the cygwin/gnu so it creates all
the appropriate links automatically (otherwise it may be a pain).

Alberto made a good point that a clean install made it super easy to
build, so that may be a good option. You mentioned trying this already
with the same issue, and that seems strange, as Alberto and myself both
tried building from a clean install, and were successful, which means
either you are installing some sort of conflicting packages (like I
mentioned, possibly compiler conflicts?), or for some reason your installs
are being corrupted.

If you want to avoid a clean install, at the very least, try just wiping
out the SDL directory and re-extract/clone it and start building fresh -
when I used ./autogen in my previous/failed attempts, that seemed to cause
more trouble than it’s worth.

On Mon, Jan 6, 2014 at 7:22 PM, phil12d3 <> wrote:

Quote:

Sorry for the late reply. The files are shared from the below links:

https://dl.dropboxusercontent.com/u/86433876/cygwin/configure.in
https://dl.dropboxusercontent.com/u/86433876/cygwin/Makefile.in
https://dl.dropboxusercontent.com/u/86433876/cygwin/setup.ini

The below zip files contains my makefile and content just after building
and encountering the error:

https://dl.dropboxusercontent.com/u/86433876/cygwin/build.zip

Please let me know if you need any others.

Another side note, I’ve tried to install SDL2 on Cygwin64 on my machine at
work and I was previously getting the same error as I was at home. This
morning I got the latest code and built as MrOzBarry suggested and it
actually worked this time. So, i’m also quite certain that reinstalling
windows is not the way to go.

Many thanks for all your help.


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

Manard, it’s already been evaluated that it has nothing to do with Windows
and more to do with what compiler is being used in Cygwin. It also has
absolutely nothing to do with hardware.On Tue, Jan 7, 2014 at 5:02 PM, R Manard wrote:

Yep, if you want to troubleshoot anything on a computer, you need to have
something known good to work from. If it had been a fresh install of the
most current library and compiler that did not work as we thought before,
the next step would be to wipe out the operating system and then reinstall
those things again. This is a good thread for anyone that wants to fix a
software or hardware issue. But with the hardware you replace the software
portion like drivers or the program , if it fails then hardware portion
with a known good part, failing that its a wipe of the hard drive and
checking for corruption on it and reinstalling everything with the known
good part, failing that you know its the motherboard or socket connectors
or something like that . I know now I’m off topic now but in my mind it’s
all the same.
On Jan 7, 2014 2:02 PM, “phil12d3” wrote:

The output of cygcheck -c is:

https://dl.dropboxusercontent.com/u/86433876/cygwin/cygcheck.txt

MrOzBarry wrote:

What is the output of cygcheck -c from the terminal emulator? That
will list all installed packages.

Going back to my post that you linked to at the beginning, there was one
strange issue I was having with my old cygwin install; I had both the mingw
and regular gcc built utils installed, which was a problem because some
tools had the same name and were linking to both the cygwin and mingw
runtimes, meaning the compiling had some horribly bizarre errors.

If you are using the mingw toolchain, I might suggest just sticking to
mingw/msys. Not as robust (seriously, I love the cygwin terminal
emulator!), but it will work.

Now, if you’re determined to use the cygwin runtime, you should probably
clear out all the mingw build tools, and make sure your autotools and gcc
versions are all up to date. If you had installed the mingw build tools,
try uninstalling all of your compiler tools (cygwin/gnu and mingw), then
run the setup utility a second time for the cygwin/gnu so it creates all
the appropriate links automatically (otherwise it may be a pain).

Alberto made a good point that a clean install made it super easy to
build, so that may be a good option. You mentioned trying this already
with the same issue, and that seems strange, as Alberto and myself both
tried building from a clean install, and were successful, which means
either you are installing some sort of conflicting packages (like I
mentioned, possibly compiler conflicts?), or for some reason your installs
are being corrupted.

If you want to avoid a clean install, at the very least, try just wiping
out the SDL directory and re-extract/clone it and start building fresh -
when I used ./autogen in my previous/failed attempts, that seemed to cause
more trouble than it’s worth.

On Mon, Jan 6, 2014 at 7:22 PM, phil12d3 <> wrote:

Quote:

Sorry for the late reply. The files are shared from the below links:

https://dl.dropboxusercontent.com/u/86433876/cygwin/configure.in
https://dl.dropboxusercontent.com/u/86433876/cygwin/Makefile.in
https://dl.dropboxusercontent.com/u/86433876/cygwin/setup.ini

The below zip files contains my makefile and content just after building
and encountering the error:

https://dl.dropboxusercontent.com/u/86433876/cygwin/build.zip

Please let me know if you need any others.

Another side note, I’ve tried to install SDL2 on Cygwin64 on my machine
at work and I was previously getting the same error as I was at home. This
morning I got the latest code and built as MrOzBarry suggested and it
actually worked this time. So, i’m also quite certain that reinstalling
windows is not the way to go.

Many thanks for all your help.


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


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

Yes, that’s not what I was saying, you need to reread my statement figured
out I think. That’s okay sometimes I don’t get it when I read something too.On Jan 7, 2014 5:49 PM, “Alberto Corona” wrote:

Manard, it’s already been evaluated that it has nothing to do with Windows
and more to do with what compiler is being used in Cygwin. It also has
absolutely nothing to do with hardware.

On Tue, Jan 7, 2014 at 5:02 PM, R Manard <@R_Manard> wrote:

Yep, if you want to troubleshoot anything on a computer, you need to have
something known good to work from. If it had been a fresh install of the
most current library and compiler that did not work as we thought before,
the next step would be to wipe out the operating system and then reinstall
those things again. This is a good thread for anyone that wants to fix a
software or hardware issue. But with the hardware you replace the software
portion like drivers or the program , if it fails then hardware portion
with a known good part, failing that its a wipe of the hard drive and
checking for corruption on it and reinstalling everything with the known
good part, failing that you know its the motherboard or socket connectors
or something like that . I know now I’m off topic now but in my mind it’s
all the same.
On Jan 7, 2014 2:02 PM, “phil12d3” wrote:

The output of cygcheck -c is:

https://dl.dropboxusercontent.com/u/86433876/cygwin/cygcheck.txt

MrOzBarry wrote:

What is the output of cygcheck -c from the terminal emulator? That
will list all installed packages.

Going back to my post that you linked to at the beginning, there was one
strange issue I was having with my old cygwin install; I had both the mingw
and regular gcc built utils installed, which was a problem because some
tools had the same name and were linking to both the cygwin and mingw
runtimes, meaning the compiling had some horribly bizarre errors.

If you are using the mingw toolchain, I might suggest just sticking to
mingw/msys. Not as robust (seriously, I love the cygwin terminal
emulator!), but it will work.

Now, if you’re determined to use the cygwin runtime, you should probably
clear out all the mingw build tools, and make sure your autotools and gcc
versions are all up to date. If you had installed the mingw build tools,
try uninstalling all of your compiler tools (cygwin/gnu and mingw), then
run the setup utility a second time for the cygwin/gnu so it creates all
the appropriate links automatically (otherwise it may be a pain).

Alberto made a good point that a clean install made it super easy to
build, so that may be a good option. You mentioned trying this already
with the same issue, and that seems strange, as Alberto and myself both
tried building from a clean install, and were successful, which means
either you are installing some sort of conflicting packages (like I
mentioned, possibly compiler conflicts?), or for some reason your installs
are being corrupted.

If you want to avoid a clean install, at the very least, try just wiping
out the SDL directory and re-extract/clone it and start building fresh -
when I used ./autogen in my previous/failed attempts, that seemed to cause
more trouble than it’s worth.

On Mon, Jan 6, 2014 at 7:22 PM, phil12d3 <> wrote:

Quote:

Sorry for the late reply. The files are shared from the below links:

https://dl.dropboxusercontent.com/u/86433876/cygwin/configure.in
https://dl.dropboxusercontent.com/u/86433876/cygwin/Makefile.in
https://dl.dropboxusercontent.com/u/86433876/cygwin/setup.ini

The below zip files contains my makefile and content just after building
and encountering the error:

https://dl.dropboxusercontent.com/u/86433876/cygwin/build.zip

Please let me know if you need any others.

Another side note, I’ve tried to install SDL2 on Cygwin64 on my machine
at work and I was previously getting the same error as I was at home. This
morning I got the latest code and built as MrOzBarry suggested and it
actually worked this time. So, i’m also quite certain that reinstalling
windows is not the way to go.

Many thanks for all your help.


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


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


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

I’ve tried to build SDL2 using mingw/msys and it worked first time, the only problem is that it hasn’t got sys/socket.h and dlfcn.h, etc. It’s something I could fall back on if there is no other option, but I don’t want the only reason for that to be that I couldn’t get cygwin working on my machine (especially when it is working for other people).

Also, I know this doesn’t really mean anything since new things can be broke as well (hardware and software), but i’ve only had this machine a couple of months and the first time I installed cygwin was to build SDL2 and start using it for a project. I installed cygwin first, tried building and got the error, so then installed mingw and found it worked. There hasn’t been much installed on this machine either.

I’ve also done a cygcheck -c on my machine at work that did work, so will compare what I have got at home and work and see if there is any difference. BTW, I also have mingw installed at work too, which does work.

It’s bugging me now, so I need to find out whats up lol.

Thanks for the replies btw, your input is much appreciated.

R Manard wrote:> Yes, that’s not what I was saying, you need to reread my statement figured out I think. That’s okay sometimes I don’t get it when I read something too. On Jan 7, 2014 5:49 PM, “Alberto Corona” <albcoron at gmail.com (albcoron at gmail.com)> wrote:

Manard, it’s already been evaluated that it has nothing to do with Windows and more to do with what compiler is being used in Cygwin. It also has absolutely nothing to do with hardware.

On Tue, Jan 7, 2014 at 5:02 PM, R Manard <dranikist at gmail.com (dranikist at gmail.com)> wrote:

Yep, if you want to troubleshoot anything on a computer, you need to have something known good to work from. If it had been a fresh install of the most current library and compiler that did not work as we thought before, the next step would be to wipe out the operating system and then reinstall those things again. This is a good thread for anyone that wants to fix a software or hardware issue. But with the hardware you replace the software portion like drivers or the program , if it fails then hardware portion with a known good part, failing that its a wipe of the hard drive and checking for corruption on it and reinstalling everything with the known good part, failing that you know its the motherboard or socket connectors or something like that . I know now I’m off topic now but in my mind it’s all the same. On Jan 7, 2014 2:02 PM, “phil12d3” <@phil12d3 (@phil12d3)> wrote:

   	The output of `cygcheck -c` is:

https://dl.dropboxusercontent.com/u/86433876/cygwin/cygcheck.txt (https://dl.dropboxusercontent.com/u/86433876/cygwin/cygcheck.txt)

MrOzBarry wrote:

What is the output of `cygcheck -c` from the terminal emulator? ?That will list all installed packages.

Going back to my post that you linked to at the beginning, there was one strange issue I was having with my old cygwin install; I had both the mingw and regular gcc built utils installed, which was a problem because some tools had the same name and were linking to both the cygwin and mingw runtimes, meaning the compiling had some horribly?bizarre?errors.

If you are using the mingw toolchain, I might suggest just sticking to mingw/msys. ?Not as robust (seriously, I love the cygwin terminal emulator!), but it will work.

Now, if you’re determined to use the cygwin runtime, you should probably clear out all the mingw build tools, and make sure your autotools and gcc versions are all up to date. ?If you had installed the mingw build tools, try uninstalling all of your compiler tools (cygwin/gnu and mingw), then run the setup utility a second time for the cygwin/gnu so it creates all the appropriate links automatically (otherwise it may be a pain).

Alberto made a good point that a clean install made it super easy to build, so that may be a good option. ?You mentioned trying this already with the same issue, and that seems strange, as Alberto and myself both tried building from a clean install, and were successful, which means either you are installing some sort of conflicting packages (like I mentioned, possibly compiler conflicts?), or for some reason your installs are being corrupted.

If you want to avoid a clean install, at the very least, try just wiping out the SDL directory and re-extract/clone it and start building fresh - when I used ./autogen in my previous/failed attempts, that seemed to cause more trouble than it’s worth.

On Mon, Jan 6, 2014 at 7:22 PM, phil12d3 <> wrote:

Quote:

   	Sorry for the late reply. The files are shared from the below links:

https://dl.dropboxusercontent.com/u/86433876/cygwin/configure.in (https://dl.dropboxusercontent.com/u/86433876/cygwin/configure.in)
https://dl.dropboxusercontent.com/u/86433876/cygwin/Makefile.in (https://dl.dropboxusercontent.com/u/86433876/cygwin/Makefile.in)
https://dl.dropboxusercontent.com/u/86433876/cygwin/setup.ini (https://dl.dropboxusercontent.com/u/86433876/cygwin/setup.ini)

The below zip files contains my makefile and content just after building and encountering the error:

https://dl.dropboxusercontent.com/u/86433876/cygwin/build.zip (https://dl.dropboxusercontent.com/u/86433876/cygwin/build.zip)

Please let me know if you need any others.

Another side note, I’ve tried to install SDL2 on Cygwin64 on my machine at work and I was previously getting the same error as I was at home. This morning I got the latest code and built as MrOzBarry suggested and it actually worked this time. So, i’m also quite certain that reinstalling windows is not the way to go.

Many thanks for all your help.


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


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


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

I’ve finally got it working. It turns out that it was because of a conflict with libuuid-devel.

I had looked at this before, I used setup.exe and selected uninstall again libuuid-devel. But you may have seen that it didn’t work that time.

I compared the output of cygcheck -c between my home and work pc and saw that my work pc had many of the packages that I had at home, apart from libuuid-devel.

The removal using setup.exe hadn’t worked at home and was still there, hence SDL wouldn’t have built.

I removed it manually based on the files listed in /etc/setup and ran …/configure && make && make install again, and it worked.

Moral of the story: double check what you have done.

Many thanks, wouldn’t have found this without cygcheck.