Does anyone have details on why they made the switch ? The email states very little improvements, even a bug on 32-bit Debians. Is this only because of the license of the compiler ?
The licence of the compiler doesn't affect what you build with it. I expect the reasons are the same most people are switching to clang:
* Modern modular design (everything is libraries)
* Faster compile times
* Nicer error messages
The modular design in particular is a good reason that might not be obvious at first. It lets you do things like debuggers, code formatters and static analysers in a much more sane and robust way than GCC's "no plugins, everything must be separate and flaky" way.
I recently heard a google employee come speak at my university about how google's main codebase is compiled using clang, and their janitorial work is done using clang mapreduce [1]. Furthermore, that google employee talked about how google is working with the LLVM team to integrate the toolchain into visual studio for cross-platform compilation [2]. Pretty cool stuff!
You really want to have the infrastructure argument about which is a better compiler infrastructure?
Even GCC developers (like I was ) don't really question it.
The only thing GCC buys you right now, at all, is slightly better performance (it varies depending on your benchmark) and support for a larger variety of odd embedded systems.
On the other hand, LLVM is very easy to modify, can be built as a library (as can clang), has a sane, well defined IR, etc.
Did I say that gcc has the better infrastructure, the more modern code base, better modularity? I don't think so. That would actually be pretty weird, given that its code base is nearing 30 years of history. But I hope that it is still allowed to say that GCC has made progress the past few years. And I think it is worth refuting claims like "you cannot access the AST in gcc", since this is simply not true anymore. Yes, actually dealing with the AST is baroque, but you can access it nonetheless. There are nice plugins for GCC, like Melt or the python-plugin which make this easier, though. Also, there's the license/freedom thingy, which might not interest you, but others do care about such things.
"Did I say that gcc has the better infrastructure, the more modern code base, better modularity? I don't think so. "
Your reply certainly implied you thought GCC was fine along the same axises your parent said clang was better.
"But I hope that it is still allowed to say that GCC has made progress the past few years."
You are talking to a guy who helped make some of this progress (for example, I helped build the tree-ssa project that brought a language independent middle IR and SSA optimizers to GCC).
It's certainly made progress, but that progress had been fought about for the 5 years before that. At the same time, GCC lost good developers during these fights due to wanting to get stuff done and not deal with politics.
"Also, there's the license/freedom thingy, which might not interest you, but others do care about such things."
Actually, it interests me immensely. I helped with things like the libstdc++ exception, etc.
Besides being a compiler guy, i'm an open source lawyer.
But in the end, I choose stuff based on technical merits first, freedom second.
You are of course, welcome to do as you please.
> Your reply certainly implied you thought GCC was fine along the same axises your parent said clang was better.
No. I simply corrected a false statement regarding gcc. I did not compare it to clang at all. I have no illusions how gcc does compare to clang w.r.t. to code quality, modularity, etc. As I've said: it would be weird if it were otherwise. It's really not hard to beat gcc in that area.
> You are talking to a guy who helped make some of this progress
Thank you (no irony intended).
> Actually, it interests me immensely.
It may interest you, but as you say yourself:
> But in the end, I choose stuff based on technical merits first, freedom second
> Besides being a compiler guy, i'm an open source lawyer.
Apologies for replying in-thread (I couldn't find contact in your profile). Would it be possible to ask you a few questions about a perhaps-novel compiler licensing question for an open source application we're developing (we're a commercial entity and can pay for your time)? If so you can reach me at the email in my profile.
Clang brought new life into C and C++ eco-systems, specially in the sense that since we cannot get rid of C for the time being, at least we can improve the tooling around it to make it safer.
But sometimes I wonder if the license doesn't play a role as well.
To make certain classes of bugs impossible. What will end up hapenning with all code that must be kept is that ever stricter compilers and static analyzers will find the unsafe code and it will be fixed piece by piece.
I dont know about C++, but for C Clang certainly feels like it has better error messages than the variant of GCC that the distro the Uni defaults to has, If nothing else, because of the colour.
None of these reasons matter at all for production builds. The production build needs to happen only once per release, and the only things that count are performance and reliability.
The last time I checked gcc still had better performance than CLang, but things might have changed since then.
I don't use the MSVC toolchain or Windows for that matter, so I don't have a good compass for this, but the impression from the newsletter, dev meetings etc is that clang-cl is constantly being improved. Is the situation still that poor?
I think it's pretty acceptable, if you're writing C. As you can see, C++ support is only partially completed (no exceptions!). But you're right, Clang on Windows gets constantly improved.
The creation of good debugging information (MSVC's /Zi or even /ZI option) is also missing. For a first class citizen, support of the (undocumented) PDB format is a requirement in my opinion.
Google are invested in Clang by virtue of employing guys like Chandler[0] to work on it. When you're scrubbing up monstrous codebases like Chrome, tooling matters. Clangs architecture, and things like all the sanitizers that are part of the broader project, presumably go a long way.
I posted a link to a 2011 talk from Chromium devs about using clang in another comment here, but below is a summary of what they seemed to enjoy from clang (at least, from the talk points):
- Useful warnings, they look good, and are on by default.
- More than a compiler, lets you build your own tools (example: AddressSanitizer)
- Better performance (less time) with clang vs. gcc for both -O0 -g and -O2 (at the time the benchmark was done on 8 cores, 24GB)
In summary / tl;dr : they enjoy diagnostics, the clang code base, how it works, and the ability to write their own tools. It seems like it's more to do with preference/performance and less to do with licensing. I'm sure that now they're doing many more things with clang since three years has passed since the aforementioned talk.
Because you can get a single toolchain that is state of the art, can build for all of chrome's supported platforms (in fact, it could do it from a single binary if you really wanted), and one can easily improve to get the performance you want out of.
Chromium doesn't ship binaries to end users. Linux distros that have chromium build it from source. But I suspect that they are probably going to switch to clang as the recommend compiler for development.
AFIAK, Chromium core devs are all Google employees, and their code makes up the base for Chrome, although Chrome is Google branded and includes other features such as usage tracking. I found a talk given in 2011 by two Chromium devs about using clang, which seems to point to nearly the same increase in build performance along with a few other reasons they like using clang. Anyways, seems like they've been using clang for a while. http://llvm.org/devmtg/2011-11/Weber_Wennborg_UsingClangInCh...
It's been a good run, but we're finally seeing the end of free compilers.
Over time, using Clang effectively will require proprietary modules from Google, Apple, et all and the GCC project, long dead, will haunt us from the grave.
We'll tell stories to our children about how when we started learning to program, it was easy to get started because compilers were free, but now the only free compilers are toys, ill-suited for anything but the most basic education.
A special thanks to everyone who helped make this possible by attacking GCC and championing LLVM whenever possible. I hope it's very, very easy for you to write extra modules for your new proprietary compiler.
To others: I presume what the parent comment is complaining about is that companies are legally allowed to modify the llvm source and distribute those binaries without source code.
This is not a bad thing, unless you're an open source zealot.
From the URL above:
> We intend to keep LLVM perpetually open source and to use a liberal open source license.
and
> We believe this fosters the widest adoption of LLVM because it allows commercial products to be derived from LLVM with few restrictions and without a requirement for making any derived works also open source (i.e. LLVM’s license is not a “copyleft” license like the GPL).
Yes, in some circumstances that's true. For example, recently I think it was a GNU codec library that was released under a permissive license, because there are plenty of proprietary video codec libraries and for a free format to win, a permissively-licensed library is useful.
But Stallman put the GCC under the GPLv3.
So I don't think your comments re: papacy are terribly on-point.
"They have also traded away a way to encourage others to keep it open in return for wider adoption."
s/encourage/force/
If you have to force people to do what you want, who cares.
Leading is about getting people to go in a direction they may not want to go.
Not pushing them off a cliff.
Many of us read the site always in this manner. While arguably this post (and a small but significant minority of others) are false positives, I find that most of the [flagkilled] posts are removed for good reason. The current system has flaws, but is not "complete nonsense".
I have a lot of trouble coming up with a case where we wouldn't upstream something. Do you have any evidence for your concern, based on history, or is it all random hyperbole?
As both a GCC and LLVM developer, i can tell you that GCC lost entirely of its own accord.
PS it's somewhat ironic that Google contributed a lot to GCC, and you complain about it and assert they have poor motives because they decided to move to a different technical solution, yet from what i can tell looking at changelogs, you have never contributed to either GCC or LLVM.
If you want the world to turn out the way you want it, you actually have to participate.
I don't think Google has poor motives at all. This is the way the wind is blowing. Google is almost certainly right to move to LLVM and you'd be far better situated to comment than I am.
Personally, I see something as big as Chrome moving to LLVM as a late-stage indicator of the mass adoption of the platform. I'm young, as you've pointed out, and I've never worked for Google, but I'd bet that this decision wasn't made lightly, and it certainly wasn't made early in the lifetime of clang/LLVM.
The people truly at fault for the things I fear, should they come to pass at all, are not the late adopters like Google, but the innovators who decided to put their energy into LLVM, knowing full well how dangerous it could be.
I don't and didn't mean to imply that Google is going to stop contributing, or that Google never has.
I do think that Google's decisions to contribute upstream are based on business sense, as opposed to morality, and I think that should the day come that it makes business sense for Google to not contribute back, or to release a non-free fork, it'll do that. As others in this subthread have pointed out, Apple has already distributed non-free LLVM modules.
The concern I have is that this is possible with LLVM, and it was not possible with GCC. When Apple wrote a non-free Objective-C frontend for GCC, they liberated it because the Free Software Foundation successfully enforced the GPL. There is no legal mechanism to force corporations to contribute back to LLVM, so they do it of their own goodwill, if they do it at all.
I think this is dangerous because it can lead to a world where there are no good free compilers. The people who wrote LLVM, the people who championed it early on and contributed to it, they could have realized this too, and they did nothing to stop it. I truly hope they acted the way they did because I am egregiously wrong, and that nothing I'm afraid of will ever happen.
To put things in perspective, GCC had one fork in its history already. I think that if it was forked again, redesigned extensively to make it easier to get parse trees and add modules and so on, with the legal requirement that all such modules be free in any distributed compiler, the FSF would eventually, hopefully, accept that as the canonical GCC. It would have been harder to do that than to make LLVM, maybe it would have cost the world a few years of compilers research, but it would have been possible, and it would have made for a more secure outcome.
"The people truly at fault for the things I fear, should they come to pass at all, are not the late adopters like Google, but the innovators who decided to put their energy into LLVM, knowing full well how dangerous it could be."
You are talking about things that people have been working towards for years. The people you see working on it now have been working on it since almost the beginning of LLVM.
Google is the company that put their energy into LLVM, knowing how dangerous it may turn out.
But you don't have to take my word for it, check the commit logs.
Just because we didn't make a public pronouncement and try to get press for it doesn't mean it didn't happen.
"I do think that Google's decisions to contribute upstream are based on business sense, as opposed to morality, "
Then i'll just say you don't understand me or the folks that work for me.
"The concern I have is that this is possible with LLVM, and it was not possible with GCC."
It is in fact, possible with GCC, despite your claims. In fact, all you would have to do is change the C and C++ runtime libraries (which is entirely doable nowadays). That's it.
The FSF knows you can interpose stuff legally as well.
" with the legal requirement that all such modules be free in any distributed compiler,"
It is probably not possible to make such a license and have it compatible with various GPL versions, etc.
"hopefully, accept that as the canonical GCC."
You also seriously misread what would have occurred in this situation. People tried what you are suggesting. RMS said no for many years, right up until the point it was probably too late.
Forking again was considered, by all the companies and people involved. But it wasn't worth it to any of them to have to have political fights with the FSF over software development every couple years, when they just want to get shit done.
>Then i'll just say you don't understand me or the folks that work for me.
I'm sorry, Google is a publicly traded company. Are you really saying that if there was a clear business reason to release proprietary LLVM modules, Google would damage their stockholders and continue to release them freely?
I don't think I understand you. I never made that claim. I do think that corporations exist to make money. I don't think this is unreasonable, and I think it's unreasonable to ask me to take such a leap of faith in the opposite direction of common sense when considering any corporation, even one as benevolent as Google.
>It is in fact, possible with GCC, despite your claims. In fact, all you would have to do is change the C and C++ runtime libraries (which is entirely doable nowadays). That's it. The FSF knows you can interpose stuff legally as well.
The GCC is released under the GPLv3. There are some libraries inserted into compiled code with a linking exception, but it isn't clear to me how you could release a fork of the GCC under a proprietary license.
If you make that claim, you're going to have to explain it in greater detail, because you're essentially claiming that the GPLv3 is totally toothless. My apologies if I've misunderstood you.
>Forking again was considered, by all the companies and people involved. But it wasn't worth it to any of them to have to have political fights with the FSF over software development every couple years, when they just want to get shit done.
I understand the desire to get shit done, but in some cases, you have to realize that there are dangers associated with charging ahead regardless of potential consequences. There's a reason why nuclear plants are rigorously regulated, even if a lack of regulation would probably cause more shit to be done.
And actually, none of this discussion about GCC or the FSF or whatever is even relevant. The authors of LLVM could have just released it under the GPL. They chose not to.
So if that decision costs the free world its compiler, they're who I'll blame. Not Google, unless Google was involved with that decision.
You get it all wrong. He is not saying "Google will not contribute back to LLVM" per se. He said "Any entity can leverage LLVM without contributing back. It's very nice Google is playing fair with the community, but not all commercial entities will be that friendly, and LLVM's licence makes it easier. He is not attacking Google and there is no reason to take it "personally" and entering to the "defensive mode" immediately.
Pretty simple. He has a claim: "Over time, using Clang effectively will require proprietary modules from ...", then he starts to give some examples, "... Google, Apple, et all". He is not targeting Google specifically, nor any company. He just points out to a possibility, which is legally allowed by license of the project so nobody can guarantee it won't happen without going into legal troubles.
I read that as "He is just giving examples for technology companies that use LLVM somehow" while you seem to read that as "OMG he's attacking Google specifically and intentionally and I must defend it immediately!", well, except that he didn't. There is no need to assume bad faith. Just relax a bit and keep up the good work you do on compilers.
We have never done so in the 10+ years of working on GCC or LLVM.
It's no more valid than me saying "Linus doesn't want to
use GPLv3 because he wants to release consumer devices with the kernel and proprietary modules on it".
IE it's complete unfounded bullshit with not a shred of intent or data to back it up, and goes completely contrary to the history of his work on the project.
In any case, we have no plans to release proprietary modules for clang/llvm.
If you have a competitive advantage why contribute back in any meaningful way? We have seen this type of stuff on Android with Dalvik (where Qualcomm has a special library / modified version of the VM).
That's not to say it destroys freedom, but its not ideal for a certain subset of software. The GPL is also not magical in this regard, since you have projects where things don't get up streamed.
> If you have a competitive advantage why contribute back in any meaningful way?
Cost. If your advantage was perpetual and didn't increase your future support costs, then sure, you wouldn't contribute it back (ignoring belief / culture).
It isn't though. Someone will do something similar and even if they don't, each new version requires you to not upgrade or spend the time integrating your wonder code into the mainline again.
Long term cost of staying current is going to be an issue. Each change to your fork makes bringing in new features from the original harder.
Plus, in my mind, it is a nice self selected pre-screening filter for companies / individuals that would be good to work with.
To flip the thought: If the license forbids you from building a competitive advantage, why contribute at all?
There have been issues with GCC for over a decade that go unfixed and unchanged because it doesn't make the most business sense to contribute to it. In the category of interoperation in particular, the GCC project proved to be openly hostile to the notion; they left a wide gap in the market for Clang/LLVM to fill.
The model might differ for copy left licenses, but nothing really prevents it at the end of the day. I think GCC's arcane code base made the situation worse versus business sense. Otherwise Red Hat or MariaDB would be dead.
Does it matter if my competitor can take advantage of my bug fix in a compiler? I don't think copy left licenses are a good fit for every project, but there is certain infrastructure in the world where ideally everyone can benefit.
And vendors do contribute performance patches back to AOSP. ARM's Linaro group has updated & NEON-enabled some libraries, Intel contributed SSE optimizations and x86 support in general, Nvidia contributed NEON optimizations, Imgtec for MIPS support, etc...
There's a cost to maintaining a downstream fork, and a slight competitive edge tends to not actually be significant enough to justify the engineering cost.
I am not entirely sure why you got downvoted so much - probably due to the 'attacking GCC' part which I disagree with you on, but for what it's worth I agree with your point that proprietary modules and forks are a risk with precedence.
For instance Apple came out with A8X which I am sure required special clang codegen optimizations - where is that code? If that continues to sit behind Apple's closed walls then it's already proving OP's point.
Exactly. The lack of Apple's release of its LLVM/clang code for its popular platform is a problem. And it might be a reasonable argument to make about copyleft in the abstract (c.f. Apple's very different behavior toward WebKit which was enforced by license).
But it's not an argument against clang, which remains a high quality free software compiler and one worth using. And citing the existence of said free software as evidence for the "end" of free compilers seems... weird.
Well, one could argue that clang and its license are inseparable and if the license enables the reality that more and more higher quality stuff remains proprietary and that the source-available clang version remains a step child or second class citizen then your "high quality free software compiler" point becomes at least partially invalid.
If on the other hand GCC's license means more companies contributed in the open and only a single first class product remained equally available to everyone then GCC ended up being a better product than clang.
But if you made that argument you'd have to make it with facts. :) The plain truth is that clang is free software, and (c.f. linked article) is very much a "first class citizen" in existing free software environments.
Apple's variant is not free software, and that sucks. So it seems reasonable to argue that it would have been "better" had LLVM been copyleft. But that only extends as far as the facts on the ground, so arguing that we're seeing the "end of free compilers" seems silly to me.
> But if you made that argument you'd have to make it with facts.
We don't have enough facts yet to make the determination - clang is fairly young still - but for now we do have precedences and motives. Precedences you can look up and motives - well Apple dumped GCC because they wanted to be able to do things without legally being required to publish source. So it isn't entirely without reason to wonder if clang will face a second class future due to its license.
There are many, many reasons people might want to avoid the GPL that have nothing to do with wanting to get out of a legal obligation to publish source. The FLOSS world is filled with innumerable high-profile, very successful projects that avoided the GPL for reasons that had nothing to do with wanting to keep some things proprietary.
Sometimes people just want to share software without making a political statement that they may not agree with, or imposing a legal and/or social burden on others (or assuming one for themselves).
The adversarial, black-and-white, with-us-or-against-us accusations that some GPL advocates are known for are actually a big reason why many people don't like the GPL, and associate it with carrying a lot of baggage in addition to the actual legalese that defines the license.
"well Apple dumped GCC because they wanted to be able to do things without legally being required to publish source."
Apple dumped GCC because they wanted control over their own destiny. They could not get GCC to go in the direction they wanted, and it was just a much larger amount of engineering effort to accomplish their goal.
Apple gave not a crap about publishing source to their GCC changes. In fact, they wished they could get more changes into GCC.
The licensing stuff is tangential. Yes, it's their stated reason, but it's a cover story. Do you really think lawyers run Apple?
Hm... I don't quite buy that as the whole story. The gcc stuff may all be true (I certainly don't have any knowledge otherwise), but I don't see where it generalizes to clang/LLVM.
Apple certainly isn't wishing they could "get more changes into" LLVM, they're deliberately witholding the extensive changes they have. The iOS 64 bit toolchain is an almost completely closed-source thing, despite being derived from a free software base. If Apple "gave not a crap" about releasing source, they had an obvious path to do so. That they haven't (and that they've invited PR messes like this argument) implies to me that they don't want to release it.
" The iOS 64 bit toolchain is an almost completely closed-source thing, despite being derived from a free software base."
It would have been this way with GCC too. They had already written their own linker, etc.
Apple didn't give a crap about releasing GCC patches, because it was not for an architecture they controlled.
Much like embedded gcc developers often do, for architectures they control, they are probably just delaying the release until it no longer provides what they perceive to be a competitive advantage.
They would have done this with GCC too (and did in the past!)
> The licensing stuff is tangential. Yes, it's their stated reason, but it's a cover story.
So it's a pure coincidence they stopped updating gcc in OSX right when it moved to GPLv3? And the reason they stopped updating bash, Emacs, etc., and dumped Samba, is also because those projects didn't move in the direction they wanted?
For years developers begged Apple to update gcc, and they did not do it. Mind you, that was at a time when Clang was not nearly where it is today. They dumped Samba and replaced it with a new development of their own that was vastly inferior. They still ship an ancient bash 3.2.51, although developers wanted a new version for years. They even backported the shellshock patch for that. I draw my conclusions from those facts, not from some hearsay. I can't believe you actually think that the GPLv3 is a "cover story". A cover for what? That they think they can do it better? Why would they need a cover story for that? Why would they even care?
They stopped updating GCC precisely when they decided, and announced, they were moving to llvm/clang.
Past that, you literally ignored the main point:
They stopped updating plenty of opensource stuff, you've just picked out the GPLv3 stuff and said "it's all because of this"
> They stopped updating GCC precisely when they decided, and announced, they were moving to llvm/clang.
Not true. They switched to clang with OS X 10.7. That was 2011. At that time, their gcc fork, based on 4.2 and carefully avoiding any GPLv3 code, was already ancient and loaded with problems. Past that, you literally ignored the main point: why would they need a "cover story" in the first place?
llvm-gcc was introduced with Xcode 3.1, and clang/llvm in xcode 3.2. It targeted 10.5. This was well prior to 2011 , and seeded well before it was released. Again, you don't have to believe me, Chris's resume shows this:
"In this time period, my group expanded use of LLVM within Apple, supported new clients, built new features, and extended LLVM in many ways. We shipped llvm-gcc 4.2 in the Xcode 3.1 and major improvements for it in the Xcode 3.1.1 release."
That time period was in 2006-2008.
Apple made a decision that it was going to move if it could meet certain performance goals in the 2006/2007 time frame.
GPLv3 was not released until June of 2007.
In any case, this argument is pointless, you can just ask Chris why they moved.
> Apple gave not a crap about publishing source to their GCC changes. In fact, they wished they could get more changes into GCC.
So now that they are using LLVM hopefully they will grow out of their wishing and actually push out the sources for iOS clang toolchain some time soonish? Yeah I don't buy that.
OP is being a rather hyperbolic, but it's not really that unreasonable to criticize Clang/LLVM on this issue.
Both projects are politically motivated. GCC began explicitly as a project to provide a FOSS C compiler (few if any existed at the time). Clang/LLVM didn't start at Apple, but their development has been heavily sponsored by Apple, whose interest in the project stems from their interest in excising the GPL (and specifically the GPLv3) from their entire development stack. (Notice how the version of bash that ships with OS X is almost a decade old, and is also the last version that was released under GPLv2).
The fact that Clang/LLVM are released under a FOSS license today does not mean (A) that they always will be, or (B) all essential functionality will always be[0]. With GCC, being a FOSS compiler collection is their entire raison d'etre - it's right in the name![1]
Edit: Reworded sentence to remove ambiguous antecedent.
[0] (ie, it's conceivable in the future that nobody will want to use Clang/GCC on its own, but will essentially have to use it in conjunction with another piece of related software, and there's no guarantee that this software will be FOSS. With GCC this is not a relevant concern only because the FSF would never let that happen; it undermines the entire founding point of the project.
To be fair to clang, one big motivating reason for starting clang (one of the reasons I got involved in helping clang myself) was the fact that at that time GCC would refuse any patch which made it easier for anyone to get a C++ parse tree out of gcc.
clang was designed to do that from the start, and for me this has lead to greatly improved C++ tools.
> To be fair to clang, one big motivating reason for starting clang (one of the reasons I got involved in helping clang myself) was the fact that at that time GCC would refuse any patch which made it easier for anyone to get a C++ parse tree out of gcc.
A friend of mine is a long-time kibitzer of C compilers, and his occasional remarks about the state of the world wholly harmonize with this - GCC was not good for interop, and the contributing process has a higher bar than others.
Actually, the reason Apple sponsored Clang/LLVM is because Apple engineers were unhappy with GCC's build times[1]. If you need to rebuild an entire operating system (kernel and userland) every day, your C compiler's build performance matters a lot.
A major problem with the GPL from the point of view of a closed source software vendor is that you can't integrate it into a closed source project.
Apple wanted to integrate the compiler more deeply into their IDE, Xcode. GCC didn't allow that without making Xcode GPL too - which was out of the question. Apple has no problems contributing changes back to GCC or clang -- but there is no way they will make XCode open source.
Clang allowed Apple to take their IDE to a whole new level. Since the move to clang, features like code completion, scope higlighting, refactoring tools and inline error display (with somewhat helpful autocorrect suggestions) have vastly improved.
Apple didn't want to get rid of GCC out of spite, butthe restrictions of the GPL were holding them back. If you are a supporter of copyleft licenses, you'll see this as a success (hindering proprietory software), but from Apple's perspective it is obvious why they chose to support a compiler with a more liberal license.
> A major problem with the GPL from the point of view of a closed source software vendor is that you can't integrate it into a closed source project.
And a major problem with GCC related to the GPL is that it has historically resisted changes which would make it easier to integrate even into an open-source project, though it has eased up on this a bit lately (possibly due to competition from clang?) Still, there's a reason that code completion and other code-aware plugins for things like vim and emacs are increasingly clang-based.
> A major problem with the GPL from the point of view of a closed source software vendor is that you can't integrate it into a closed source project.
Commercial software usually has the same problem. Those dang companies won't give me their source for free, and they demand a license fee to integrate their products into mine!
The issue with the GPL is less the GPL than the multitude of authors for any one project. There are many single-author GPL projects which happily accept money for a non-GPL version of the software.
That becomes much harder when you have 40 authors, some of whom are dead..
"but their development has been heavily sponsored by Apple, whose interest in the project stems from their interest in excising the GPL (and specifically the GPLv3) from their entire development stack."
This is not accurate in any respect.
It would be accurate if you said "early development" (original development was sponsored by UIUC).
Their interest in the project was not at all in excising the GPL. They didn't care. That was a political position they took once on a GCC mailing list. But lawyers do not run Apple. If they wanted to keep using GCC, they would have kept using GCC.
They wanted faster build times, a better infrastructure, and something they felt they could invest in and not have this amazing uncertainty about where it was going and what it's goals were.
They also didn't want to have engineering stymied by the politics of GCC (it is less political now, it was very political then).
The "piece of related software" is likely to be a binary blob that outputs the special instructions for some optimization in a new CPU, or GPU instructions, or similar.
Or it could be a frontend for a new proprietary language.
In practice, Apple's hardly the only contributor to LLVM these days, though; Google's on the same scale, and there are other large contributors. If Apple or Google or another large contributor stop contributing, it's likely that those remaining will fork if necessary and continue.
Not completely. Proprietary modules and forks of both exist, so in the broadest sense they are not (in the sense of, if I'm ever handed a copy of something calling itself LLVM, I do not know that it is libre software).
But worse than that, proprietary modules can be mixed-in to Clang and LLVM. So essential functionality can be hidden in proprietary modules. Imagine that Apple wants to do something nifty for Swift, but doesn't want Google to be able to use it in Go -- they'll release a proprietary module that can be linked into Clang.
All free code in LLVM can be forked and made proprietary, and no proprietary code can be reasonably expected to be liberated. So the balance of free to non-free code can only ever get worse.
I'm sure that the libre software world being based on a proprietary compile will be a great thing to add into the mix of pervasive surveillance and network penetration.
Not completely. Proprietary modules and forks of both exist, so in the broadest sense they are not (in the sense of, if I'm ever handed a copy of something calling itself LLVM, I do not know that it is libre software).
By your definition, any non-copyleft open source licensed software ceases to be open source 'in the broadest sense' once a proprietary fork exists. Which is just silly, some software is open source according to the open source definition or it is not.
Imagine that Apple wants to do something nifty for Swift, but doesn't want Google to be able to use it in Go -- they'll release a proprietary module that can be linked into Clang.
People who pick the Apache, MIT, or any non-copyleft open source license do this knowing that proprietary forks or extensions are possible. Not everyone's definition of 'freedom' is the same as the FSF.
Also, I would like to point out that the same thing happens in copyleft-land. Companies dual-license their code under a proprietary license and let contributors sign agreements, to shut out competitors and to get people to buy expensive proprietary licenses. Oracle thankfully uses the GPL for such strategies. In fact, they recently relicensed Berkeley DB and Berkeley DB XML under the AGPL(!).
I'm sure that the libre software world being based on a proprietary compile will be a great thing to add into the mix of pervasive surveillance and network penetration.
Just help me understand. FreeBSD takes the open source LLVM/clang, uses it to compile their open source software. And suddenly it becomes proprietary. How so?
>Not completely. Proprietary modules and forks of both exist, so in the broadest sense they are not
This is also true of GCC. Lots of organisations have private forks and the GPL allows that. More generally, if somebody offers 'compiler as a service' over the internet then the GPL becomes irrelevant and they could add as much private code to GCC as they wanted. The GPL only forces you to contribute back under a very specific and narrow set of criteria. Criteria that the majority of software being written in 2014 doesn't meet. The GPL is largely irrelevant to most software shops these days - they freely incorporate piles of GPL licensed code into proprietary closed source products. They can do so because most new software is internal to organisations or delivered as an internet service. The GPL was designed for a different world.
Software freedom has been set back because of people clinging to the GPL as the final word in software freedom. Your kind of GPL centric propaganda results in young developers today thinking they are doing the world a favour by writing proprietary closed source web apps - because they are using FOSS GPL libraries, right? And targeting the 'open' web, right?
Do you AGPL licence all the code you write, including website backends? Does your employer? If not you should probably take a close look at yourself and consider that maybe you are part of the 'problem' you are decrying.
Someone who owns and distributes GPL-licenced software is not bound by the licence, they can allow themselves to fork it with a different licence. Apple employs the owner of CUPS, so they could abandon cups and 'start' anew closed-source.
"Not completely. Proprietary modules and forks of both exist, so in the broadest sense they are not (in the sense of, if I'm ever handed a copy of something calling itself LLVM, I do not know that it is libre software)."
Proprietary forks and modules of GCC exist too.
Shocking, I know.
Well, if they do they're never distributed, so a better term would be private, not proprietary.
I suppose in the corporate sense, these two things are indistinguishable, so I should specify that I meant non-free, in the free-as-in-freedom sense, but I don't think I was ambiguous.
I've been having this conversation in good faith, though my opinion is unpopular, and I'd invite you to do the same.
I think Clang could see the end of the MSVC compiler except where .NET compatibility is required. Thus this is actually a win for open source software. Seriously, Clang is just awesome in terms of performance, debugging ability and standard support compared to MSVC.
I wonder, with the recent open sourcing of C#/.Net, would a Clang/LLVM module for them be out of the question? That would make for some sweet ability to port applications around. :)
That depends on if you are encouraging "free" for societies interests or "free" for individual/corp interests. GPLv3 encourages the former, but not the later. The two interests almost always come into some degree of conflict (although in many ways are compatible).
I view the flamewarz between BSDish and GPLvX licenses as similar in spirit to the arguments between laissez faire capitalism and northern European social capitalism.
For me personally, important reasons for switching from GPL licenses to Apache are: the Apache license I can read and understand; the GPL is vague in many points, leading to multiple interpretations; and license compatibilities between the GPL and other licenses (and between GPL versions/variants).
Also, I don't want to force my ideology (I find FLOSS preferable) on other people, while still giving my software away. However, technical reasons such as the above were 50% of my license choice.
Given the vagueness of the GPL, I can fully understand that many companies do not want to deal with that, even if they want to contribute to FLOSS in some way.
"That depends on if you are encouraging "free" for societies interests or "free" for individual/corp interests. "
I disagree - the definition of software being free to modify and redistribute doesn't change based on the intent of the modifier.
There are more restrictions on your freedom to do these things under GPLvX than under Apache/etc.
A software author chooses which license based on the desire to encourage societal interests or individual interests, but the underlying meaning of 'free' remains constant.
Myopically considering the individual piece of code, it's easy to say that a permissive license is more free. The question of "what leads to more freedom in total" is more important, and not as easily answered.
Your phrasing implies that invoking more control over the code in a project has the potential to lead to more freedom in total. I'd argue that this is ... if not more myopic, at least a more ego-centric view. That is, it implies that the author knows better than everyone else how to maximize total freedom engendered by his efforts, on the basis of how he or she permits them to be used - instead of allowing others the freedom to make their own choices.
We're not talking about arbitrary control; we're talking about one specific set of restrictions designed specifically for the protection of freedom. It's quite possible they fail at that, compared to alternatives, but it is not at all incomprehensible that they might succeed - restricting some behavior often leads to more freedom in general, especially when that behavior involves exercise of power over others. Proof of existence, by example: Selling a knife with a "this can't be used for mugging" clause - in a world where mugging wasn't illegal - restricts the freedom of the purchaser but only when you don't consider those they would impact if they exercised that freedom. To be clear, I'm not saying "selling proprietary software is exactly like mugging"; I'm just saying your general "restrictions always mean less freedom" doesn't hold up.
All of this is not to say that I think it's entirely clear that copyleft licenses do lead to more freedom overall. My initial statement was precisely that it's not particularly clear. My personal expectation (which I'd argue for if we want to go down that path but hold weakly in that I consider other views reasonable) is that it varies from case to case.
The GPL isn't about the freedom of the dev to do whatever they want, it's about the freedom of the code to always be available.
EDIT: Essentially, saying you aren't free because you're not free to kill me without repercussion is absurd. GPL advocates view freedom the same way: You can't do something to hurt me, but that doesn't make you less free.
That's quite literally not what I said. I said that freedom does not inherently mean no limitations. Murder was my example, but that does not mean I equate software distribution to murder. (I had figured this crowd would be astute enough to reason as much.)
For the record, I believe that the BSD and MIT license allow the distributor to withhold source from me, which does "hurt" me from my point-of-view.
As an example, How many chemistry and biology lab machines have you seen running windows 95 or dos because the company won't release updates for old software and want you to buy a new machine?) I've seen many, and it's very difficult and expensive to keep them running at times because they don't work under emulation for various reasons.
I recommend that you read up on Negative liberty (https://en.wikipedia.org/wiki/Negative_liberty). The freedom from interference by other people is an important freedom, and can only exist by limiting the actions of others.
To reference Erich Fromm, its not about "freedom to", but "freedom from". If you modify or distribute a work based on a copyleft work, you have "freedom from" being sued for patents, DRM, or proprietary copyright restrictions. If the work was based on a permissive licensed work, no such freedoms are given. You only have freedom to distribute the original work or modifications of it.
This is a great reply, but it gets very deep into parsing and subjective opinion without coming to any sort of concrete conclusions (that can be applied to licensing anyway).
Personally, I'm happy for others to use most of my code without contributing back. Does that therefore mean that you and I have different definitions of the word "freedom"?
If so, then why isn't that in the dictionary? Do we need separate dictionaries?
If you want to give people freedom to modify and distribute your code, then that is a freedom as per the same dictionary that I use. I have no problem with its definition.
Freedom to, and freedom from, both include the word freedom. They share philosophical ideas, most which originate from the ancient Rome. The question we are having is how to solve the paradoxes which said philosophy created.
I thus personally prefer to use the word liberty rather than freedom. Liberty is commonly understood to have a philosophical connotation, while freedom is more associated as mechanical concept. A slave can reach freedom by running away, but to gain liberty, they got to be given rights.
(Not to imply that BSD isn't granting some liberties. It is. The above is about the word freedom.)
> If I am using software licensed under the GPL, then the code _must_ be made available.
If you are distributing software under permission of a GPL license (e.g., you aren't the copyright holder) you are required to also make the source code of what you are distributing (which may not include all of the original on which it is based) available.
If you are using software that you received that was licensed under the GPL, the source code may or may not be available (it may have been required to be at the moment the software was distributed, but whether it will be later or not is less clear), and the source of the upstream may or may not be available even if the source of what you received is.
GPL doesn't keep the source code that it is attached to available, it assures that the software or legal derivatives will not be legally distributed except under terms that make the source code available. This may encourage the source code to remain available (if there are factors encouraging the distribution of the software), or it may not.
Honest question, is your argument based around the idea of: If the person/entity who has the source of a GPL'd software dies/disappears the source of a binary you're using may not ever be available?
Otherwise, you should be able to request the source and the distributor would be required to give it to you under the terms of the GPL?
> In your world, helping a friend (or a stranger) is like killing somebody?
That literally makes no sense.
I was responding to the assertion that the GPL isn't about freedome because it imposes limitations. Living in a free society also has limitations, as an example I used killing another, but we still consider the society free, so the argument doesn't hold water. Limitations =/= Unfree
Also, I never asserted that you couldn't help someone. You're free to work on your own code or other code licensed under a license you find to be fair by your own terms.
> I'm glad I'm not a part of that cult.
I'm not sure what you're referring to, as I believe what I do because I chose to and have come to this position through much debate and reading; I'm not part of any group whose dogma I'm backing. I'm perfectly free to change my opinion on the matter, without repercussion.
Please stop using hyperbola, ad hominems, and baseless (nay useless) analogies and please write a coherent rebuttal if you choose to debate this subject.
> I was responding to the assertion that the GPL isn't about freedome because it imposes limitations.
People make the example about killing because there are the conflicting freedoms of two people involved: the killer and the victim. And people make that example as if the GPLs restrictions always involved such a conflict. This is not true. The GPLs limit my freedom to do things that are not an attack on others' freedoms. For example, the freedom to combine and redistribute GPLv2 and GPLv3 licensed code. Or the freedom to share a binary with someone who needs it, without forcefully bloating the distribution with a copy of the entire source code (which that someone likely didn't ask for, doesn't need, and doesn't want to have). The alternative of providing a written offer for the source code (valid for years) can be unacceptable for me because I cannot promise to meet such a requirement -- it makes helping people out potentially very expensive and painful. Therefore my options are to 1) violate the license and lose my freedoms as per the GPLv2 death clause, or 2) not share with the person in need.
I don't see how I would be violating anyone's freedom in case 1 -- but I lose mine (if I had freedom to begin with, I think that is questionable). In case 2, the GPL is definitely not helping towards ensuring freedom for either me or the person who needed my help. No, the license is just restricting both of us.
> Please stop using hyperbola, ad hominems, and baseless (nay useless) analogies and please write a coherent rebuttal if you choose to debate this subject.
It's useless to make a coherent rebuttal because GPL fanatics will just make some incoherent arguments about users versus developers' freedoms. Oh yeah, my freedom to help a friend is a developer freedom, and therefore does not matter. Me wanting to help a friend is like wanting to kill somebody. The society is better off without letting me do such evil.
If you think this is freedom, you have such a twisted and distorted understanding of the word that you're as good as a cultist.
> People make the example about killing because there are the conflicting freedoms of two people involved: the killer and the victim. And people make that example as if the GPLs restrictions always involved such a conflict. This is not true.
What about the developer vs the user? That's the very conflict we're discussing here.
> The GPLs limit my freedom to do things that are not an attack on others' freedoms.
That depends on what you believe my freedoms are. I believe that I should have the source of anything I run; in such a case you withholding source from me is an attack on my freedom.
> For example, the freedom to combine and redistribute GPLv2 and GPLv3 licensed code. Or the freedom to share a binary with someone who needs it, without forcefully bloating the distribution with a copy of the entire source code (which that someone likely didn't ask for, doesn't need, and doesn't want to have). The alternative of providing a written offer for the source code (valid for years) can be unacceptable for me because I cannot promise to meet such a requirement -- it makes helping people out potentially very expensive and painful. Therefore my options are to 1) violate the license and lose my freedoms as per the GPLv2 death clause, or 2) not share with the person in need.
Two points:
1) Noöne is forcing you to use the GPL for your own work. While I would find it preferable, I would never force you to; I would simply choose not to use your software if you weren't making the source available (which you need not to under certain licenses).
2) I do not view "bloating the distribution with a copy of the entire source code" as a bad thing, and certainly not an excuse to not use the GPL.
> It's useless to make a coherent rebuttal because GPL fanatics
Thank you for the ad hominem
> incoherent arguments about users versus developers' freedoms.
You've yet to establish that the argument is incoherent, probably because, based on your first few sentences, you somehow don't believe it exists.
> Oh yeah, my freedom to help a friend is a developer freedom, and therefore does not matter.
You're not helping them if you're not providing the source in my opinion. You're simply band-aiding a problem at best and forcing complacency against usage of their own device at worst.
> Me wanting to help a friend is like wanting to kill somebody.
Again, I've literally never said this, nor implied it.
> The society is better off without letting me do such evil.
No, society is better off with people like you who have do believe in sharing your source, but are put off by some of the issues with the GPL. (Yes, I did just say the GPL isn't perfect.)
Society is not better off when someone takes previously free code, makes it unfree, and then proceeds to use it to lock users into their system.
> If you think this is freedom, you have such a twisted and distorted understanding of the word that you're as good as a cultist.
Thank you again for the ad hominem and hyperbole that really don't make much sense.
No, that's the false dicothomy GPL proponents keep bringing up. The freedom to modify code and the freedom to distribute the software (modified or not), is something you claim to be trying to be protecting for the users' sake, but as soon as I try to exercise these freedoms, you call me a developer and a distributor. If one can't exercise these freedoms without being labelled as such, these aren't user freedoms at all. But for me, as a user, the freedom to share (modified or not) software with other users is a very important way to help others out, and you people keep telling me there's a conflict in that.
> I believe that I should have the source of anything I run; in such a case you withholding source from me is an attack on my freedom.
Strawman argument. I'm discussing the scenario where I help people out by giving them software they need, and ask for. I'm not withholding anything, but if they're not requesting the source code, I'm not going to make life inconvenient for both of us by forcing it on them anyway. And just because I can help someone out at time t doesn't mean I can promise to give them the source code years after. It just doesn't work that way. Not making such a promise, however, is very different from "withholding source", which is the straw man you're making.
> Two points
1) Yes, I can choose to use whatever license I like for my own software. That has nothing to do with this discussion. Dismissed.
2) Then you do not understand what problems people have in the real world. If their system is broken and I'm giving them a file to fix that, I'd be very much of a douchebag to force them to download a potentially large archive full of source they don't need. Then tell them to download the tools to extract it (on their system that desperately needs help). Then tell them to remove all that crap so they can get just that one file they needed.
Likewise it would be very sad if I had to tell them that no, I cannot help you now by giving this file because I would need to find and download the source for it (the binary might've been compiled years ago).
Why do you have to oblige me with crap that doesn't help me nor the person I'm helping? And you are calling that freedom? No, it's not. And this "freedom" is the very reason I really don't help people much these days, or if I do, I do it either illegally or with truly free software, not this fake kind of free that tells me to bugger off should I dare share.
> You're not helping them if you're not providing the source in my opinion. You're simply band-aiding a problem at best and forcing complacency against usage of their own device at worst.
Your opinions don't fix people's software problems. Sometimes, files might. But there we go. Someone needs help, I help him, and the GPL fanatics say, oh look, clarry just almost slaved and murdered somebody because he didn't suffocate that poor fellow with a truckload of source code. So evil. The person who was helped thanks me and I might give him a tip as to how to avoid the problem in the future. Sure sure, you think I'm not helping him. He should just move to the first world and get a broadband so he can afford to download, who knows, maybe dozens or even hundreds of megabytes of source he doesn't need? And of course I'm responsible for finding and distributing all that, with my not-so-fast line. You think I'm not helping, I think you're insane. What ad hominem?
Free software is about the users ability to understand how the software works, modify it to their whim, and distribute their modifications or changes.
Since permissive licenses enable downstream users to recast the project into a proprietary state, denying those freedoms, then they are less free, in the free software sense.
Permissive licenses are developer friendly. They let you do whatever you want, including restricting users of your software. Copyleft is user and ecosystem friendly, by making it so any use of the code must stay available.
We're talking about 2 different issues. If your project is GPL anyone using it could/should be able to get the source. With a BSD project that is not necessarily true.
We're still not talking about the same thing. I'm talking about the project you're using and need source for. You're talking about using other projects in another.
We're not? It sounds like we are... If the project that you're using and need source for is GPLv2, and the code you want to use is GPLv3, then you cannot use it (and it might not be good idea to even look at it -- depends on how litigious that other project is)
The user/developer divide is the worst excuse for the GPLs' restrictions. Once users "modifiy it to their whim" and distribute the changes, they're developers and distributors. At that point, it's the developers' and distributors' freedoms that matter to them.
It's not about being more or less free. You should ask the question "freedom for whom?"
People who use Copyleft licenses want the users of the software to have freedom. People who use permissive licenses want the developers of the software to have freedom.
Permissive licenses are good for commercial purposes too in embedding them into proprietary software which is freedom for commercial purposes. That is why legal departments love the freedom given by permissive licenses.
Strictly speaking, copy-left licenses can be applied to commercial purposes. Though certainly there are many purposes with which they are incompatible, and many of those are commercial in nature.
MIT: "heres <product>, do whatever you want with it"
GPL: "heres <product>, do whatever you want with it as long as you make all your changes public, oh and theres a ton of rules you need to conform to if you want to distribute <product> with <other_product>"
I don't see how a license with MORE restrictions can be seen as free-er.
GPL continued: "and because we came up with all these crazy rules, you'1l probably come across other free software (including ours) whose rules you can't abide by while playing by ours, so you're not permitted to do much to remix and redistribute these two code bases... sorry, you may not! but you're still free! ehehe! you're still free because you're a user and if you're trying to exercise the two or three freedoms that are relevant to developers and distributors, your freedoms no longer matter! you still have these freedoms though, even though you may not!"
And if you still want to exercise these freedoms, you're like, you want to kill people ... that's crazy!
I wish you'd said this in a less childish way. The point about GPLv2/v3 conflicts demonstrating how unfree the GPL can be is good, but the post itself is downvotable.
I'm not proud of the way I put it, but I guess that just shows how tired I am of this argument. The same hypocritical claims about GPL being free despite very obviously denying very important freedoms are repeated all over the place, and then I'm a killer and a developer (how evil of me to patch that code for someone!) and all that, because that's the most coherent arguments people can make. Ignoring the actually relevant freedoms at hand and going into meta-discussion about the meaning of freedom and making analogies concerning completely unrelated things (such as killing or otherwise harming) is how they argue when they can't address the problem -- if they don't just flat out say that I don't need that freedom to share or mix code... Yes I'm very tired of it.
Life goes on, and I continue not to share a large body of GPLv2 licensed code with anybody because it would be illegal for me to do so. I keep telling them it's because the license is not free, but it just doesn't seem to work.
Funny, after some exposure to GNU codebase (including GCC) I used to thought, that evil M$ is trying to destroy free software, by poluting it with horrible code.