56

At work, we use a version of GCC provided by a vendor of a proprietary OS. The vendor has modified gcc so that it will only run if it successfully acquires one of a limited number of licenses we've purchased from our license server. This seems very much not in the spirit of free software, and it's very annoying, but is it permitted under the GPL?

Assuming it is, shouldn't I also be able to request the modified source code from the vendor, and then make a new gcc executable without the obnoxious license check? Or could that be a terrible idea for legal reasons I'm ignorant of?

Zizouz212
  • 6,449
  • 4
  • 36
  • 75
Daniel McHenry
  • 663
  • 5
  • 4
  • There a limited number of companies that do this to GCC, and all of them have teams of lawyers on staff, so it's unlikely anything you find out here hasn't already been discussed by the vendor and found a work around to. – Sam Oct 02 '15 at 16:32
  • 7
    @Sam Hmm... I'm not aware of any 'work-around' for the GPL. I would think that would be pretty widely-discussed if such a thing existed. I would agree with the OP that the vendor is in violation of the GPL (or at least they will be if they refuse to give him the full source code, including any build scripts or other such things necessary to build.) More likely, the provision to include the license check was made by marketing without understanding the GPL or in hopes that no one would ask them for the source. – reirab Oct 02 '15 at 19:02
  • 1
    How do we interpret "You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License."? Are license checks considered as further restrictions? – ninjalj Oct 02 '15 at 19:55
  • @reirab, work arounds often include linking against libraries, it is possible they could have done something like this with gcc in a way their lawyers think skirts the GPL. It is not discussed for the same reason technical secrets are not discussed, they are trade secrets, and no one has the money or time to get past the huge wall that those lawyers create. – Sam Oct 02 '15 at 21:19
  • 6
    @reirab: They're already in violation if they failed to explicitly offer to provide the source, although it seems unlikely that the copyright holder would pursue a company that, having failed to make the offer, still delivered the code upon request. – Ben Voigt Oct 03 '15 at 20:30
  • 5
    As a sidenote: Have you tried to compile the freely available gcc sources using your restricted compiler? – Hagen von Eitzen Oct 04 '15 at 20:26
  • 1
    In theroy, the vendor might have obtained a non-GPL license for the software: "multi-licensing". – JimmyB Oct 05 '15 at 11:21
  • Did you consider compiling a recent 5.x version of the FSF GCC compiler source code configured as a cross-compiler for your target processor? And what exactly is your target processor and system? – Basile Starynkevitch Oct 06 '15 at 05:18
  • @Starynkevitch I've toyed with the idea but haven't tried it yet. Even if I did, I really doubt we'd be allowed to release our code with a DIY compiler. Even messing with just the driver like I proposed might not be kosher. There are real safety concerns on the project, which apparently makes management very hesitant to make any compiler updates. – Daniel McHenry Oct 06 '15 at 14:56

7 Answers7

51

You should be able to request the complete corresponding modified source code to the complete application from your vendor under the GPL without additional costs in excess of the media. If he refuses, you can contact the FSF as the copyright holder to GCC and tell them your problems with that vendor: they are the only ones who can sue for compliance if the vendor cannot be convinced.

I suspect that the vendor would rather prefer to stop distributing GCC with a license manager compiled in rather than distributing the source code of their license manager library.

The version of GCC they distribute is most likely already one distributed under GPLv3. In that case you can alternatively ask for universal keys making this copy run. At least that's my reading of the GPLv3 but the respective sections give me a headache.

user2838
  • 526
  • 5
  • 2
26

The GPL only affects the source code of the project, not the binaries that are distributed. The strong copyleft clause of the GPL affects the source code, and forces that any derivative works are also licensed under the GPL, and that the source code must be available.

Can they do this? Yes, they can. As long as they respect the terms of the license, then they can do anything they want, including selling it, modifying it.

Assuming it is, shouldn't I also be able to request the modified source code from the vendor, and then make a new gcc executable without the obnoxious license check? Or could that be a terrible idea for legal reasons I'm ignorant of?

Yes, you can request the modified source code, and they will be legally obligated to provide you with that. Otherwise, they will be breaking the terms of the GPL license. Assuming that, you as well, follow the terms and conditions of the GPL, this is legally okay.

Zizouz212
  • 6,449
  • 4
  • 36
  • 75
  • 37
    It does affect the binaries that are distributed, by requiring an offer of source code to accompany them. – Ben Voigt Oct 01 '15 at 20:52
  • @BenVoigt Yes, you are correct. I meant that in binaries don't have to be made freely available, but the source code must. – Zizouz212 Oct 01 '15 at 20:53
  • 8
    Free to those to whom the binaries have been distributed, yes (whether the binaries were sold or gratis)... and whoever is entitled to receive the source code is also entitled to distribute it further – Ben Voigt Oct 01 '15 at 20:55
  • @Zizouz212 you are claiming that the use of software distributed under the GNU GPL can be restricted by an additional license requirement at runtime? – Michael Schumacher Oct 01 '15 at 21:31
  • 1
    @MichaelSchumacher: The whole GPL is built on the concept that copying/redistribution requires permission according to law, but using the copy you've already been given, doesn't. – Ben Voigt Oct 01 '15 at 23:52
  • @BenVoigt this is precisely why I want Zizouz212 to clarify what is claimed in the answer – Michael Schumacher Oct 02 '15 at 00:40
  • 2
    @MichaelSchumacher: The answer doesn't claim that the software can be restricted by additional license requirement. What it does claim is that it is not illegal for the software to refuse to run when a remote server instructs it not to. GPL doesn't cover the software itself only the code. What is illegal is to refuse to provide the user (in this case the OP) the source code of the modified software. Basically, it is legal for the OP to modify the source code to circumvent the license server. It is illegal for his vendor to prevent him to do so. – slebetman Oct 02 '15 at 07:02
  • @slebetman I asked about this in #fsf, without referencing this thread, though. The general opinion there is that you may not restrict the binaries in the way describe here - but I wouldn't be surprised if I got an entirely different answer there when asking again. Do you have an official FSF source for the ability to restrict the software in this way? – Michael Schumacher Oct 02 '15 at 07:56
  • Hmmm, you both have raised some excellent posts here and I'll see if I can back them up with some research. I'll probably do that when I get home from school, but you guys can expect something when I get home from school today. – Zizouz212 Oct 02 '15 at 13:01
  • 1
    Wouldn't recompiling the source without the license check be bypassing "technical protection measures", and as such illegal under DMCA? – Taemyr Oct 02 '15 at 13:09
  • 8
    Actually I realized the answer to this. Even if recompiling without the license check would be against DMCA, by licensing the product under GPL the vendor has given explicit permission for this operation to OP. – Taemyr Oct 02 '15 at 13:11
  • 1
    @MichaelSchumacher: they're even allowed to give you a version that doesn't run at all, so a version that runs sometimes (like when you have an unrelated license) sounds OK to me too. But they have to give you the full source code, under the terms of the GPL, and you are allowed to do whatever you want again (like make a version that doesn't check licenses). – RemcoGerlich Oct 02 '15 at 13:45
  • Doesn't GPLv3 have an explicit anti-tivoization provision that specifically prohibits this kind of chicanery, or is that a hardware-only thing? – Kevin Oct 02 '15 at 13:50
  • @Kevin GPLv3's "anti-tivoization" provision requiring "Installation Information" applies to products "normally used for personal, family, or household purposes", not products whose "commercial, industrial or non-consumer uses [...] represent the only significant mode of use of the product". – Damian Yerrick Oct 02 '15 at 14:46
  • 1
    @Kevin: Tivoization involves: (1) a key not contained in the released GPL-covered source code (2) which is checked outside the GPL-covered code and thus makes build products derived from the GPL-covered source code useless without the key. This question differs because the check is inside the GPL-covered application, there's no outside enforcement. – Ben Voigt Oct 02 '15 at 18:27
  • @Taemyr The source code can be edited with a simple text editor, hence is not technically protected against removal of the licence checking code. The new binaries compiled from the modified code are different from the original binaries and are not the result of bypassing a technical protection measure in the binaries – Hagen von Eitzen Oct 04 '15 at 20:19
  • @HagenvonEitzen One could argue that the technical limitations is a part of the solution. Also, if you use altered binaries on a pirated game I don't think you will be able to win on a theory that the limitations are not present. This is a moot point though since you have explicit permission. – Taemyr Oct 05 '15 at 07:34
  • 1
    @BenVoigt, see GPLv2 section 3b. You have to accompany the binary with a written offer to give the source to any third party, not just those whom you distributed the binaries to (unless you include the source with the binary as in Section 3a., in which case your source obligation is already satisfied) – cas Oct 23 '15 at 06:50
12

In theory, you have the right to get the complete source of that modified GCC. But no one can enforce your receipt of the source. The 'perpetrator' always has the legal choice to stop distributing, and perhaps also pay a monetary settlement.

You would prefer that they were compelled to distribute the source, but the way the law is actually interpreted does not give you any handle to enforce that. What the law may achieve is that the company is enforced not to distribute the binaries anymore and to pay royalties for what has been done already.

The hope is that the economic value of selling the OS (or whatever) is so high that the perpetrator will chose to comply with the GPL and distribute the source rather than go out of the business.

I am the first person who tried to enforce the GPL in court and I failed for exactly this legal constraint. The two companies I tried to sue just stopped existing after my lawyer contacted them.

Harald Welte later succeeded just because he was able to put economic pressure on the companies that ordered hardware from China that included GPL software, and that had to pay for hardware, but could not sell the hardware as the court disallowed to sell the hardware. They complied rather than absorb that loss.

bmargulies
  • 4,257
  • 17
  • 23
schily
  • 786
  • 3
  • 9
  • 5
    This answer should be improved by adding references to news articles - I'm pretty sure your failed trial about GPL enforcement got covered. – Michael Schumacher Oct 03 '15 at 11:06
  • 2
    Google makes it hard today, to search in news articles. There was a discussion where Eben Moglen claimed that the GPL can be enforced in court and I replied that this does not work and mentioned my example. Moglen then send a private mail where he confirmed that I am right but he also said that he is not willing top write this in the public. – schily Oct 03 '15 at 11:17
  • 4
    You describe yourself as failing, but it sounds like you achieved the ultimate goal, which is to prevent others from redistributing the software without making the source code available. If your goal was specifically to get the modified source and nothing else, then that's not really what the GPL is for. – barbecue Oct 03 '15 at 12:24
  • 1
    You are cool as hell. – L0j1k Oct 05 '15 at 06:43
  • Wouldn't the legal enforcement not to distribute the binaries be a major blow for a company which seems to sell a proprietary OS? Customers won't be happy to get an OS without a compiler. – Dmitry Grigoryev Oct 05 '15 at 09:43
  • This is why I mentioned this possibility of dealing with the problem. – schily Oct 05 '15 at 11:33
4

To answer the direct question: It is not necessarily a violation of the GPL to require a license. Let me describe a scheme which I believe would comply with the terms. I have no idea if the people you're dealing with use it.

  1. Create, from scratch, a replacement for the gcc command line driver. Keep in mind that the hard part of gcc is in the back-end executables. The driver is a relatively simple program.

  2. Add licensing to the replacement driver.

  3. Distribute the replacement driver, together with the normal GCC backends.

  4. Comply with the GPL requirements to provide the source of the backends as requested.

  5. Do whatever devious trick you can think of to make it inconvenient for someone to drop in the normal GCC driver and get around your licensing.

The coupling between the proprietary front-end and the GPL backends would be via command execution, and the FSF does not call this 'linkage' and does not assert that the resulting thing would be a derived work.

Note that I'm not trying to answer the legal variant in this question: do the terms of the GPL preclude imposing restrictions on the use of the work? My personal, NAL, belief, is that the terms of the GPL only require the distribution of source, but I'm not qualified to opine with certainty.

bmargulies
  • 4,257
  • 17
  • 23
  • 3
    If the coupling is proprietary, the copyright owner of the GPL work will claim that the front-end is a derivative of or otherwise inseparable from the back-end. – Ben Voigt Oct 03 '15 at 20:28
  • The coupling isn't proprietary, unless you mean that the command line params of the back-end pieces are proprietary to the FSF. A strange claim. More likely is something like the argument that the Drupal people make about plugins. – bmargulies Oct 03 '15 at 22:18
  • 1
    I was assuming that the compiler driver piece was computing some piece of data, not present in the normal invocation in the FSF version, that the "improved' back-end wouldn't function without. If that isn't the case, then "put back the normal wrapper" becomes trivial. – Ben Voigt Oct 03 '15 at 22:22
  • 1
    What you've described is essentially creating a single work, and so therefore your whole thing would have to be licensed according to the GPL. This would not work. Just because you'd set it up to use commandline trickery, they aren't communicating at arms length because it's been modified to work specifically in that way. – whatsisname Oct 04 '15 at 23:07
  • Sensible companies combine strong contracts with weak technical enforcement -- the technology is just there so you can't say that you didn't realize you were violating the contract. "Comments are not for extended debate". If you disagree, write your own answer or downvote. – bmargulies Oct 05 '15 at 00:44
  • @bmargulies: Agree with the "strong contract". Note that the GPL is a strong contract. The vendor here simply isn't in a position to write conflicting strong contracts, as it doesn't have the rights to do so in the first place. – MSalters Oct 05 '15 at 11:59
2

Can you confirm if the license check is done in gcc itself, and not in real compiler/linker? If you can run cc, ld and friends without restrictions, you have an easy workaround:

  1. Write Makefiles which directly use cc, ld, etc.

  2. Port the vanilla gcc frontend using the restricted version of gcc, then use your fronted as a replacement.

If you decide to make a legal claim yourself, you will most probably get the company to refund you the money you paid for the OS, but it's unlikely they will give you the source code if they don't want to. I suggest you contact FSF for advice. As copyright holders, they will have a much better stand in court than you.

Dmitry Grigoryev
  • 1,362
  • 10
  • 20
  • cc is just another name for gcc; you might be thinking of cc1/cc1plus (which nobody uses directly because it is internal to gcc) – user253751 Mar 11 '23 at 01:28
1

It's difficult to know if they really modified code or not:

GCC consists of different tools: gcc.exe, cpp.exe, cc1.exe, as.exe and ld.exe (and possibly more).

Some companies distribute an unmodified gcc.exe and cpp.exe as well as a modified as.exe and ld.exe for use with a CPU not supported by regular GCC (I know about PowerPC with VLE instruction set).

These programs can be copied freely without a license check. I've also seen source code in the "official" GCC repository that represents the changes made by such companies.

The cc1.exe however is completely re-written and does not contain any GPL licensed source files. Or the company made deals with all copyright holders of GPL licensed source files they used - this would also be allowed. Only cc1.exe requires a license and only cc1.exe comes without source code.

In such cases there is of course no issue with the GPL.

Martin Rosenau
  • 321
  • 1
  • 5
-2

this seems similar to Redhat Enterprise Linux.

Redhat provides binaries for 3rd party software like GCC for which you need to get licenses (see http://www.redhat.com/en/about/licenses-us, in particular section 5.1).

they make modifications to some of those binaries (patches that are not (yet) sent upstream. here is an example of a gcc patch: https://gcc.gnu.org/ml/gcc/2014-03/msg00247.html).

they also provide the source, including their patches (which is used by others to build CentOS for example).

we can assume that what Redhat is doing is well vetted legally, and therefore conclude that requiring a license for binaries is permitted and that providing the source code is sufficient to follow the GPL.

(Redhat is not required to publish the source to everyone, but with the cost of the license not being astronomically high, someone is bound to pay the license just to get and republish the source, so they might as well just publish it themselves.)

eMBee
  • 211
  • 1
  • 3
  • 1
    You are wrong. Unless you are able to verify that the code you have in mind is not owned by Redhat, you missunderstand the problem. – schily Oct 03 '15 at 10:56
  • huh? how is the code ownership any different? both companies ship GCC binaries. both companies require licenses to use their binaries. both companies potentially make modifications to their binaries. (not so sure in redhats case, but they may apply internal patches that are not yet upstream). what redhat is doing is clearly legal. what above company is doing, doesn't look any different. redhat releases their source. above company should too. so please explain to me how this is not comparable. – eMBee Oct 03 '15 at 16:46
  • to that unknown voter, if you are voting this down, then please be so kind and explain why, so i can learn something. – eMBee Oct 03 '15 at 17:02
  • @schily (i am not sure if you have noticed my response, i'd appreciate your thoughts on it) – eMBee Oct 08 '15 at 17:05
  • If you changed your mind, you should change your answer as well. – schily Oct 08 '15 at 17:15
  • i didn't change my mind, i explained what i meant by what i said. if that explanation changes my answer then i am curious how you interpreted my answer before. – eMBee Oct 09 '15 at 03:31
  • Well, you said that Redhat seels licenses and I explained that this is possible because Redhat most likely owns the code they sell. Then you confirmed that you believe that Redhat owns the code. If they did not, they would not be permitted to give away binaries without giving away the related source. – schily Oct 09 '15 at 09:12
  • i don't know what you are reading. i said that redhat sells licenses for their binaries which includes GCC, the exact same GCC that is referenced in the original question. where do i say that redhat owns the code? it ows the code for its own patches, again the same as the original question. it certainly doesn't own GCC – eMBee Oct 09 '15 at 09:40
  • So please verify that redhat sells licenses for gcc and forbids you to use the binaries in case you do not pay. – schily Oct 09 '15 at 10:07
  • redhat sells licenses for redhat enterprise linux, which includes GCC. the license agreement is here: http://www.redhat.com/en/about/licenses-us; forbidding the use of binaries without paying is for example covered in section 5.1 – eMBee Oct 09 '15 at 11:39