Page 1 of 1

FSF vs Apache: Is the GPL and Apache License compatible???

Posted: Mon Jan 09, 2006 8:40 am
by Maugrim_The_Reaper
These situations I thought were relatively rare - but its hard to ignore when they suddenly appear in your face.

I'm currently working on an open source PHP game, which incorporates a loose framework (very loose - no comparing me to Cake...;)). It relies heavily on a collection of 3rd party libraries. Now my problem is including a logging library. Something immensely useful, something I thought was obvious, and something for which there seem few options. I'm not inclined to rely on PEAR because the application will be widely distributed on a large enough base of systems that PEAR is unreliable.

There is however log4php (a port of log4j). Became interested after reading about it in phpArchitect, and after reading the source (its a little convoluted but very adaptable). The problem of course is that the project is Apache sponsored, and under the Apache License 2.0.

My question - can such a library be included in GPL source given the glaring disagreement between FSF and Apache? Apache claim their license is GPL compatible, the FSF claim its not - and neither side appear to have resolved the difference. And who knows what surprises GPL3 will bring (coming to a screen near you next week).

What's an open source developer to do - reinvent wheels? Can anyone suggest a similar logging library perhaps?

log4php: http://logging.apache.org/log4php/

Re: FSF vs Apache: Is the GPL and Apache License compatible?

Posted: Mon Jan 09, 2006 9:43 am
by Roja
Maugrim_The_Reaper wrote:My question - can such a library be included in GPL source given the glaring disagreement between FSF and Apache? Apache claim their license is GPL compatible, the FSF claim its not - and neither side appear to have resolved the difference.
Well, the FSF does a good job describing why:
This is a free software license but it is incompatible with the GPL. The Apache Software License is incompatible with the GPL because it has a specific requirement that is not in the GPL: it has certain patent termination cases that the GPL does not require. (We don't think those patent termination cases are inherently a bad idea, but nonetheless they are incompatible with the GNU GPL.)
Legally speaking, if one license says "You must", and another says "You must not", about the same thing, you can't combine them.

Since thats precisely what is happening (The Apache license says you terminate your patents, the GPL says you don't), they can't be combined.
Maugrim_The_Reaper wrote:And who knows what surprises GPL3 will bring (coming to a screen near you next week).
Humorously, patents are one of the most talked about topics for improved action in the GPL3. It may end up that the GPLv3 will end up being compatible with the Apache license if they end up with a similar clause. :)
Maugrim_The_Reaper wrote:What's an open source developer to do - reinvent wheels? Can anyone suggest a similar logging library perhaps?

log4php: http://logging.apache.org/log4php/
Encourage people to migrate to other licenses, or yes, reinvent the wheel. Thats the pain that comes with Freedom software development - if it doesn't exist, you roll your own.

On the bright side, the more people that do so, the more Freedom software there is, reducing the pain over time.

Posted: Mon Jan 09, 2006 10:01 am
by Maugrim_The_Reaper
Humorously, patents are one of the most talked about topics for improved action in the GPL3. It may end up that the GPLv3 will end up being compatible with the Apache license if they end up with a similar clause.
I'm almost certain they should be compatible... In the absence of it though, I guess I can either a) do something myself, or b) wait another year. Neither is particularly attractive... :roll: Surely the variety of logging libraries could not be this limited!

I've made the suggestion to the libraries author to dual license under the LGPL (not like its freer than the Apache License afterall). Maybe something will come of it.

The library seems a moving target - its been proposed for PEAR, was until recently licensed under the LGPL (so an older version could be used...hmm), and recently activated under the Apache Logging Project (along with log4j, log4delphi (just released), log4cxx, etc...).

I'd hate to walk away from a thoroughly impressive library under a free liberal OS license because of a small incompatibility. Bah humbug!

Posted: Mon Jan 09, 2006 10:29 am
by Moocat
Being new to this area of expertise, what exactly are you logging and why for your php game? I'm still in the stages where I don't really bother with licenses and such (doing closed source single developer work), but eventually I'll be getting into open source projects and I'd like to try and figure out some of this higher level stuff, why it's used, what's the purpose, etc.

Thanks for any help :)

Posted: Mon Jan 09, 2006 10:39 am
by Maugrim_The_Reaper
Errors, Audit Trails (what user did what, how and when), Security Logs (e.g. detection of unexpected user input by an InputFilter), etc.

Basically any information you might conceivably find useful. Most is optional - some is hard to do without if you expect to detect attempted security violations or cheating (being a game afterall ;)).

A reason for a library based logger: its more complete - you can log to various outputs, including file, database, and even email (example, for notification of fatal errors). It sort of links in with monitoring.

You imagination can probably come up with a host of other uses now you see the general concept...:)