Building without -mno_cygwin

I’m trying to build SDL on Cygwin without -mno_cygwin. I seem to have
mostly gotten it working - it builds and runs fine without any need for
that flag. Is there a standard SDL test suite I can run? Also, who would
I talk to to get my (as yet not quite complete, but working on it) patch
submitted?

The reason I wanted this is because -mno_cygwin is kind of a hack to
sidestep Cygwin’s libraries, and if you use it, any libraries you want
to use afterwards must be specially built with that flag. Letting it
build natively without -mno_cygwin would let it integrate entirely into
the Cygwin framework, as well as letting it be included under the Cygwin
package manager. (If I can get this added to SDL, the next thing I’ll do
is try to get it added under the Cygwin package manager.)

Specifically, I’ve had to make my own custom builds of both libogg and
boost in order to make my game function under Cygwin. Obviously this
isn’t quite ideal, and this (surprisingly simple so far) patch of mine
lets my game run without a flaw with the native Boost (I have libogg
disabled at the moment since I’ll need to rebuild it, but I don’t
foresee any issues.)

My patch is to the 1.3.0 branch, and I’m not sure how maintained that
currently is. I ran into a huge number of errors trying to make it for
1.2.1 and decided to see if 1.3.0 was easier. I could try backporting it
to 1.2.1 if anyone wanted me to.

If there’s interest, I’ll clean it up and post it on the list. It’s
really quite small and appears to work great.

-Ben

Hello !

Is it correct that when you use the CYGWIN libs without
-mno-cygwin you have to release your code under the GPL,
when you don’t have paid for a CYGWIN license ?

CU

It’s kind of complicated. They allow linking the cygwin runtime with
open-source code even when that code isn’t licensed under the GPL, but
if you want to provide closed-source code, you have to buy a license.

-Ben

Torsten Giebl wrote:> Hello !

Is it correct that when you use the CYGWIN libs without
-mno-cygwin you have to release your code under the GPL,
when you don’t have paid for a CYGWIN license ?

CU


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

Ben Wilhelm wrote:

It’s kind of complicated. They allow linking the cygwin runtime with
open-source code even when that code isn’t licensed under the GPL, but
if you want to provide closed-source code, you have to buy a license.

-Ben

AFAIK, this in incorrect. Cygwin is licensed under GPL, hence, you
can only link to it and distribute it if your application is
licensed under GPL. Say if your app is BSD-licensed, then it goes
under the GPL umbrella and your entire kaboodle becomes GPL. So,
your second sentence is quite incorrect, I think. Please correct
me if I am wrong, but I do think I know what I am talking about.

Torsten Giebl wrote:

Hello !

Is it correct that when you use the CYGWIN libs without
-mno-cygwin you have to release your code under the GPL,
when you don’t have paid for a CYGWIN license ?

CU
[snip]

HTH,–
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

Ben Wilhelm wrote:

It’s kind of complicated. They allow linking the cygwin runtime with
open-source code even when that code isn’t licensed under the GPL, but
if you want to provide closed-source code, you have to buy a license.

-Ben

Okay, my last e-mail wasn’t entirely correct, I apologise. Red Hat
does declare permission for OSS static linkage only. Still, it
would be good if you state things clearly, because considering
past license-related posts, it was my clear duty to ask for
clarification.> Torsten Giebl wrote:

Hello !

Is it correct that when you use the CYGWIN libs without
-mno-cygwin you have to release your code under the GPL,
when you don’t have paid for a CYGWIN license ?

[snip]


Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

This doesn’t match my experience. I’ve used the standard Windows build
of SDL (the one downloaded from the SDL site) with native Cygwin
applications and libraries, including the Cygwin-distributed version
of Boost. Everything works fine. You don’t need a special Cygwin build
of SDL.On Tuesday, 8 May 2007 03:10, Ben Wilhelm wrote:

I’m trying to build SDL on Cygwin without -mno_cygwin. …

The reason I wanted this is because -mno_cygwin is kind of a hack to
sidestep Cygwin’s libraries, and if you use it, any libraries you
want to use afterwards must be specially built with that flag. …

Specifically, I’ve had to make my own custom builds of both libogg
and boost in order to make my game function under Cygwin. …


Ross Smith … @Ross_Smith … Auckland, New Zealand
"Those who can make you believe absurdities can
make you commit atrocities." – Voltaire

I seem to remember that I needed to make a custom build of SDL for some
reason (I no longer remember why) and this custom build, despite not
requiring anything more complicated than ./configure && make install,
most definitely did not work.

It might also depend on what parts of Boost you’re using - most of Boost
doesn’t need to be compiled, but some parts (like boost::regex, which is
what I was using) do. That’s the part I was having trouble with.

-Ben

Ross Smith wrote:> On Tuesday, 8 May 2007 03:10, Ben Wilhelm wrote:

I’m trying to build SDL on Cygwin without -mno_cygwin. …

The reason I wanted this is because -mno_cygwin is kind of a hack to
sidestep Cygwin’s libraries, and if you use it, any libraries you
want to use afterwards must be specially built with that flag. …

Specifically, I’ve had to make my own custom builds of both libogg
and boost in order to make my game function under Cygwin. …

This doesn’t match my experience. I’ve used the standard Windows build
of SDL (the one downloaded from the SDL site) with native Cygwin
applications and libraries, including the Cygwin-distributed version
of Boost. Everything works fine. You don’t need a special Cygwin build
of SDL.

I seem to remember that I needed to make a custom build of SDL for
some reason (I no longer remember why) and this custom build, despite
not requiring anything more complicated than ./configure && make
install, most definitely did not work.

I think I once tried to make a Cygwin build of SDL and failed too, but I
never bothered to try to fix it since I could just use the standard
build.

It might also depend on what parts of Boost you’re using - most of
Boost doesn’t need to be compiled, but some parts (like boost::regex,
which is what I was using) do. That’s the part I was having trouble
with.

None of Boost needs to be compiled if you’re using Cygwin, because it
comes pre-compiled with the Cygwin distribution. I regularly use
boost::regex in Cygwin programs with the standard Windows version of
SDL, and I’ve never had any problems.On Tuesday, 8 May 2007 23:16, Ben Wilhelm wrote:


Ross Smith … @Ross_Smith … Auckland, New Zealand
"Those who can make you believe absurdities can
make you commit atrocities." – Voltaire

Ben Wilhelm <zorba-sdl-dev pavlovian.net> writes:

I’m trying to build SDL on Cygwin without -mno_cygwin. I seem to have
mostly gotten it working - it builds and runs fine without any need for
that flag.

If there’s interest, I’ll clean it up and post it on the list. It’s
really quite small and appears to work great.

I’d be interested in this. I’m also having some issues with SDL’s -mno-cygwin
and apparently having to rebuild libraries because of it.

-Fyren