More on OpenBSD’s New Compiler

“A few weeks ago, the OpenBSD Project announced that the Portable C Compiler had been added to the OpenBSD source tree. There has already been some explanation of why the traditional GNU Compiler Collection is troublesome and why a new compiler is needed, but there are still some details left uncovered. In this interview, Theo de Raadt and Otto Moerbeek of the OpenBSD Project offer more information about PCC and GCC and where they are headed within the project.”

The near monopoly of OpenSSH is not uncontested by open source alternatives, they are all just significantly inferior to the OpenBSD ssh suite.

Well, people tend to use GCC because the competition (in the open source world) is inferior. By GCC being superior, I mean in a Microsoft sort of way: all of the extensions to the languages and dependence upon the GNU tool chain to build software tends to make it difficult to drop in a third party product.

Oddly enough, one of the big reasons why I use Windows is PuTTY. Even when I do use OpenSSH, I learned how to use most of the features on PuTTY. PuTTY has better documentation, a simpler interface (i.e. no need to pull out vi to edit config files or deal with long command line parameters), and seems to behave with non OpenSSH servers better.

Oddly enough, one of the big reasons why I use Windows is PuTTY. Even when I do use OpenSSH, I learned how to use most of the features on PuTTY. PuTTY has better documentation, a simpler interface (i.e. no need to pull out vi to edit config files or deal with long command line parameters), and seems to behave with non OpenSSH servers better.

PuTTY is available for Linux, *BSD, Windows, and more. Why would you use Windows just for a terminal app when that same app runs on more than just Windows?

Problem with PuTTY is that it uses the Windows registry to store just about everything. Makes it very inconvenient to use on a USB stick. Newer versions tend to use the registry less, but you still leave tracks on every computer you connect from. Not exactly a security conscious development method.

The problem is that if you need/want to fix a bug in GCC, you then have to assign Copyright to the FSF and a submit to the GPL.

Both of these measures are kludges to overcome the practical incompatibilities between open-source software and copyright law. The legal framework wasn’t designed for works that may have thousands of copyright owners claiming partial ownership of various overlapping fragments. It wasn’t designed for works where there is great value in small modifications. It wasn’t designed for works that can be copied and redistributed extremely inexpensively. It wasn’t designed for works that retain much of their value when obfuscated.

Neither the GPL nor copyright assignment are perfect solutions, but neither is the BSD. The GPL is a compromise of freedom vs. regulation to the extent that such regulation promotes freedom with a bias toward users. The BSD is an unregulated free market with no incentives or restrictions to innovation.

Think of proprietary software as fascism, the GPL as socialism, and the BSD as libertarianism. All of these political systems have their problems. Fascism doesn’t end well. Libertarianism doesn’t start well. Socialism doesn’t work well. However, the GPL is really a mixed economy, a blend of socialism and capitalism, and most progressive economists agree that mixed economies are more prosperous and sustainable than any purebred economic system. They might not grow like fascism, empower like libertarianism, or nurture like socialism, but they provide a reasonable balance of these qualities.

You can call into question the center of this balance, but it is absurd to argue against the notion of balance. The BSD economy never really took off because corporations want incentives and users want protections. Perhaps the ideology is more important than the outcome, and I can respect that as long as this is understood as a social experiment rather than a practical software ecosystem.

The GPL ecosystem is what it is because it grows, empowers, and sustains. It’s a practical framework, and as the proprietary ecosystem realizes its ultimate problem of sustainability, it will become the dominant framework for software development. With increased dominance will come increased growth (more incentive to contribute) and empowerment (more compatible code) with no loss of sustainability.

Hopefully our politics will soon benefit from the lessons learned in the software industry, rejecting ideology and embracing balance. Hopefully we will spend more time debating this balance and less time refusing to compromise. Balance is not a “Trojan Horse” of the opposing ideology. It’s an essential equilibrium, and one that we must actively pursue–using rational argument, if we please.

The F/OSS software movements have kept me puzzled for years. All of these licenses and development models bear some similarity to socialism, which seems to be clearly inferior to capitalism when it comes to motivating production. And yet there is clearly excellence and vibrancy here that outshines proprietary software.

Hopefully our politics will soon benefit from the lessons learned in the software industry, rejecting ideology and embracing balance.

I wouldn’t go that far. Software is a unique industry. The lessons learned in software might not apply well to vehicle manufacturing, health care or law making.

The F/OSS software movements have kept me puzzled for years. All of these licenses and development models bear some similarity to socialism, which seems to be clearly inferior to capitalism when it comes to motivating production. And yet there is clearly excellence and vibrancy here that outshines proprietary software.

Right, although I am not so sure how much of this is innate and how much of it is due to the mainstream open source community being in some proportion composed of anti-capitalists. What I think is becoming more and more interesting is the question of what will become the main force in mainstream open source: no holds barred capitalists like IBM or the socialists. I don’t think that any temporary peace to concentrate against common ‘enemies’ (ie, business competitors) can be lasting.

I wouldn’t go that far. Software is a unique industry. The lessons learned in software might not apply well to vehicle manufacturing, health care or law making.

Right. We hear a lot about how software development is different and so traditional approaches tend to fail. I bet this cuts both ways. Plus, I have read dev mailing lists. I don’t want those people in charge

True. At first your comment may sound absurd but then it makes sense. What do all linux distros use? GCC. Most BSDs? GCC. What is used to compile Windows? GCC (Really! After examining leaked windows source code, it was found to me gcc makefiles and all).

That is just not true. Its a rather bold assumption based on little evidence I would say. The truth is that makefiles are _NOT_ a GCC only thing. If this is your only evidence then you should do some more research because its a flat out lie.

Let’s pretend that gnu make does not exist, thus the incompatibilities that it presents should developers choose to use its extensions. I can live with that. After all, it is a separate project from GCC.

You still have to contend with the issue that the contents of a makefile are compiler, even platform, dependent. Where pcc uses different flags from gcc, the build process will break. If you use ‘rm’ as part of a rule, it won’t work under Windows unless you install some sort of Unix compatible tools (like cygwin or gnuwin32).

And navigating through makefiles isn’t always fun. I have never really devoted to time to figure out how autoconf scripts work (life is too short is my excuse), which pretty much determines how makefiles are generated. Even if a project restricted itself to makefiles, many will use recursive makefiles. Again, life is too short to read a truck load of details just to figure out how things work. Even if a project was encapsulated by one makefile (i.e. the limits of my experience), you are still relying upon the assumption that the developer defined all flags as variables — thus easing the transition to another compiler.

In a way, the Achilles heel of the GNU toolchain is its flexibility. It really is quite difficult for anyone outside of a full time developer to understand. That goes for GCC, and that goes for make.

IIRC the Windows source code was leaked though Mainsoft. Mainsoft has a (commercial) product that’s simmilar to WINE, but Mainsoft licensed the actual Windows source code from Microsoft to do this. It’s not unlikely that Mainsoft ported the requred parts of the Windows source to GCC.

What is used to compile Windows? GCC (Really! After examining leaked windows source code, it was found to me gcc makefiles and all).

Actually, that’s not quite possible. GCC compiles to the ELF file format, while Windows’ kernel uses the PE file format. If Microsoft did use GCC to compile Windows, the resulting binary wouldn’t be compatible with their bootloader.

(On the other hand, it’s possible to compile Linux as a PE in Visual Studio, and theoretically, even get it booting under GRUB. I’ve pondered compiling Linux as a PE just to compare compile quality of the two.)

Except it’s not proprietary, it’s a derivative of System V’s COFF and the technical details are known, especially given that ReactOS uses it. Whether there’s a gcc backend that outputs it is another question that I’m not sure as to the answer of.

Yet again, you amaze us with your lack of comprehension and knowledge.

It is possible to compile PE executables using GCC, with MinGW, it is even possible to link into the existing windows API.

You can even cross-compile working PE executables from GCC in Linux (having installed the correct, freely-available packages) I’d like to see the VC++ compiler compile working ELFs that can link into, say, the Ubuntu library set easily.

We’re talking about Theo de Raadt, not Ann Coulter. I think he genuinely means well despite his obsession with a particular culture that he believes is stripping his culture of its essence. So he’s more like Lou Dobbs.

Follow the dictatorship of RMS or follow Linus instead, the man who axes every other opinion, the man who first speaks, then thinks about it (interface-nazis, FreeBSD morons and so on). Some people prefer quality, other people are prefering some messiah. OBSD people are following de Raadt because of quality. His credo: shut up and code!

That was way too short to be an interview—and I wouldn’t even call it news worthy—but it’s nice to see another free compiler get some “mainstream” attention. If anything, maybe it’ll cause GCC to become a bit better.

GCC is mostly a commercial compiler, these days. Cygnus software has been bought by redhat. Most GCC development is done by commercial linux distributors, and also Apple. They mostly target *fast* i386 architectures and PowerPC.

Maybe that’s happening because Linux does have commercial success? As far as I know, BSD developers have not been forbidden from contributing GCC. Of course, there’re not as many BSD developers as Linux developers. But the GCC project can’t solve it, except by forbidding Linux and Apple developers from contributing.

The same WRT to hardware architectures. Do the openbsd developers think that developers of PCC are going to focus on anything but common arches like x86 and ppc? lol….

GCC warnings are not *really* useful

GCC is not perfect, news at 11. If we get a technical POV to the discussion, PCC is crap compared to GCC and following the poster reasonement you should use GCC, not PCC. Crazy reasonement, of course…

In other words, apparently some openbsd developers can’t understand what a community is and how a OSS projects work. There’re more Linux developers, so there’s a small bias towards Linux, that’s not evil, is how democracy is supposed to work. Once you accept it it’s not hard to realize that a software project can’t get developed in the direction you want, when you’re a minority. KDE, Gnome, X.org are also Linux biased…what is openbsd going to do, fork all of those projects, or create new replacements?

Because the OpenBSD project didn’t have either the desire or the means to maintain GCC’s niche architecture support? I suppose it must be a lack of desire, since a lack of means would be a problem if they intend to implement all of these architectures for an alternative compiler on their own.

GCC clearly isn’t where it needs to be as the keystone of the free software toolchain. Hopefully some good ideas will come out of PCC. In the free software world, you must never be afraid of competition. However, for practical reasons I have a hard time envisioning PCC becoming a successful project in its own right. It seems the odds are stacked against them. It also seems that OpenBSD has more important challenges that they could be focusing on. I feel that PCC could become a distraction.

On the whole, I think that PCC is an interesting project whose progress should be watched closely. I’m glad that somebody is undertaking this challenge, as you have to be a glutton for punishment to reinvent the compiler suite. The legendary Fred Brooks remarked that his troubled project to develop an Algol compiler for OS/360 taught him that compilers generally take three times longer than expected to develop.

However, for practical reasons I have a hard time envisioning PCC becoming a successful project in its own right

Well, it does primarily aim to be a C compiler, not an “everything-and-the-kitchen-sink” compiler that GCC is. That cuts down the scope quite a bit.

(Fortran? News flash, it’s not 1975 anymore…)

It also seems that OpenBSD has more important challenges that they could be focusing on.

Like what? Being ignored by the GCC people?

Obviously they’ve grown weary of battling GCC and took a good look at the alternatives. These decisions arent made overnight, although a lot of people here (most certainly almost all non-developers) seems to think so.

Either way, OpenBSD’s goal for PCC is to have it build the base system, not all of ports, so it does not have to deal with all those “esoteric” GCC features. GCC will still be in ports and will most likely be required to build many ports for a long time to come.

Having an alternative to GCC (note how I’m not saying “replacing”) is good, anyway. There are multiple use for an alternate compiler: for instance, PCC is much, much faster than GCC. It’s a huge advantage for a developer that needs to recompile parts of his tree on a regular basis.

Besides, one month ago PCC was still Anders Magnusson’s hobby project which he merely told about on a NetBSD list…

The people who make a political issue out of all this are out of their way, and if you read carefully and objectively the interview, even Theo doesn’t make it a political issue. ‘Nuff said.

3. Has issues that nobody is fixining due to the lack of a maintainer.

So if the community relly wants this arch, why doesn’t anyone just send a mail to the gcc list during those two years and complain? Or preferably submit some patches? And if the arch has been dropped they can always fix it and resubmit it.

Do the openbsd developers think that developers of PCC are going to focus on anything but common arches like x86 and ppc?

That is exactly one of the reasons they’re going with PCC, support for architectures that GCC has dropped. Perhaps you should try to read the articles and get a clue?

PCC is crap compared to GCC and following the poster reasonement you should use GCC, not PCC. Crazy reasonement, of course…

More baseless crap from someone who doesn’t know what he’s talking about. Seriously, why are you so afraid of some competition? GCC wasn’t all that awesome when in the beginning either. It’s called evolution. You know, the process by which software gets better over time.

That’s why both Theo and Otto say the road is still long.

But hey, why bother with thinking when you can go into rabid anti-OpenBSD mode?

In other words, apparently some openbsd developers can’t understand what a community is and how a OSS projects work.

On the contrary, they know exactly how it works. Why is there KDE, GNOME and XFCE? Why cant they all just work on one environment? Why are there different window managers? Web servers? Audio players? Because people want and need different things.

That really rang true. Of course the people knocking the development efforts are non developers who are completely irrelevant when it comes to these decisions.

The rest either agree with the need or are happy with whatever else. They are the ones that matter, not the posters on osnews who have never directly done anything with the product in question. It is fairly easy to see the ones that have never even required a compiler directly

The guy doing the work was interviewed on BSDTalk and he spoke well; coming across as a genuinely good guy.

In that interview he made it clear that support for other architectures is not a big deal. In some cases the back end code is already there but need tidying up and updating.

As an altogether smaller code base than GCC, supporting one language without the complexities of OO, PCC could move faster than some people expect it to. We could see it as a build option for the BSD’s in a year or so.

GCC is a wonderful thing and will remain in order to support a long list of languages; however, for C it is not difficult to imagine PCC becoming the compiler of choice for some people on the grounds of speed.

The heading implies PCC is an OpenBSD project; this is wrong. OpenBSD is merely an enthusiastic early adopter.

The difficulty with GCC is the same as almost any large project: different groups of developers with different goals. Because RedHat (and now Apple) employ most of the GCC developers, their interests carry more weight.

Maintaining a fast portable compiler is difficult when only a small portion of the developer-base uses slow non-x86 hardware. RedHat wants a compiler optimized for fancy C++ code and scientific computation on the latest-and-greatest. OpenBSD wants a compiler that runs quickly and stably on Vax and m68k hardware. You can see where this goes.

PuTTY has better documentation, a simpler interface (i.e. no need to pull out vi to edit config files or deal with long command line parameters), and seems to behave with non OpenSSH servers better.

I disagree quite strongly, but I come from a Unix perspective, where we understand man pages and prefer simple to use text config files over giant monsterous guis. Perhaps you should be using VNC. I’ve never even encountered a non-OpenSSH server, so I can’t really comment on your compatability jab.

Seriously, the openbsd project presented their reasons for wanting a new compiler, Whether you agree with them or not is irrelavent. It’s their time and effort, why don’t you just wish them the best of luck and hope something good comes out of the project?