Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>as Apple refused to continue work on gcc due to the licensing changes

This. As stated in the accepted answer in the linked article, licensing issues are the real reason. Technical differences are ephemeral. The competition between GCC and LLVM has a habit of inducing improvments in both projects. By all means, at any given point in time one project can have an edge over another in this niche or that edge case. But fundamentally this is a philosophical divide between Free Software and Open Source Software.



This is a licensing debate, but please don't conflate that with a divide between "Free Software" and "Open Source". Both GCC and LLVM/clang qualify as both Free Software and Open Source software. Both terms encompass both copyleft and non-copyleft (all-permissive) licensing.

GCC uses a copyleft license; LLVM/clang uses an all-permissive license. FreeBSD prefers to avoid dependencies on copyleft code, especially in their core; thus, they naturally prefer LLVM/clang.


Apologies. That is a better comparison: A divide between copyleft licensing and permissive licensing.


Then again, copyleft licensing is idiomatic of free software, and permissive licensing is idiomatic of open source software.

This essay covers the essential differences:

http://www.linfo.org/open_source.html


No, it's really not in anything but an inaccurate tribal sense. The FSF has recognized BSD/MIT-style licenses as "free software" since before the Free Software Definition was published. The Open Source Definition recognized copyleft licenses in its very first drafts too.

What you're thinking about is the fact that the "Open Source Movement" (and its formalization in OSI) were created largely to decouple the FSF (really RMS specifically) from the broader movement and remove his status as a default evangelist. Whether this is a good or bad idea is a flame war for another day (and it's been had more times than needed over the past 15 years), but it has absolutely nothing to do with the content of the licenses.


I did mean the tribal sense, yes. It's more likely that someone talking about free software is a proponent of copyleft, and someone talking about open source software is a proponent of permissive licensing. Then again, there is open source code out there that is not free (in the RMS / FSF "four freedoms" sense) due to patents, tivoization, and the absence of a requirement that end users get access to modifications, e.g. you can run a website with open source software but I'm not guaranteed access to your changes.


That's a very misleading essay.

"It is that, whereas free software is always also open source, open source software does not necessarily have to be free software. That is, software can be open source without granting its users the additional freedoms that free software guarantees."

This is incorrect, and the example given was incorrect. The terms are identical in meaning. Open source was coined to be a trademark for free software.


If I give you Tivoized BSD code, this is open source but not free software, at least since GPLv3.


First of all, creating a new free software license does not alter the freeness of any software/license. GPLv3 incompatibility does not make software non-free, otherwise Linux kernel would not be free anymore.

Second, the Tivoised BSD code is free software. The fact that a piece of hardware exists that refuses to run a modified version of some BSD licensed code, does not make the code non-free.


Well, I'm going to take the FSF as the authority on what freedom means with respect to software, since it's their term. They clearly view GPLv2 code as less free than GPLv3.

https://www.gnu.org/licenses/rms-why-gplv3.html

Quoting the relevant bits about tivoization:

> The manufacturers of these computers take advantage of the freedom that free software provides, but they don't let you do likewise... Freedom means you control what your software does, not merely that you can beg or threaten someone else who decides for you.


I don't think this thread is worth continuing.

- GPLv2 is free software https://www.gnu.org/licenses/license-list.html#GPLv2

- If I take the Linux kernel 3.10.6 and create a piece of hardware that refuses to boot up any other version, Linux kernel 3.10.6 is still free software.


The FSF defines freedom in terms of the four freedoms: use, modify, copy, distribute. When people started abusing the GPLv2 in ways they didn't think about, they came out with the GPLv3 to protect these freedoms.

I think your argument is really with the FSF. There was no shortage of drama when Linus refused to upgrade the Linux license to GPLv3.

Tivoization removes the freedom to modify your software (and still have it run). Again, quoting the FSF about tivoization:

https://www.gnu.org/philosophy/free-sw.html

> Freedom 1 includes the freedom to use your changed version in place of the original. If the program is delivered in a product designed to run someone else's modified versions but refuse to run yours — a practice known as “tivoization” or “lockdown”, or (in its practitioners' perverse terminology) as “secure boot” — freedom 1 becomes a theoretical fiction rather than a practical freedom. This is not sufficient. In other words, these binaries are not free software even if the source code they are compiled from is free.

I don't know what else to say. The FSF writes, "these binaries are not free software". They're referring to Tivoized Linux binaries. They get to make up the rules here. That includes changing their mind about freedom such that something that was formerly totally free is now less free.

FWIW, I'm not advocating for or against GPL software.


> Well, I'm going to take the FSF as the authority on what freedom means with respect to software, since it's their term.

No, it's not "their" term. They didn't invent and trademark term "Free". People were always using this word in context of software to mean that something is free of charge, and that is still the major usage of the term if you go asking users of the actual software.

I don't care about FSF at all, but it bothers me when people assume that "free" could only possibly mean "Free (tm) (c) FSF". The term existed long before FSF with completely different meaning, which is still retained by >90% of the users.

It's only the developers (and lawyers) that argue whether GPL, BSD, MIT or any other software is "free", free or not free. The users call it free if they can use it without paying for it, and that's all that matters to them.

</rant>


We have two perfectly fine terms 'free software' and 'freeware' to denote programs that are distributed under a license compatible with the ideals of the free software movement and for software that's distributed free of charge.

Of course the free software movement doesn't own the term 'free', but context matters.


Just fyi, the Linux kernel is under GPLv2, not GPLv3, afaik.


Just fyi, that was the point in the argument. :-)


The original argument, perhaps, but that's certainly not how I interpreted "GPLv3 incompatibility does not make software non-free, otherwise Linux kernel would not be free anymore."


This is a licensing debate, but please don't conflate that with a divide between "Free Software" and "Open Source".

Personally I'd call it a divide between "Free" Software and Free Software. The GPL's style of bringing freedom to the world reminds me of Operation Iraqi Freedom...


Well the GPL technique is used elsewhere, in far more places that OIF...

For instance, there are laws constraining doctors from releasing sensitive medical information about persons for the greater good of society at large (since people should therefore not have to worry about their doctor leaking news of their embarrassing disease they are being treated for).

Something as simple as everyone paying taxes to provide for things such as air quality testing so we don't end up like Beijing are another example, along with mandating carbon controls so that we can at least try to arrest runaway greenhouse effect that would cause global warming down the road.

Sometimes long-term freedom does require constraint on permissible action. Sometimes it doesn't. But it's not sporting to compare someone who tries the former route to invading a country IMHO, even if you personally feel the latter is better.


> Sometimes long-term freedom does require constraint on permissible action.

mpyne nailed it. If anyone is looking for further discussion of this concept check out "Social Contract Theory."[1][2]

[1] https://en.wikipedia.org/wiki/Social_contract

[2] http://www.iep.utm.edu/soc-cont/

Sidebar: It doesn't hurt that you get to say cheeky things like "Before the GPL life was nasty, brutish and short."


Before the GPL life was nasty, brutish and short.

... never mind that GNU was around for 6 years, and BSD was around for 12 years before the GPL was published.


BSD was around, but the BSD license was directly inspired by the GPL. Prior to the Net/2 release, and the AT&T lawsuit, running BSD required paying multi-kilobuck prices for a UNIX source license.


>the BSD license was directly inspired by the GPL.

The BSD license clearly derives from the MIT X license (1985 at the latest) rather than the GPL.

Berkeley's code in 4.3-Tahoe (1998) used the BSD license (with slightly different formatting).


running BSD required paying multi-kilobuck prices for a UNIX source license.

How is that relevant? Running linux requires paying multi-dollar prices to buy a computer; does that make the software any less free?


Just to be clear, the BSD license did not exist previous to net/2 it was not open source or free software in any meaningful way.


Well, you can sell GPL'd software today for "multi kilobuck" prices too, if you wish, without affecting how Free the end product is.


I am not trying to be difficult; but I do not understand what your point is? Yes, things happened prior to the social contract. That experience is the whole point of contracting out of the state of nature.


Maybe I misunderstood. Were you intending to imply that 12 or more years of freely licensed software constitutes "nasty, brutish, and short"?


You misunderstood, but no worries. If you missed the reference I imagine many others did as well. "Nasty, brutish and short" is the Hobbes quote about the state of nature. Here is a little teaser from WP:

Thomas Hobbes famously said that in a "state of nature" human life would be "solitary, poor, nasty, brutish, and short". In the absence of political order and law, everyone would have unlimited natural freedoms, including the "right to all things" and thus the freedom to plunder, rape, and murder; there would be an endless "war of all against all" (bellum omnium contra omnes). To avoid this, free men contract with each other to establish political community i.e. civil society through a social contract in which they all gain security in return for subjecting themselves to an absolute Sovereign, preferably (for Hobbes) a monarch. [1]

Hobbes/Locke/Rousseau's social contract is similar to mpyne's "Sometimes long-term freedom does require constraint on permissible action."[2]

[1] https://en.wikipedia.org/wiki/Social_contract#Overview

[2] At least in my reading of his comment, it is entirely possible that he thinks I am a crackpot and completely missing the point.


No, you're pretty much right on point.

Sometimes I like to think of it as the problem with local minima/maxima preventing an optimization algorithm from achieving the global minima/maxima, except applied at large.

Put in the context of computer software licenses, one should simply imagine a world where all software were BSD-licensed and then see if open-source as we know it could feasibly continue. Certainly it would in some areas, but eventually if a given open-source project were consistently out-competing a proprietary product, the business being disadvantaged could fork the whole thing at once and turbocharge its now-proprietary development for long enough to supplant the old, open version.

Witness what Nokia did with Qt. They poured tons of money into it and turned it in a short time into a mobile-class toolkit that was even more the "Best of Breed". They had so much resource investment that they were able to relicense the whole thing from GPL/QPL to LGPL/QPL. That particular case has turned out alright, but it should be illustrative of the danger of a world with a weak F/OSS ecosystem.

Given all the problems we still have with software patents and other IP shenanigans I simply can't rest on the idea that the mere technical superiority of development "in the open" must necessarily and inevitably lead to a world where software is open and available to the users who would need it, without the judicious use of copyleft licenses in the mix along with BSD/MIT-style licenses. They both have their place.


I caught the Hobbes reference, I just can't see any sane reason for applying it to the GPL.


I can't see any sane reason how anyone can possible miss the connection. GPL provides a social contract that say: If you give away software and tell people that they are free to distribute copies, you can't come back a few days later and sue all their friends for patent infringement. You told him that he could give copies freely to his friend, and by suing, you are stabbing him in the back. This is behavior, even if it might infringe on developers "unlimited natural freedoms" of stabbing people in the back.


I agree with the policies you mention, and I'd say that they serve the greater good of society. I would not, however, try to claim that they are "freedom policies" -- to the contrary, I'd say they're examples of how our quality of life can be enhanced by giving up some freedoms.


The notion of "freedom" is complex and context sensitive. Some people (whom I largely disagree with, as I think this usage of terminology is itself context sensitive; it is, however, useful as a first approximation to get the ball rolling) look at the difference between "freedom to" and "freedom from"; by taking away my "freedom" to own other people, chaining them and forcing them to work for me by force, other people obtain the freedom from being slaves, and now have the freedom to run their own lives. The "freedoms" being looked at here are simply being given to different people: the GPL restricts freedoms of developers working with th software to provide and guarantee freedoms among the end users f that software; on the opposite side, BSD-licensed software tends to give developers more freedom, but the freedoms they are given are specifically for and really narrowly able to be used with the one purpose of later restricting freedoms of others. The question, thereby, comes down to which freedoms are more important and how many of each kind of consumer there are, in an attempt to define which philosophy provides more freedom. Advocates of GPL would say that there will always be more end users than developers, and that their freedoms are porbably more important anyway, so the GPL provides more essential "freedom", even as it is actively defined in a way that "restricts freedom", in the same way as we usually like to think the emancipation proclamation brought "freedom" even though it really was stating that slave owners had to give up some freedom: its all about perspective.


The tradeoff you are suggesting in this case is not valid. BSD-licensed software does not become any less free the moment someone uses it in a non-free project. It is only the changes to the code by the non-free project that are non-free, but none of the original code is affected.

Whether those changes would have been made free if the original code was GPL-licensed is highly debatable, and there are plenty of examples on both sides. Notably, there was more or less no way MacOSX would have been built on GPL code. Conversely, many router projects have been forced to release source code due to being based on GPL-licensed Linux code.


No: the source code being available does not provide freedom to the user if one cannot replace the code being used with a differently-modified copy. To the user, it does not matter in the slightest that the full and complete source code for something is available if they cannot use that source code to affect the binary versions of the code they am working with by changing and recompiling the code. What the various versions of GPL provide is that freedom as it applies to binaries, and thereby when people care too much about source code my contention is that they are a developer, not a user.

When a library is under BSD, for example, and is compiled into a program statically, it does not matter at all whether the developer using it was kind enough to provide the source code to all of their modifications: from the perspective of the user of the binary the freedom to change the software they are using has been lost, even if they are a developer. This is what the LGPL guarantees: not directly that the source code is available (though it does), but that any binary distribution that uses the library also provides the means required to replace the binary of the code with a modified version based on the source.

Moving to the full GPL, what is gained is the "viral" guarantee that this ability to get the source of a binary is maintained as people attempt to use the benefits of the licensed work in a larger binary. The license, philosophically and legally, is not about a property of the source code: it is a property of the binary being distributed; the result is that people who rely on the works of others in their binaries have to make the entire binary open and modifiable to end users. That's what makes GPL so interesting: it is a license about binaries and what the rules are surrounding how people can modify those binaries, and is only tangentially related to source code as the means by which these binaries will be modified.

Of course, as TiVo taught mainstream, there is a loophole: you can comply with GPL2 fully and yet users are able to lose these guaranteed freedoms if the binary software is verified by some kind of hardware lock: Android being open source is academically interesting, but provides no value to the owner of a device with a locked bootloader; GPL2 required the binaries to relate to source code in ways that failed to take into account cryptographic verification by unmodifiable firmware. This is why the GPL3 exists: to provide this freedom of modification to the binaries sitting on my hardware devices, and effectively moves the freedoms being guaranteed from the "binaries" all the way to the product itself.


What happens with forks of the code is not relevant. The original code and the original project continue to exist, and so would the community around it. There's no reason why they would abandon the existing, BSD-licensed project for the new proprietary one. The existence of the new project doesn't have any direct adverse effect on the original one.

At the same time, users of the fork still benefit from the original code that exists in the new project, as there is no need to rewrite it. That effort can then be made to make the new project better. There may not be as much of a benefit as there would be if the fork was also open source, but there's clearly still some benefit if users find it useful enough to use it.

Now, an argument can be made that the ability to fork the code may prevent people from contributing to the original project. In practice, maintaining the diffs for any reasonably active project is a lot of work, and it makes sense to contribute as many changes back as possible, leaving out only the 'secret sauce' bits, just to reduce the amount of work necessary to maintain the fork. Those proprietary bits might have made it into the original project if it were using a copyleft license, but they also might not have been made at all.


You continue to be looking at this from the perspective of a developer: the user was given a binary and wants to be able to edit the binary; the practical way to edit the binary is to get the source code for it, modify it, recompile it, and replace the binary... the BSD license model does not guarantee that this is possible, so the user does not have the freedom to modify the actual program they are using: sure they might have the source code (and I think, for sake of this argument, it is most interesting to assume a totally benevolent developer who does provide all of the source code for every open source project they work with, as that neatly and totally destroys any attempt to argue about source code), but it is now likely statically linked with a bunch of stuff that they don't have the code for (or worse, is running on a hardware device with cryptographic signatures) and so their modified build is useless.

To the user of this binary, your arguments about potential benefits to an upstream open source project are thereby off-topic (especially if the source code is fully available and no one is hiding any modifications) and your discussion of "forks" is downright nonsensical: given 100% of the source code of the software running on a TiVo, you still have no freedom at all to actually modify that software. The system is "open" in some weird, mostly academic fashion, in that you can easily find out how it works, and maybe you could even build a TiVo competitor based on it, but to the owner of a TiVo--an actual user of the distributed binaries--the source code is worthless. The GPL's purpose is to guarantee that a user of a binary will always have the freedom to change the functionality of that binary in the context of their use.

This is a fundamental freedom of the user that requires the developer to give up some freedoms with regards to how they deploy their binaries and has nothing to do with projects and forks or even source code in any direct way. This is a trade off related to a subjective understanding of "freedom" as it applies to different actors in the system, and so to understand why the GPL is interesting you have to be willing to temporarily take off the hat of a project maintainer and put on the hat of a user, as the GPL's purpose (and yes, this is somewhat sadly ironic) is to protect the rights of a different player in the ecosystem than the maintainer whose job it is to choose a license for their project.


You continue to underestimate the importance of the original work as a product, and overestimate the importance of the license of the original work.

The GPL doesn't guarantee that a potential derivative work would be open source. The developer that might have based their work on open source might choose not to use the code of the original work in their project so as to avoid having to make their own work open source as well. This is a loss to the world, as the quality of their work would most likely not be as good, either because the code wouldn't be community reviewed or simply because time was spent writing code with functionality that already exists as open source taking away time from other features.

GPL or BSD, somewhere along the line, the developer has to willingly make their work open source. The only case the GPL can force someone to make their work open source is if someone has used GPL code with the intention of violating the license, but are later exposed to have used GPL code and are shamed into open sourcing it.

At the end of the day, the user only has freedoms to the code that the developer chooses to grant. Whether this is by choosing to use GPL code in their project and making it GPL as well, using BSD code in their project and making it BSD as well, or not using GPL code (but possibly BSD code) and not making their work open source.


The concern is not that the old software magically loses its freedom, but that tomorrow's software will, as the software we develop simply gets adopted as the base for proprietary solutions that then strangle their still-"free" parents of that valuable development oxygen.

In that regard I think even GPL advocates would be quite happy to use your example about Darwin, at least as a cautionary tale (though perhaps there was more benefit for the BSD upstreams than I am aware of; we're still waiting for an open release of ARM Darwin...). Likewise Apple's adoption of KJS/KHTML didn't go as well for KDE as we had hoped.


That is a ridiculous comparison.


that's a disgusting and misleading comparison, you should be ashamed. developers decide on using the gpl by their own choice. also, the gpl protects the user's freedom which in my opinion is one of the most important things in software land. it is no wonder that apple disagrees.


> Both terms encompass both copyleft and non-copyleft (all-permissive) licensing.

Then what's the difference between the two terms?

I've always thought that they were quite different (RMS vs ESR). Especially when capitalized as pronouns.

Edit: Nevermind. I missed ajross's response.


There are two answers to that.

The more relevant one for the current discussion: people who use and identify with the term "Free Software" generally care about software freedom as a valuable principle independent of its practical benefits (in other words, software should be free because it's wrong to restrict developers' ability to use, copy, modify, and distribute it), while people who use and identify with the term "Open Source" generally care most about the practical benefits (software should be open because that's the most effective and efficient way to produce software). There's a great deal of overlap between those two communities, but in general those two terms imply a different set of underlying principles held by the speaker. People who want to be all-inclusive sometimes say "Free and Open Source Software" or FOSS.

The origins of that distinction come from the original creation of the term "Open Source", often described as a marketing campaign for Free Software: the term often helps win over people (and businesses) who are unconvinced by software freedom as a principle but highly convinced by the effectiveness of Open Source as a software development model.

In terms of literal definition, Free Software is defined by the Free Software Foundation's "four freedoms" (https://www.gnu.org/philosophy/free-sw.html): use/run, study/modify, redistribute, and redistribute modified versions. Open Source is defined by the Open Source Initiative's Open Source Definition (http://opensource.org/osd), which in turn was derived from the Debian project's "Debian Free Software Guidelines" (DFSG, http://www.debian.org/social_contract). In practice, almost every license that passes one definition passes the other; it's exceedingly rare to find a license that's actually Open Source but not Free Software or vice versa.

Also worth noting: both terms are unfortunately ambiguous, in that "free software" (especially when not capitalized) can be confused with software available for no fee, and "open source" can be confused with software with source available but not under an Open Source license.


I would refine your argument a little. The Free Software movement does not maintain that "software should be free because it's wrong to restrict developers' ability to use, copy, modify, and distribute it". It maintains that 'software should be free because it's wrong to restrict users' ability to use, copy, modify and distribute it'.

There is a subtle distinction. Open Source is generally in favour of developers' freedom, Free Software is generally in favour of users' freedom. These come into conflict when, for example, developers want to lock their users into SaaS walled gardens. Open Source advocates are generally in favour of the developers' freedom to do this. Free Software advocates are generally in favour of the users' freedom to not be locked in (see the AGPL for example).


> Technical differences are ephemeral.

Hardly the case when you want to extend/embed your compiler frontend/backend. In this case, LLVM/Clang shine. They are written in fairly clean and comprehensible C++ libraries. Most CLI tools are well under 1k lines! GCC is a real pain to even comprehend, let alone extend/embed!


Clang only support a subset of the features that GCC has, so it is naturally easier to comprehend. Reading the user manual, more "tricky" GCC extensions is intentionally not implemented because they would be too hard to implement.

If you think this is good/bad for Clang/GCC, depend if you ever used said features, or if one prefer a smaller compiler which has less features.


As I remember, at the time Apple started Clang, GCC wasn't nearly as clean. The various stages (parsing, compiling, optimization, etc) were not cleanly separated/documented so using the compiler's parser for syntax highlighting wasn't really possible. GCC has improved quite a bit since Clang/LLVM showed up in many of these areas.

Even if GCC had very clean separation between the steps, the FSF's interpretation is that you couldn't use the GCC parser for something like highlighting/suggestions the way Apple does in XCode without making all of XCode GPL.

It's a perfectly fair interpretation. I think making the opposite case would be quite difficult. But it shouldn't be surprising that Apple wouldn't want to open up all of XCode. I also don't blame Apple for not wanting to continue to re-implement parts of GCC and try to stay bug-for-bug on parsing when the only reason you can't re-use the same code is licensing.


> Even if GCC had very clean separation between the steps, the FSF's interpretation is that you couldn't use the GCC parser for something like highlighting/suggestions the way Apple does in XCode without making all of XCode GPL.

Only in this one technical implementation you've imagined. Interacting with GPLd tools via basically any method expect actually linking it into your code (e.g. pipes) doesn't infect your code with GPL obligations. Presumably just piping the entire code to gcc -fdump-tree-original every keystroke would be too slow but you could probably get it working nicely if you had the sort of engineer time Apple do.


It's not really more/less features so much as it is a tradeoff. LLVM is extremely powerful in that it lets you write front-ends for many different languages without worrying about the complexities of native code gen. Likewise, it lets you write backends for other target platforms (i.e. JavaScript), allowing you to gain the ability to port those languages to new platforms easily. Thirdly, you can write optimizers for LLVM's intermediate representation and gain the benefit across most/all front-end languages and back-end platforms.

GCC, on the other hand, seems to have a much narrower focus but with a lot more optimizations and weird extensions.


This is exactly GCC's architecture as well, where front-ends are transpiled into a generic language, which is then compiled into native code for a given platform.


That's how GCC works internally, but neither the front-ends nor the back-ends are available to use individually. Indeed, RMS specifically avoided having a flexible architecture similar to llvm, because he was afraid such flexibility would be used for non-GPL "plugins".


GCC supports external dynamically loaded plugins since 4.5.0 (3 years ago)

http://gcc.gnu.org/onlinedocs/gccint/Plugins.html

The wiki has links to some plugins too http://gcc.gnu.org/wiki/plugins


Sure, but what about the inverse? With LLVM you can use frontends as libraries for integrating into an (possibly non-free) IDE for completion, syntax highlighting, refactoring etc. This is especially powerful because you can avoid serialization and just keep the ASTs in memory. I'm not aware of this being possible with GCC, but I could be wrong.


If you can dump or generate the IR you can use the front or back ends as you please, no? You might have to write something that reads in the IR.


Thats a lot of work for what you get out of the box with clang. There is a whole community of tooling around llvm for these types of use case, so why use gcc?


Sure, I was just arguing possibility, not feasibility.


I'm not sure the bigger number of nonstandard and noncompliant extensions is really a desirable attribute when comparing the merits of C compilers.


This might change though, now that GCC has some stiff open source competition.

I heard GCC is partly a bit of a hairball to prevent GPL loopholes. They wanted to ensure you can't wrap it in some kind of RPC framework to get around the GNU GPL. They might clean things up a bit, if there's no longer an incentive for people to want to effectively steal it (since they can just use Clang instead).

In fact, open source projects (even GLP ones) might start switching to Clang, if it has a cleaner API.

So the costs of a hairy API are going to start outweighing the benefits.


(Right. I think we are in agreement, but to be very clear for others who might only read these comments: the accepted answer is from where I quoted the "most notable" technical benefit.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: