LWN.net Logo

Plugging into GCC

Plugging into GCC

Posted Oct 3, 2008 9:58 UTC (Fri) by ikm (subscriber, #493)
Parent article: Plugging into GCC

What I don't get is why just not add an explicit clause to the license specifically prohibiting non-GPL plugins? While linux kernel doesn't have any clear policy regarding binary modules since the opinions on the matter are split, here seems to be an unanimous opinion, so why not just put it into the compiler's license text?


(Log in to post comments)

Plugging into GCC

Posted Oct 3, 2008 10:53 UTC (Fri) by Jonno (subscriber, #49613) [Link]

Becouse if the plugin is not a derived work of gcc the gcc license
agreement don't limit what you do with the plugin.

Exactly what is a derived work differ from juristiction to juristiction,
but generally speaking if a plugin doesn't link to any gcc libraries and
only includes trivial (eg non-copyrightable) header files from gc, it is
not a derivered work, and is thus not covered by the gcc license.

Of course, what is a "trivial" header file will also vary from juristiction
to juristiction, and probably from judge to judge, but you get the point...

Plugging into GCC

Posted Oct 3, 2008 11:27 UTC (Fri) by ikm (subscriber, #493) [Link]

> Because if the plugin is not a derived work of gcc the gcc license agreement don't limit what you do with the plugin.

So change the gcc license to limit it. Add a text to license saying that if you do make plugins for gcc, they are always considered derivative works and must be licensed under GPL. Or something like that — that is, just add an additional clause to the license text. Why not?

Plugging into GCC

Posted Oct 3, 2008 12:12 UTC (Fri) by RobSeace (subscriber, #4435) [Link]

Because, you can't change the law just by declaring something is so... The point is, that under law they would simply have no legal power to prevent them from doing it, regardless of what they said in their license text, unless the work was legally considered a derived work... And, that's a determination completely in the hands of copyright law and judges' takes on what that means... One can't just override copyright law and make up new rules in one's license...

GPLv3 anti-DRM clause

Posted Oct 3, 2008 14:29 UTC (Fri) by cortana (subscriber, #24596) [Link]

Clause 3 of the GPL version 3:

"No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures."

Can the GPL just declare that this is the case and have it be so? When I first read this clause, it occured to me that it is presumably up to a court to decide what is and is not an effective technological measure.

GPLv3 anti-DRM clause

Posted Oct 3, 2008 14:46 UTC (Fri) by RobSeace (subscriber, #4435) [Link]

I'm not sure about that, but at least it's a much more reasonable position to take than declaring, "Everything that *I* say is a derived work is a derived work, regardless of what the law really says!"...

In that case, it sounds more like a declaration by the copyright holders (who chose to use that license) that they do not intend any DRM-like restrictions within the code to be considered illegal to circumvent... Of course, the intent is to restrict future third-parties who modify the code to ADD such restrictions, but the point is the same, because those third-parties, by choosing to modify and distribute a GPLv3 work, chose to accept the terms of that license, and so are bound by its restrictions...

In the case being discussed, the whole point was that a work may not actually BE a derived work, and therefore wouldn't come under the terms of the GPL in the first place, so no amount of additional restrictions added to the license would ever accomplish anything...

GPLv3 anti-DRM clause

Posted Oct 3, 2008 18:06 UTC (Fri) by drag (subscriber, #31333) [Link]

> I'm not sure about that, but at least it's a much more reasonable position to take than declaring, "Everything that *I* say is a derived work is a derived work, regardless of what the law really says!"...

Yes! Absolutely.

'Derived Work' is a very specific legal term that is codified in the USA's copyright law. It's not up to a copyright holder, or licensee, to define the scope of 'derived work'. The definition of 'derived work' is set out in copyright law and in the judgements handed down by the nation's court system.

So if the GPLvX tries to say that 'linking' a program to GPL'd licensed code causes the program that links to be 'derived work' and a judge disagrees with that interpretation of the copyright law.. then guess what? You can legally link against a GPL program and there isn't anything that the copyright holders, lawyers, programmers, or anybody else can do about it. If it's beyond the scope of copyright then it's something that you simply can't write a license to prevent.

GPLv3 anti-DRM clause

Posted Oct 3, 2008 20:29 UTC (Fri) by ikm (subscriber, #493) [Link]

> If it's beyond the scope of copyright then it's something that you simply can't write a license to prevent.

Could you use an EULA instead to combat this? :)

GPLv3 anti-DRM clause

Posted Oct 3, 2008 21:05 UTC (Fri) by drag (subscriber, #31333) [Link]

I have no idea.

But think about what your asking.. Your asking to make a license that is _more_ restrictive then what is possible under copyright law. Is that approach really something you want to do when making 'Free' software?

----------------------------

The GCC folks probably really really need to reevaluate their entire attitude towards preventing proprietary plugins and back-ends/front-ends.

What is happening, it seems to me, that they are going to such lengths to fight a phantom menace that they are hurting real progress. That in a effort to combat a proprietary threat that, so far, has not existed, that they are doing REAL and immediate damage to the Free software folks that depend on their software and want to extend it to improve the state of the art.

Why not do everything you can to facilitate and create the best, most flexible, and most beneficial compiler you can and IF proprietary software becomes a problem THEN do something to try to deal with?

I am not saying that they should abandon all hope and embrace proprietary extensions.. I am saying that if people can prove a real benefit to extending the GCC framework in a way that would benefit Free software then they should do it.

GPLv3 anti-DRM clause

Posted Oct 3, 2008 22:17 UTC (Fri) by ikm (subscriber, #493) [Link]

> Is that approach really something you want to do when making 'Free' software?

No — in fact, I think that 'trust your users more' is a kind of better approach. But the FSF seems to know better and in doing so they sometimes start to feel like some kind of Free Software's Microsoft way(tm)(r).

Phantom menace? Threat that, so far, has not existed? Sorry - you are DEAD wrong.

Posted Oct 4, 2008 7:25 UTC (Sat) by khim (subscriber, #9252) [Link]

Aha. So NOW we are at stage where we are ignoring history if it does not suit us, right? Menace was clearly not phantom and threat was quite real - and you can read about this story here. These two sentences pretty much invalidate all your affectations: Why do we have a free C++ compiler? Only because the GNU GPL said it had to be free. That's pretty big accomplishment of all these "draconian restrictions" if you ask me.

Of course that was then and we are talking about now, but... those who cannot remember the past are condemned to repeat it so we can not ignore the past and do everything you can to facilitate and create the best, most flexible, and most beneficial compiler you can and IF proprietary software becomes a problem THEN do something to try to deal with. Because the proprietary software WAS and IS the threat. Quite real and tangible. Yes, some companies like to play nice with free software (IBM, Google, etc)... as long as free software benefits them. Once that's not the case... all bets are off.

Now, does it mean GCC should not implement plugins system? Of course not: it's usable for free software too. But do that and pretend that "proprietary threat" does not exist... it's just folly.

Phantom menace? Threat that, so far, has not existed? Sorry - you are DEAD wrong.

Posted Oct 4, 2008 8:41 UTC (Sat) by drag (subscriber, #31333) [Link]

The license worked then... so it won't work now?

Look; There is a reason why people pored work into LLVM instead of improving GCC.

If you want people to use a GPL license and create open source software, making it impossible to do the work they need to get done is a shitty way of accomplishing that goal.

Have you actually READ the article?

Posted Oct 4, 2008 10:16 UTC (Sat) by khim (subscriber, #9252) [Link]

The license worked then... so it won't work now?

Argh. WHY the license worked then? Apple and MCC specifically asked "can we distribute our front-ends as proprietary plugin to GCC" and RMS said "no" - after that GCC got C++ and ObjectiveC. And this worked because there were no simple way to write proprietary plugin and claim it's "independent work" (you were and still are pretty much forced to use large chunks of GCC code to interact with backend).

Look; There is a reason why people pored work into LLVM instead of improving GCC.
Yes and there are reason why Unix went nowhere while Linux took it's place. BSD went from being "something far beyond Linux" to "roughly equal, sometimes better, but often much worse". Yes, Apache/BSD licenses attract more developers and they do more work which is then wasted when companies go out of business. NetBSD tale should teach us something. The question today is: is GPLv3 (which makes it impossible for proprietary vendors to ship GCC with proprietary extensions - they can only ship extensions without appropriate copy of GCC) enough to prevent balcanization of GCC or not?

If you want people to use a GPL license and create open source software, making it impossible to do the work they need to get done is a shitty way of accomplishing that goal.
The question is, of course, not so simple. It's more like: do people want to create free software or do they want to create proprietary software, how many of the second camp can be pressured to first camp and how many of guys from first camp will go away in frustration if plugins will not be implemented? Answers to these questions are not easily obtainable - we can only guess...

Have you actually READ the article?

Posted Oct 4, 2008 11:37 UTC (Sat) by Frej (subscriber, #4165) [Link]

Yes and there are reason why Unix went nowhere while Linux took it's place. BSD went from being "something far beyond Linux" to "roughly equal, sometimes better, but often much worse". Yes, Apache/BSD licenses attract more developers and they do more work which is then wasted when companies go out of business. NetBSD tale should teach us something. <snip>

That's true, there is no life time guarantee that someday you will be on your own using llvm when rest went closed. But in reality llvm+clang looks like a great piece of software (just avoiding the platform buzzword...) that can support existing C and C++ code...For now it just appears to be better software. Integrating clang with stuff like anjuta or emacs would finally bring actual code editors instead of text editors. ... ok just rambling now; sorry ;)

Have you actually READ the article?

Posted Oct 19, 2008 1:55 UTC (Sun) by robert_s (subscriber, #42402) [Link]

"But in reality llvm+clang looks like a great piece of software (just avoiding the platform buzzword...) that can support existing C and C++ code...For now it just appears to be better software."

'For now' it doesn't support c++.

Have you actually READ the article?

Posted Feb 5, 2009 14:22 UTC (Thu) by trasz (guest, #45786) [Link]

> Argh. WHY the license worked then?

It didn't. Marketing worked.

GPLv3 anti-DRM clause

Posted Oct 5, 2008 6:07 UTC (Sun) by rickmoen (subscriber, #6943) [Link]

"drag" wrote:

'Derived Work' is a very specific legal term that is codified in the USA's copyright law.

I'll admit that this is a minor faux pas, and feel bad about seeming to pick on you specifically, but I've noticed that computerists perpetuate any number of characteristic errors about law through merely quoting each other and not bothering to learn about actual law. In this case, I'm referring to your phrase 'derived work'. The actual phrase used in (at minimum) US and Canadian copyright law, which can be found in section 101 of United State Code title 17 (the Copyright Act) is 'derivative work'.

Rick Moen
rick@linuxmafia.com

GPLv3 anti-DRM clause

Posted Oct 6, 2008 18:11 UTC (Mon) by AJWM (guest, #15888) [Link]

The power of that clause lies in just who is doing the deeming.

If the distributor of the work deems it part of an effective technological measure (ETM), then that distributor is in violation of Clause 3 of GPL 3 and subject to copyright penalties for distributing the work. If the distributor doesn't deem it to be part of an ETM, then why would a court find otherwise?

Plugging into GCC

Posted Oct 3, 2008 12:20 UTC (Fri) by madscientist (subscriber, #16861) [Link]

I don't understand what you're saying. Copyright is a legal concept, and it has legal foundations. You can't just make them up! If a work is not derived from another work (in the legal, not technical, sense) then you can't just declare that it is and have it be true. If a plugin is not a derived work then no amount of text in the GPL will apply to that plugin.

Plugging into GCC

Posted Oct 3, 2008 20:12 UTC (Fri) by ikm (subscriber, #493) [Link]

Ok, I understand — the plugin has to be a derivative work, which is something that is determined solely by the law. And here comes the question: does linking with a library constitute a derivative work or not? Does LGPL actually have any legal power? I'm asking because I don't really perceive much difference between a program using a library or a plugin which heavily relies on the host program's internals.

LGPL was never at risk

Posted Oct 3, 2008 20:31 UTC (Fri) by khim (subscriber, #9252) [Link]

Copyright starts with books. Think about this situation: Alice hates Bob (they had disagreements in the past) and so grants everyone permission to publish her poems ONLY if Bob's poems are not included in the book. Is it reasonable? May be, may be not. But it's Alice's sole discretion if she want to relax these requirements or not. That's the situation LGPL talks about: if you want to publish my poems you MUST make sure they are not mashed up with your poem to such a degree that it's impossible to separate them. Now plugins is different story altogether: Bob is not sitting idle and he creates book which is intended to complement Alice's creations (commentary or "my view on our differences"). This book DOES NOT include Alice's work at all - just a few small snippets here and there (allowed by fair use). Can the Alice say anything at all? Probably not: her work is not under the cover - why she must have any power over that creation?

Or in other words: nVidia is a nasty company - but it DOES NOT violate copyright when it distributes nVidia binary drivers. These drivers don't include code from Linux and so are clearly not a derived work. Canonical, on the other hand, clearly LOST it's right to distribute Linux kernel when it included these same drivers on CD - if you view just letter of GPL. Of course kernel developers clearly tolerate such transgressions (GPL Violations won many battles over GPL non-compliance but not once they tried to force this issue) and this will be considered by court if the developers will decide to sue Canonical...

LGPL was never at risk

Posted Oct 3, 2008 22:10 UTC (Fri) by ikm (subscriber, #493) [Link]

So the idea basically is like this: as long as you download library by yourself in order to run some particular program which doesn't incorporate it despite the fact that it requires it, it's you who infringes, not the author of that program? And what if the installer goes to the internet to download it for the user — then who's to blame? Copyright law is sure creepy :)

No - you got it backwards!

Posted Oct 4, 2008 7:00 UTC (Sat) by khim (subscriber, #9252) [Link]

If you distribute the library AND the program - you need permissions from authors of both library and program. Very clear-cut case. Nothing is murky here. That's where GPL and LGPL are playing.

But. If you want to do what you are describing (distribute the program without library and/or make installer download the library from third-party web site)... be ready to pay lawers and/or the court: the story starts to get murky and minor details can decide an outcome (see the next comment from jordanb for real-world case). For example if program can use both libedit and readline or "go without" (in which case there will be no high-level editing capabilities in your program) court can conclude that it's not a derived work of readline, but if it's unusable without readline the outcome can be different. Law is squishy as PJ likes to repeat: court looks not only on the letter of the law but on the spirit too and they try to decipher intentions of both law and authors so the end result can be uncertain. That's why nVidia drivers are probably clear: the same binary can be used in Windows so they are not related to Linux in any way and glue code is completely free so can not infringe anything by definition.

No - you got it backwards!

Posted Oct 4, 2008 9:03 UTC (Sat) by drag (subscriber, #31333) [Link]

> If you distribute the library AND the program - you need permissions from authors of both library and program. Very clear-cut case. Nothing is murky here. That's where GPL and LGPL are playing.

Don't forget that the GPL specifically allows non-GPL-compatible programs to be shipped as part of a distribution.

From the GPLv2 license:
> In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

So, due to the language of the GPL, how programs are distributed are immaterial. (and, of course, the GPL only kicks in if the software is distributed) If the program is not considered legally 'derived work' then shipping it together or seperate doesn't matter. If it is considered 'derived work' then it doesn't matter either, it's still going to be covered under the GPL irregardless of how they are shipped.

:)

IANAL

Sorry, but no dice.

Posted Oct 4, 2008 9:48 UTC (Sat) by khim (subscriber, #9252) [Link]

Don't forget that the GPL specifically allows non-GPL-compatible programs to be shipped as part of a distribution.

Not all non-GPL-compatible programs! Only totally unrelated ones! Your idea may be will work with linux kernel, but it does not work with GCC. You mixed the licenses. GPLv3 already addressed this loophole. It does not refer to derived works at all. What it does refer to is this: A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. Plugins are by their very nature are "extensions on the covered work" and so it does not matter if they are derived works or not - you can not distribute them with GCC. The discussion in question is centered on separate distribution since distribution as bundle is already forbidden.

So, due to the language of the GPL, how programs are distributed are immaterial.

Sorry, it does matter. Big way.

If the program is not considered legally 'derived work' then shipping it together or seperate doesn't matter.

Nope. If the program is extension (and plugin is an extension) and if it's distributed on the same medium as GCC - it must be distributed under terms of the GPL. Because the whole medium is 'derived work' and so must comply with GCC. You can put somthing totally unrelated on this medium (Flash player or Adobe Reader, for example), but you can not put the plugin there. If the plugin is distributed separately - then and only then the question about "derived work" arises...

Sorry, but no dice.

Posted Oct 6, 2008 3:44 UTC (Mon) by vonbrand (subscriber, #4458) [Link]

This "aggregation" clause of GPLv3 (as much of the verbosity of the licenses) is just (re)stating what the relevant laws (and even common sense) tells you. True, but irrelevant. If they stated the exact opposite, the legal effect would be precisely the same: The license just can't override the law.

Very much no so.

Posted Oct 6, 2008 6:54 UTC (Mon) by khim (subscriber, #9252) [Link]

The license just can't override the law.

Oh so very true. But what the law says about redistribution? Right: you can't do that. Wait till the end of author, then 70 more years - and only then you can. Or you can ask author for the permission. And as judge said: "If a publisher wants to publish a book of an author that wants his book only to be published in a green envelope, then that might seem odd to you, but still you will have to do it as long as you want to publish the book and have no other agreement in place." Sorry, but aggregation clause is very much not the restatement of relevant laws (may it's restatement of common sense, but this is irrelevant here). GPL had this clause from the very first version because someone noted that without it such programs can not be included in program collections (like once popular SimTel) since it'll mean all programs in said collection must be distributed under GPL if just one program uses GPL. Thus "aggregation clause" was added to limit "viral reach" of GPL. GPLv3 just fixed small problem there and made proprietary plugins illegal again, that's all.

LGPL was never at risk

Posted Oct 4, 2008 4:30 UTC (Sat) by jordanb (guest, #45668) [Link]

Extend your example a bit and the issue gets murky though. Consider /The Wind Done Gone/[1] which was a retelling of the Gone With the Wind story from the eyes of a slave. It had no text from the original work in it, and even avoided using the character names, but it had the same plot and was unquestionably "inspired" by Mitchell's book.

The estate of Mrs. Mitchell got an injunction from the courts against its sell, eventually leading to a settlement.

So the point is that a work need not directly incorporate another work to be considered derivative and infringing. And there is a small contingent of Linux developers who are rattling the cage to go after NVidia with the argument that the NVidia drivers are inspired by and therefore infringing on Linux, although it doesn't look like anything is going to come of it.

What this all means with regards to GCC and the FSF.. I can't say, except that these issues are a lot more complicated than people tend to admit, and that these legal discussions on websites like this are pretty close to the three blind mice trying to come to terms with the elephant. We don't have the expertise -- and we've not done the research -- to have informed opinions on this matter. And that's as true of Corbet as it is of us posters.

[1] http://en.wikipedia.org/wiki/The_Wind_Done_Gone

That's different point from mine

Posted Oct 4, 2008 7:07 UTC (Sat) by khim (subscriber, #9252) [Link]

My point was that if you directly incorporate another work then the result is, of course, derived work - no further investigation is needed. Licenses are in play at this point. And that's true that sometimes work can be considered "derived work" even if it does not incorporate pieces of original work. But this is VERY gray area. Note that the case you mentioned was settled - because it's border-line case and both sides decided that it's safer to settle then to try to go all the way to supreme court.

Plugging into GCC

Posted Oct 3, 2008 21:42 UTC (Fri) by palapa (subscriber, #612) [Link]

Couldn't the compiler require the plugin to be linked to a GPL'd library? For the API, for instance. That would make the plugin a derived work and force it to be GPL licensed.

Any such library can be reimplemented

Posted Oct 4, 2008 7:11 UTC (Sat) by khim (subscriber, #9252) [Link]

...and published under Apache2 license. Of course then the question will be raised is the said library is derived work of original library or not - but that's very gray area and court cases can go on for years...

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds