Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

An anonymous reader writes that the LLVM compiler framework and Clang C++ compiler hit 3.4 "With C++14 draft fully implemented in Clang and libc++. Read more in LLVM and Clang release notes."
Also of note: "This is expected to be the last release of LLVM which compiles using a C++98 toolchain. We expect to start using some C++11 features in LLVM and other sub-projects starting after this release. That said, we are committed to supporting a reasonable set of modern C++ toolchains as the host compiler on all of the platforms. This will at least include Visual Studio 2012 on Windows, and Clang 3.1 or GCC 4.7.x on Mac and Linux. The final set of compilers (and the C++11 features they support) is not set in stone, but we wanted users of LLVM to have a heads up that the next release will involve a substantial change in the host toolchain requirements."

From a technical perspective I like LLVM, but I don't get the appeal of your 2nd point. Why should I work for free on a project in order to enable companies to make proprietary extensions to it that they won't release back to the community? The GPL makes me more willing to contribute to projects, because it ensures that everyone plays fair, so to speak: I'm adding my contributions, and if you find the results valuable and extend my work, you should do likewise.

The BSD folks tend to argue that things work out in the end anyway. Useful contributions find their way back, and when they don't then at least someone got some good code out of it. There are few exceptions, in general you can't force anyone to contribute back. Very few projects are that good. The only thing you achieve is that your code is used in less places.

Ah yes, all those people running BSD... All those people.Which, hey, if you include Apples OSX, is a hell of a lot of people. So yes, let us bask in all that effort that Apple has done for the open source community.

Very few [open/free] projects are that good.

Well with that sort of QUANTITY, you can't expect them all to be stellar.

The only thing you achieve is that your code is used in less places.

But those are places that you can actually use rather than the proprietary walled garden constrictive license which make for the sort of thing where you don't actually own the things you own. It also makes for a platform which is dead in the water and has no legs. And it's usually expensive.

I don't care if a few businessmen shy away from the code I throw out there under an free license. They most certainly wouldn't have helped me.

So you're not upset that the current codebase will remain available as BSD. You just want everyone to be forced to make available all of their extensions or software that may use some portion of the code.

So you're not upset that the current codebase will remain available as BSD. You just want everyone to be forced to make available all of their extensions or software that may use some portion of the code.

Suppose a very important piece of infrastructure, such as a compiler suite, were BSD licensed and achieved wide adoption so that thousands of companies and millions of people (developers, casual coders, end users etc.) came to depend upon it. Then suppose that people neglected competing FOSS projects...

To begin with, everything is fine.
Then the major (principle) sponsor of the project decides to add some proprietary language features to one or several of the languages supported by this compiler suite, rewrote large parts of their own code to use these features and encouraged, bribed or coerced their 3rd-party development community (many of which already pay for the dubious privilege of being allowed to compile and distribute their code for that platform) to use these new language features. Perhaps these

It's not trolling when you are trying to educate someone about their misperceptions.

The misperceptions lie with you.

I never denied that the BSD-licensed code would remain available (and therefore it is not a problem with my story). I was referring to enhancements to that code that may be used to perform a bait-and-switch or embrace-and-extend move. You are deliberately ignoring that and de-emphasising the importance of the freedom of the user. It's a very common thing for businesses and other self-interes

I was referring to enhancements to that code that may be used to perform a bait-and-switch or embrace-and-extend move. You are deliberately ignoring that and de-emphasising the importance of the freedom of the user. It's a very common thing for businesses and other self-interested organisations to do.

Again we are full circle back to "So you're not upset that the current codebase will remain available as BSD. You just want everyone to be forced to make available all of their extensions or software that may u

No, not at all. You have completely mistaken the points I have been trying to make.

The GPL protects the user's rights because it places no restrictions on their use of the program, it guarantees them access to the (machine-readable) source code for the program, it permits them to redistribute the program unmodified in binary form (as long as they make the source code for that release available along with it) an

The GPL protects the user's rights because it places no restrictions on their use of the program, it guarantees them access to the (machine-readable) source code for the program, it permits them to redistribute the program unmodified in binary form (as long as they make the source code for that release available along with it) and it permits them to modify the program for their own use. They only have to distribute their changed source code (again, in machine-readable form) if the

I did not contradict myself. The GPL ensures the continuing freedom of users to benefit from the code and any enhancements/modifications to the code made by others. It empowers the users to employ whoever they like (including themselves) to make further enhancements. Progress is ensured for all by standing on the shoulders of giants.

This is not a restriction.

The BSD makes no such provision.

The requirement to make all changes available in source code is a restriction.... of the GPL.

I do not subscribe to the all software should be free of charge ideology. I consider the user being able to do anything they want to the code without restriction to be more free than the GPL's you can use are code as long as you make your changes available for free too. GPL protects the original developer of the code. The fact that it protects the ultimate users is very debatable. Especially since the original developer can offer dual licensing.

I personally don't believe that all code should be free either. In my opinion, the GPL does more to ensure on-going freedom for the many (as opposed to the few) than the BSD license does.

I don't think we disagree by much. My point is that the GPL enforces the developer's wishes not the user's. The GPL keeps source code open as the developer intended. I believe the difference in our opinions amount to "The GPL enforces the developer's wishes for user's ultimate good".

Oh, right. Damn, that's a pretty good comeback. Yeah, I dunno how I missed that one.

It's a pretty sad state of affairs that I'm at +5 insightful for that comment when there's such a glaring logical hole there. I guess that there's a trend with Slashdot moderators that simply votes for anything that's pro-open source and anti-proprietary. This is the echo chamber my friends. And as big of a bitch as it is to admit it, yeah, BSD went closed source into OSX, and Apple then made contributions to Clang a

In fact, Apple didn't just make contributions to clang, they started the whole project themselves, and released it openly once it was underway. LLVM they bought and funded after it had already been in existence for a while, but clang was their own thing entirely.

And now there are plenty of commercial companies throwing in contributions to it, too.

He's referring to integrating the compiler into your IDE. GCC makes this intentionally difficult, which is a big reason why there is no Visual Studio equivalent system that uses GCC. CLANG/LLVM is designed much more openly and should allow developers to really reach (and exceed) feature parity with Visual Studio.

The NetBeans one only talks about navigation to the declaration of something, which is a very far cry from autocompletion, background compilation for error detection, showing up-to-date documentation etc. that having an AST and other data from parsing a file fully encompasses, and it seems like they use the debug info generated by GCC, but that is neither on-the-fly nor even near the level of detail you get with actually having a parsed representation of all your code available.

Huh? QCreator, Netbeans and Eclipse C/C++ IDEs are fully integrated with GCC, including both debugging and compilation.

What Xcode can do is integrate llvm with autocompletion. For example, if you do a switch statement on an enum-value, it autocompletes the possible enum constants after you type "case". After the first entry, it automatically removes the constants you already used from the list of possibilities.

Xcode also does perfect autocompletion (method names, parameter types, etc.) of types derived from C++ templates, which simply isn't possible without compiling the file. This even works as you change the same file those templates are declared in.

Other things include the analyzer, which tells you about issues that arise on certain input conditions. When you click on an issue, Xcode visually displays the flow through the program to arrive at the undesired end result using arrows.

Please update your FUD. GCC has supported a plugin architecture since 2010. You can use any GPL-compatible license for your plugin. This includes BSD, and in fact, there's a LLVM plugin for gcc [llvm.org].

Why should I work for free on a project in order to enable companies to make proprietary extensions to it that they won't release back to the community?

You shouldn't, but you should also not see it as a deterrent. Those companies will never release anything back to the community regardless of license.Yes, while unlikely they might be able to make some more profit thanks to whatever you contribute but that is irrelevant since it doesn't actually harm you or the project.On the other hand the way they think is that their source code is the most important thing they have and they will never make it public. Those companies will rather try to roll their own comp

actually, I'd say you would get more contributors - if the company you work for uses a permissive open-source project, some people will learn all about it at work, and will then scratch whatever itches they have with it at home, and release that code back to the community.

the point was that BSD licences aren't some sort of black hole into which companies will take and give nothing. Even if a company does do that, it doesn't mean that the project won't gain from it regardless.

You would do this because then those companies will contribute back to you. You wouldn't have clang at all if Apple hadn't written pretty much all of it. Apple wrote pretty much all of it exactly because the GPL stopped them wanting to contribute to gcc.

I'm sure it was Apple that stopped Apple from contributing to GCC. I'm thankful that they contributed to LLVM by developing Clang, but it was entirely their own choice to not contribute to GCC after 4.2.1.

I'm sure it was Apple that stopped Apple from contributing to GCC. I'm thankful that they contributed to LLVM by developing Clang, but it was entirely their own choice to not contribute to GCC after 4.2.1.

It was an intentional change in the license that made it impossible for Apple to do some of the things they wanted to do.

A free software license does not limit what you can do with the code. For all intents and purposes Apple could have released their code under GPLv3+ and they would have been fine. I totally understand why they choose not to do that, but it was Apples choice to do it; they could have done different if they really, really, really wanted to.

A free software license does not limit what you can do with the code. For all intents and purposes Apple could have released their code under GPLv3+ and they would have been fine. I totally understand why they choose not to do that, but it was Apples choice to do it; they could have done different if they really, really, really wanted to.

And then shipped it together as a bundle with Xcode? The GPLv3 specifically prevents them doing that, and it was deliberately written that way. The GPLv3 absolutely limits what you can do with that code. It is a very restrictively and carefully written licence in certain very key areas (not that this is necessarily a bad thing if you want such a thing - and there are valid reasons for it existing).

So, no Apple couldn't have done that "if they really wanted to", without making the whole of Xcode open source.

That's not really "choice" and "freedom" is it? That's what this comes down to - the GPL protects the freedom of the *code* whereas the BSD licence protects the freedom of the *users and/or developers* of that code.

I think you misunderstood me. My point was that Apple could choose to adhere to the license. They could join the GNU project if they wanted, or hire Richard Stallman as their CEO for all I know. I don't know if he would accept that position though. But the point is that nothing stops Apple from becoming the next Red Hat apart from artificial constraints about what Apple can or cannot do.

As I understand it, it is not possible to integrate GCC into Xcode in the same way as LLVM is without having to license Xcode as GPLv3 or some other compatible license. For example, Xcode uses (if I am not mistaken) the LLVM/CLang API. I don't think GCC has one, and if it had one, I don't think Apple could use it without having to change their Xcode license.

And then shipped it together as a bundle with Xcode? The GPLv3 specifically prevents them doing that, and it was deliberately written that way.

Wait, how does GPLv3 prevent them from shipping it in a bundle with Xcode? I'm pretty sure that's allowed under GPL3, but Apple didn't like the patent clauses.

The anti-Tivo clause, written exactly because of the perceived "weakness" of GPLv2 (insofar as it allowed more freedom to the sorts of developers that the writers of the GPL dislike) that enabled closed-sourced pieces of code and hardware that are part of a product to be kept back, while the (now essentially less useful without the closed bit) code could be released following the letter of the licence.

Xcode is not open source, but parts of it are. Given the way that the compiler is heavily integrated into i

As an Xcode user I would definitely appreciate it if they released Xcode under GPL. Can't tell you the number of times I sworn about bugs in Xcode, taken the time to file the bug report just to get it closed immediately because it was a duplicate of some existing bug that I'm not allowed to see and then wait months or even years for a fix. Yes this is so important for me that I would happily jump in and fix the bugs myself. I have absolutely no interest in Xcode remaining closed source. None.

I'm not sure you understand the clauses involved. GPLv2 said you couldn't ship GPLed code linked to code with non-GPL-compatible licenses, and that is basically unchanged in GPLv3. The anti-Tivoization clause says you can't ship source and binary without the keys necessary to install the binaries. This means you can't put GPLv3 code in an iOS application, but it isn't clear to me that this makes any difference for a product that runs exclusively on Mac OSX. Remember that the output of GPLed code isn't

The GPL was explicitely written to protect developers and users, ensuring that they could modify software and mod it if it ever became unmaintained or whatever. Your example can have the words switched and few people would ever notice.

That's not really "choice" and "freedom" is it? That's what this comes down to - the BSD license protects the freedom of the *code* whereas the GPL protects the freedom of the *users and/or developers* of that code.

Let's say a company invents a proprietary bit of silicon, and wants a compiler for it. They may likely chose one that requires them not to spill the beans on their proprietary hardware in the process. So yes, it's true, you don't get the benefit of their "special sauce", but you were never going to get it anyway, so there is no loss.

However, that same company now has a lot of people using the code. It takes time and money to track separate changes, so if they find a bug in code not specific to their proprietary stuff they are likely to fix it, and submit it upstream so they don't have to maintain it going forward. That code will benefit you.

So basically, the people who find the GPL odious will never use gcc, and will find some alternative. Given those people have fully closed options (license Intel's compiler, or Microsoft's), or use something like LLVM. With the LLVM model they can submit fixes to their non-secret sauce upstream, as well as get others to help fix problems they find in the non-secret sauce part.

TL;DL, if you choose gcc or LLVM you're never getting their secret sauce, but if you choose LLVM you get more help on the non-secret sauce parts.

That is the real essence of the "BSD License" philosophy. You may or may not agree.

As a user of the proprietary bit of silicon, because of the BSD license, I don't get a compiler for my machine at all, unless I pay for the company's proprietary one (if that is an option).

This is something that bites me continuously with Android phones: manufacturers will only release the GPL licensed bits, so if I want to run my own software on the phone, I can only get crippled functionality because of all the bits I'm missing (Android has a no-GPL-in-userspace policy).

It's not a matter of the existence of the BSD license. The key is the license of the most competitive project. Keep looking at Android as an example: Google dislike the GPL, so if some BSD kernel was on par with Linux for embedded devices, they would certainly have chosen that kernel instead. And we wouldn't even get device vendors to release the kernels.

Look at the Darwin kernel as another real-world example. Its source as released by Apple doesn't even boot nowadays, so the open source community around

Your recourse is to not buy that thing that lacks source, regardless of license.

If LLVM (or some viable BSD licensed thing) did not exist these companies wouldn't flock to GNU, they would rather flock to Intel, Microsoft, or a host of others that will allow them to keep the technology from you.

The only way the GNU folks get what they want (all code under GNU licenses) is if all other licenses cease to exist or are outlawed. Provided there is an alternative, from a private licensing deal, or BSD code, or

Flock to GNU, I don't know. They would certainly consider it, since the licenses of Intel, Microsoft et al cost them money, a fact that companies are very sensitive to. And after they pay that money, they get a proprietary license that is certainly far more restrictive than the GPL.

The GNU folks "got what they wanted" when Tiemann added C++ to gcc because of the GPL license. Same thing happened with Jobs and Objective C. The GPL is proven to work, and it especially used to work back in the days when sprea

Yet another good readon for everyone to drop GCC and move on to the future. GCC is obsolete in pretty much every aspect,

Pure FUD. Who the hell modded this up. It's just plain trolling. GCC and LLVM are neck and neck, with GCC winning in the quality of the optimizer. I've also had compiler crashes much more recently with LLVM than with GCC, so it seems that GCC is also somewhat more battle hardened.

and the non-permissive license makes it hard to use for other purposes than simple command-line compilation compared to LLVM which can be integrated in many different products.

Only if you want to make your other tool non-free. Otherwise GCC works just fine.

No, that is not the same thing. The runtime library exception is for the parts of gcc that gcc includes in your program when it builds it. The actual binary that the compiler produces. This is limited to certain headers and library routines. It does not give you access to the inner workings of the compiler.

I'd personally like something freer than both GPL and BSD: a license that lets you do anything you want, except sue a downstream user of the software for copyright infringement. GPL lets you sue someone if they don't comply with precise release semantics, and BSD lets you sue someone if they use your "proprietary extensions" without a license from you. A free license would ensure that downstream users cannot be sued. The only freedom that license would take away is the freedom to sue other people, which is

No, if I release content into the public domain, a downstream user can still add proprietary extensions to it, and then sue reusers who use that fork without a icense. I'd like to license my software under a license that allows downstream users to do anything they want, except sue another downstream user.

No, if I release content into the public domain, a downstream user can still add proprietary extensions to it, and then sue reusers who use that fork without a icense. I'd like to license my software under a license that allows downstream users to do anything they want, except sue another downstream user.

So what if the next downstream user doesn't conform to the license by suing someone, what are you going to do? Sue them?

This is seriously a difficult problem. When you give your software to soeone else, you can either give them a license, or enter a contract. If there is a contract then you can actually force them to do something (like force them not to sue somebody else), but you may have to go to court to force them. If there is a license, then you can't force them to do anything. You can take them to

It depends on definitions. If NetFucker Inc. uses GPL software in a router they sell, who is the "user" of the GPLed software - NetFucker, or the end user of the router? Or both?

GPL is a license that says what you can and can't do with the software. Anyone who violates any of the terms of the license is at liability. Having said that, I don't think the "distributor" label is of significance except as an aid to visualization. it is hard to see a likelihood for the ultimate end user to ever to be in violation

I do hope you have sufficient understanding that the ideas you're espousing are directly at fault for how screwed up the technological climate is right now. Apple, Microsoft, Canonical, all changing up and breaking their products. GCC has issues, number one being this push to drop it off the wayside like the rest of the foundations of modern computing.

What's the code-completion situation in GCC these days, or the static analyzer situation? (I don't know.) Apple went with Clang at least in part because of not being able to get those features out of GCC without making Xcode GPL3 compliant, but I'd guess that an IDE with a compatible license might have a better shot at getting that information out of GCC.
Code completion and static analysis are 2 of the great features of Xcode; I wouldn't want to go back to tools that didn't have either.

So, if you don't like the word obsolete, what word would you prefer? Deficient? The problem as I understand it, and I'm not claiming any expertise in compiler design, is that GCC is deliberately architected to prevent useful re-use of the code which can syntactically analyze source code which shows up in the difficulty in using it to integrate it with an IDE in terms of things like error parsing, code completion, and static analysis. As a long time Xcode user, I can remember when Xcode's code completion was

I prefer judging a product based on its intended use. GCC is not an IDE, GCC is a set of compilers. Nowhere does it market itself as a complete software development solution that includes static analysis and code completion because those are historically features common to IDEs. You wouldn't call "ls" obsolete or deficient because it doesn't have "grep" functionality, would you?
I don't have any evidence that GCC was deliberately architected to prevent any functionality from being implemented - do you? I do

I don't have any evidence that GCC was deliberately architected to prevent any functionality from being implemented - do you? I don't believe projects like this are ever designed to impose such kinds of restrictions - it's not Microsoft, it's GNU.

A great deal of thought goes into the GCC license and GCC APIs that are exposed to third parties. Have a look at this [lwn.net] and this [lwn.net]. It is true that GCC has been designed and licensed to prevent integration with proprietary tools; Stallman et al. will not tolerate having GCC wired into some proprietary, closed source IDE and that fact guides their decisions about what APIs GCC provides and how GCC is licensed.

The `proprietary' part was left out by the GP and others that make the claim that GCC is designed to p

So this leaves my question still unresolved. Is there a non-proprietary GPLv3 IDE available which provides good code completion and useful static analysis? Have the steps GCC made to lock out proprietary use caused the product to be hard to integrate even with license compatible IDEs?

Might as well call Clang obsolete and useless because it doesn't do Java, Ada, Fortran, etc.

The C in Clang stands for C, so it will probably never support those other languages. That's because Clang is just a frontend to LLVM. There are other frontends that implement those languages. Even GCC can act as a frontend to LLVM.

LLVM still makes sub par compiled code. Who cares that it takes less time to compile, its execution & size performance is awful, worse than GCC which is awful compared to most commercial compilers. This is especially true for ARM based instruction sets (VC & ICC do better for x86 as well). And the fact 'Apple' does it, is not a valid reason to do anything.

Don't get me wrong, LLVM is a cool tool and great for debug code generation especially because all sorts of metric/instrumentation can be done wit

Clang 3.4 offered faster performance of compiled C/C++ code in several areas but GCC 4.9 also brings some performance improvements of its own over the current stable release. Clang still certainly outperforms GCC when it comes to compile times, but aside from that the compiler performance competition is rather mixed depending upon the particular code-base, workload, and processor.

For being a much younger project than GCC, LLVM/Clang is certainly running nicely and now building with almost all C/C++ code-bases tossed its way, and with the 3.4 release it's one step closer to having performance parity (or superiority) to the GNU Compiler Collection on modern x86 CPUs.

LLVM / Clang's acceptance of patent encumbered code from Apple, Qualcomm, and others makes LLVM technically unlawful to use for anyone who doesn't have a cross license agreement with these corporations.

If you or your employer own the rights to a patent and would like to contribute code to LLVM that relies on it, we require that the copyright owner sign an agreement that allows any other user of LLVM to freely use your patent. Please contact the oversight group for more details.

Are you saying that Apple, Qualcomm, and others have not signed such an agreement? Or are you saying that such an agreement isn't sufficient to allow anyone who doesn't have a

They seem to have stopped mingw builds and focus on clang-cl on windows. The problem is that you need the Windows SDK. With most other open source / free compilers this is not necessary. Personally I use mingw in both of its incarnations and the problem is that I cannot download a ready made binary. clang-cl is unusable without windows sdk.
It is not compatible with lcc,pelles,openwatcom,digital mars c SDKs.