News for hackers. Stuff that matters.
Re:Linus Torvalds: Programs exist for their users by Negitivefrags on Friday March 09, 2012 @07:13AM (#3683779)
In my experience binary compatibility on linux is a train wreck. Ever tried to get a binary compiled 5 years ago to run on a fresh install of linux?

Good luck.

If you still have the specific version of every shared library that it loaded you might be able to get it to work.

This isn't the fault of the kernel team though.

It is probably to be expected on platforms in which distributing source code is the default option, but it makes the platform very hostile to closed source applications, particularly games.

Re:Linus Torvalds: Programs exist for their users by ajross on Friday March 09, 2012 @11:25AM (#3684657)
You're fumbling over the term "Linux". What you're describing is platform library incompatibility. What Linus is talking about is the kernel ABI. Not the same thing. The latter is a subset of the former, obviously, but Linus can't fix the fact that library authors don't care as much about the problem.

The kernel is doing its job. Userspace, not so much. Though it's not nearly as bad as you think. In general, any desktop application compiled in the last 5 years will run unmodified on any modern distro. Really, it will, and I'd challenge you to find a counterexample.

But I suspect you're talking about the dependency issue. Installing something with a bunch of dependencies (because modern software has a dependency graph that looks a lot like seaweed) requires finding and installing all that stuff on your modern distro. And package names have changed, and some have been dropped from the core distro, etc... And yes, this is a mess.

But seriously: if you have a binary that works alone on, say, Ubuntu Dapper, it almost certainly will run on Fedora 16 or RHEL 6.2

Re:Linus Torvalds: Programs exist for their users by dhx on Friday March 09, 2012 @08:20PM (#3686716)
Even if you were to statically compile a software build from 5 years ago, it may require newer kernel features such as inotify (instead of dnotify). At some point of time the application authors (correctly) made a decision to throw out the old and go with the new. This is not a kernel issue (because old systems such as dnotify are still supported). But from a user perspective, it looks like the kernel is to blame, even if this assumption is incorrect.
Re:Linus Torvalds: Programs exist for their users by ajross on Friday March 09, 2012 @11:06PM (#3687007)
From my Fedora 16 laptop:

  $ fgrep DNOTIFY /boot/config-3.2.9-1.fc16.x86_64 
  CONFIG_DNOTIFY=y
Obviously it's true that dnotify is the old junk and inotify the new hotness. But it hasn't been abandoned, by either the kernel or the distros. Again, they take stuff like this very seriously. Old junk runs. Really, it does.
Re:Linus Torvalds: Programs exist for their users by muuh-gnu on Friday March 09, 2012 @08:03AM (#3683882)
> This isn't the fault of the kernel team though.

It is the result of having no unified platform and library release coordination, no long term plans, nothing, just chaos. Everybody just releases when he is in the mood for it. And since nothing is complete when released, devs further down the chain always go for the latest and greatest to get additional functionality. And to upgrade app1, you have to upgrade lib1 which triggers the updates of app2, app3, app4, lib3, etc. Sometimes you cant update a simple app without updating the whole desktop. The Linux dependency net appears nightmarish to everyone coming from Windows, where you have a reliable, stable base system which doesnt change for a decade and every app targets the same base system.

Linux, the kernel, is only running that great because it has a dictator. But Linus' dictatorship ends at the kernel borders, he has little influence outside. The Linux desktop also needs a dictator to massively slow down the rate of uncoordinated changes and force-stabilize the ecosystem. I hoped that Mark Shuttleworth could be that man, but he then introduced Unity... but even with unity, Ubuntu is the only chance for the Linux desktop for having a single defined set of libs attractive and influential enough for app devs as a primary target so they can safely go with the library versions in Ubuntu, instead of constantly chasing the latest and greatest versions from the upstream.

Re:Linus Torvalds: Programs exist for their users by reddit_clone on Friday March 09, 2012 @09:22AM (#3684115)
>everyone coming from Windows, where you have a reliable, stable base system which doesnt change for a decade

Now, you are being plain funny. Haven't you heard of 'DLL Hell' in Windows platform?.

You never had 'windows update' break your software for no reason?

Re:Linus Torvalds: Programs exist for their users by saurik on Friday March 09, 2012 @03:26PM (#3685773)
You are using this term incorrectly: the cause of DLL Hell is when one DLL (often a newer one) should be used, but another is used instead (even if it is older). The causes of this were varied.

On 16-bit Windows there was a single address space and only a single version of a DLL could be loaded by all processes: the first one to load would "win", and the others would get screwed with the old copy. This was due to 16-bit Windows not having memory protection: it was more of a GUI over DOS, and thereby had cooperative multi-tasking.

Even with that fixed, many developers would require a slightly newer version of a library, and rather than ask the user to upgrade their system (an irritating consequence of not having packages or dependencies; APT FTW ;P) would just include the DLL in their installer and unconditionally overwrite any existing copy.

After the dynamic loader started supporting "local" versions of libraries (installed to the same folder as the application), a similar problem happened with COM objects, which are centrally registered: someone would install their own version of a shared GUI component, register it with the shared name, overwriting possibly-installed newer copies.

Both of these problems were actually solved, but way too many developers simply gave up on Microsoft and Windows beforehand, and then refuse to spend the time to learn about the improvements. In essence, Windows now has reasonable-ish package management, with dependencies: Windows Installer.

In addition to dependencies and versioning of packages (which can then be correctly tracked by Windows, much like APT on a Debian/Ubuntu box), Windows Installer supports the notion of "unified installer program" with "merge modules": in essence, you can include someone else's package inside of your package; that way the dependencies can correctly be checked, and old versions won't get overwritten.

There are still a few cases that are quite difficult to manage (involving libraries that require a modified ABI over time, but still receive updates), and Microsoft's solution to those is WinSxS. Honestly, while I'm much less familiar with it than on Unix, it only seems a constant multiple more crazy than .la files, which I believe solve a similar problem.

These technologies and improvements were all introduced at or before Windows XP, an operating system that was released just over a decade ago. Of course, these are all solutions that developers sometimes ignore, but if you download software for Linux that comes with a .sh installer that scribbles into /lib, you are in for similar "hell".

Re:Linus Torvalds: Programs exist for their users by muuh-gnu on Friday March 09, 2012 @09:37AM (#3684179)
I've never had to upgrade Windows (including all installed apps) to be able to install some other random app.

On Linux, having to upgrade the distro (including getting a new desktop environment force-installed) to get a new version of any random app is established practice. Example: http://esr.ibiblio.org/?p=3822

Re:Linus Torvalds: Programs exist for their users by acqq on Friday March 09, 2012 @09:52AM (#3684246)
If you claim that you "never had to upgrade Windows to be able to install some other random app" you probably haven't used Windows much then. There are games that need explicit version or newer of DirectX. You can't even produce from the C or C++ sources the binary application that runs on any Windows XP with the latest Visual Studio (11). Any C/C++ application built with Visual Studio 2010 won't run on Windows 2000 or XP prior to SP3. We developers try to build the applications that run on as many targets as possible, but even MSFT doesn't support us enough for that, seeing the older versions as the competition to their newest "shiny thing." Which is not funny considering millions and millions of users still running Windows XP.

See the various opinions on MSFT intentionally removing the binary compatibility which already existed in their libraries here:

http://news.ycombinator.com/item?id=3648209

Re:Linus Torvalds: Programs exist for their users by hythloday on Friday March 09, 2012 @05:09PM (#3686204)
Do you happen to know how many users are running Windows < XP/SP3? For our install base (games company) it's less than 1%. Is there a compelling reason not to upgrade to SP3 if you're on XP?
Re:Linus Torvalds: Programs exist for their users by doug11235 on Friday March 09, 2012 @11:11AM (#3684599)
> Any C/C++ application built with Visual Studio 2010 won't run on Windows 2000 or XP prior to SP3.

By default you can't but you can adjust the build settings and it works fine.

Re:Linus Torvalds: Programs exist for their users by MatthewPhillips on Friday March 09, 2012 @09:58AM (#3684269)
Dependencies are bundled on Windows. It means installing App B doesn't affect your App A. It also means that security bugs must be fixed at the app level, not at the library or OS level.
Re:Linus Torvalds: Programs exist for their users by icebraining on Friday March 09, 2012 @09:56AM (#3684258)
Then you're lucky, because plenty of applications required you to install the Service Pack 2 on XP to install them, .NET application often required newer versions, same with games and DirectX, etc.
Re:Linus Torvalds: Programs exist for their users by rbanffy on Saturday March 17, 2012 @11:22PM (#3719000)
Not entirely true. While Microsoft won't upgrade your Windows for free (creating the demand for support for ancient versions of the OS - things that will run on XP) they will make software dependent on service packs and fixes. It's not a new version with new functionality, but it's an upgrade nonetheless.
Re:Linus Torvalds: Programs exist for their users by jiggy2011 on Friday March 09, 2012 @08:37AM (#3683971)
Not sure why this was down voted so much, there is an element of truth to it.

When you are dealing with different distributions that provide different versions of core libraries, different sound architectures , package managers and put things like executables and config files into different parts of the filesystem.

I thought that the Linux standard base would be the way to solve this.

Re:Linus Torvalds: Programs exist for their users by onli on Friday March 09, 2012 @08:51AM (#3684011)
Probably because though there is an element of truth in it, it just sounds plain wrong.

After two sentences i thought "he probably works for microsoft or another big corporation", not because it's flame, but because of the attitude to regard this as pure chaos (and having no big plan as bad). I even looked up the profile.

There is kind of a release-plan, not for the whole eco-system, but that's what stable distros are for. So the remark to Ubuntu is right. But it's wrong to mix library-stability with perceived frontend-issues with Unity. Ubuntu still fulfills that role for some apps. And besides that, it isn't necessarily wrong to write new programs against new libraries. They have new features and new bugfixes.

I wouldn't want the ecosystem to stagnate right now. Or ever.

Re:Linus Torvalds: Programs exist for their users by muuh-gnu on Friday March 09, 2012 @09:00AM (#3684041)
> not for the whole eco-system, but that's what stable distros are for

The problem is that no app dev targets stable distros, but always goes for the latest and greatest from the upstream so distros are constantly forced to update libs and change the base system.

So with a stable distro, you cant get a new version of an app, because the libs of your distro are too old, and you need to upgrade the whole distro just to be able to get that new app you want.

The Linux ecosystem needs one distro (say Ubuntu) to become so influential, that app devs start to primarily target it instead of the upstream. Only then will the library space stop being a moving target for end users, and only then it will be possible to upgrade app1 without triggering an automatic update of app2, which both happen to depend on the same lib. Only then will these useless practices of "packaging" and "backporting" finally stop, and devs will be simply make packages themselves, like they do on windows or osx. Only then will users be able to install a distro once, and then be able to install new apps for 5-10 years without having to upgrade the whole distro every 6 months.

> I wouldn't want the ecosystem to stagnate right now. Or ever.

But with an ecosystem as unstable as the current one you wont get more than 1% of the market right now. Or ever.

Normal users and especially businesses simply dont want to constantly update their systems. Force them to do that, and they simply walk away.

Re:Linus Torvalds: Programs exist for their users by icebraining on Friday March 09, 2012 @09:31AM (#3684150)
The Linux ecosystem needs one distro (say Ubuntu) to become so influential, that app devs start to primarily target it instead of the upstream. Only then will the library space stop being a moving target for end users, and only then it will be possible to upgrade app1 without triggering an automatic update of app2, which both happen to depend on the same lib. Only then will these useless practices of "packaging" and "backporting" finally stop, and devs will be simply make packages themselves, like they do on windows or osx. Only then will users be able to install a distro once, and then be able to install new apps for 5-10 years without having to upgrade the whole distro every 6 months.

What happens in Windows is not what you're describing; developers are simply forced to distribute their own copies of the libraries (as DLLs or statically compiled) since there is no package manager. What then happens is that there are dozens of copies of the same libraries, most of them lacking bugfixes and even security patches.

The dependency system used by Linux distros may have its problems, but it surely beats ad-hoc dependency management, even if it requires backporting.

Normal users and especially businesses simply dont want to constantly update their systems. Force them to do that, and they simply walk away.

Right. If you use Windows, have you tried counting the number of update managers running in the background, the number of applications that ask you on launch to "verify updates", the number of times Windows Update alerts you, etc?

Windows machines are constantly updating. Unlike Ubuntu, they just do it incrementally instead of once every six months (except for security patches). But that's better fixed by moving to a rolling release scheme.

Re:Linus Torvalds: Programs exist for their users by anonymoushn on Friday March 09, 2012 @12:52PM (#3685136)
I would rather ship an extra copy of all of the libraries than tell the user that he has to update libc6 (and therefor almost all of the other software he uses) to run my software.
Re:Linus Torvalds: Programs exist for their users by icebraining on Friday March 09, 2012 @01:06PM (#3685201)
Nothing in Linux prevents you from doing so. Just ship your application with it and use a one line shell script to run it with the appropriate LD_LIBRARY_PATH.

It's just not commonly done (with exceptions like http://sta.li/), and as a user, I'm thankful for that.

Re:Linus Torvalds: Programs exist for their users by scott_w on Friday March 09, 2012 @09:39AM (#3684186)
To an extent, they already do.

The bigger development teams don't focus on a single distro, as their development base is probably diverse enough to demand a certain degree of platform compatibility.

However, many of the smaller development teams will focus almost exclusively on Ubuntu, as it is the distro they will most likely have.

I know, from my own limited experience, that I have only ever attempted to make my systems work on Ubuntu and just allowed others to push their changes into the main development if they have specific platform that they prefer to use.

Re:Linus Torvalds: Programs exist for their users by einhverfr on Friday March 09, 2012 @09:56AM (#3684259)
I wouldnt say that's true. LedgerSMB 1.3 when it shipped last year supported PostgreSQL 8.3 and higher, Perl 5.8, etc... 1.4 will probably require Perl 5.10 and PostgreSQL 8.4...... We specifically target older versions to make it easy for adoption.

In fact, usually when we run into problems, it's a new version, not an old one.

Re:Linus Torvalds: Programs exist for their users by saurik on Friday March 09, 2012 @03:29PM (#3685784)
> The Linux ecosystem needs one distro (say Ubuntu) to become so influential, that app devs start to primarily target it instead of the upstream.

This used to be RedHat: software for Linux would often come as either 1) source code (if open), 2) a crazy .sh install script, and 3) an RPM package for RedHat 5.

Re:Linus Torvalds: Programs exist for their users by jff on Friday March 09, 2012 @06:11PM (#3686392)
It is now Ubuntu. I think damn near all Linux software I see now has an Ubuntu .deb available.
Re:Linus Torvalds: Programs exist for their users by jiggy2011 on Saturday March 10, 2012 @12:42AM (#3687161)
Apart from Oracle Java it seems.
Re:Linus Torvalds: Programs exist for their users by acqq on Friday March 09, 2012 @08:33AM (#3683962)
There is a binary compatibility for kernel. Typically it's just the user-space dynamic libraries (in Windows speak: dlls not belonging to kernel) that you miss if you have a 5 year old binary and it won't run. Linus doesn't control user-space libs, just kernel.

See how jwz shows you how to run a binary of Nestcape from 1995 (17 years old) on the latest Linuxen:

http://www.jwz.org/blog/2008/03/happy-run-some-old-web-brows...

Your major problem if you want to make a closed source application is that the user space dynamic libraries are mostly (L)GPL licensed, so you have to avoid (L)GPL libraries to have a legally fully-library-independent closed source application. LGPL license allows closed source linking only if you link dynamically to the LGPL library (meaning: your application must depend on the externally present library which can be replaced at any time). Which is really fair, IMHO.

http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_Licen...

Re:Linus Torvalds: Programs exist for their users by davidw on Friday March 09, 2012 @07:18AM (#3683795)
If you want to be sure it'll work, you compile it statically, and waste a little bit of disk space and memory.
Re:Linus Torvalds: Programs exist for their users by protomyth on Friday March 09, 2012 @08:23PM (#3686721)
Trading security / bug fix updates in the process
Re:Linus Torvalds: Programs exist for their users by gaius on Friday March 09, 2012 @07:18AM (#3683793)
Re:Linus Torvalds: Programs exist for their users by Thangorodrim on Friday March 09, 2012 @08:58AM (#3684034)
Well, then, perhaps I am just lucky but just a few weeks ago I was able to get a fifteen year old binary running under both centos 6 and fedora 15.

I did have to fish around a bit for an old version of curses and create a symlink. It only took a few moments though.

Just a data point to consider.

Re:Linus Torvalds: Programs exist for their users by jff on Friday March 09, 2012 @06:20PM (#3686417)
If we used static compilation for everything, this wouldn't be a problem. Our problem would then be higher memory consumption, but I can fix that for $50--at least until the next Ubuntu release comes out.

Speaking of that, I wonder if there's some point at which dynamic libraries don't really help you that much. These days, even shared libraries don't seem to stop a GNOME desktop running a browser from sucking down a gig of memory; would it really kill them to have a couple more megs of static library in each program? With copy-on-write, I think things like Chrome which spawn many children would come out pretty well.

Re:Linus Torvalds: Programs exist for their users by evanlong on Friday March 09, 2012 @08:24PM (#3686725)
One advantage to shared libs/dlls is that a security fix will be applied to all applications that depend on that. So if everyone statically links against insecure libA.a then all apps that depend on it need to ship a patch. Where as if libA is shipped as a shared library then one update needs to be applied. That's one advantage but maybe not the best.
Re:Linus Torvalds: Programs exist for their users by im3w1l on Saturday March 10, 2012 @10:46PM (#3689477)
What if we could have opportunistic dynamic linking, where an application uses a shared library, if present and compatible, and otherwise uses the bundled? Seems to get the best of both worlds, no?
Re:Linus Torvalds: Programs exist for their users by josephg on Friday March 09, 2012 @07:00PM (#3686543)
Using shared libraries also decreases application startup time, because applications don't need to read as much code from disk.

Even using an SSD I suspect the difference would be noticable for most applications.

Re:Linus Torvalds: Programs exist for their users by dfc on Friday March 09, 2012 @11:58AM (#3684824)
What program from five years ago fails to run on debian/stable?
Re:Linus Torvalds: Programs exist for their users by dfc on Friday March 09, 2012 @01:05PM (#3685192)
I apologize for asking for specifics...
Re:Linus Torvalds: Programs exist for their users by derleth on Friday March 09, 2012 @04:50PM (#3686125)
> Ever tried to get a binary compiled 5 years ago to run on a fresh install of linux?

I run older binaries on Linux all the time.

Re:Linus Torvalds: Programs exist for their users by MatthewPhillips on Friday March 09, 2012 @07:17AM (#3683786)
It makes it hostile to abandonware.
Re:Linus Torvalds: Programs exist for their users by gaius on Friday March 09, 2012 @07:20AM (#3683797)
Hostile to people who use their machines for Real Work.