4 ms·
This would be great, except that it's impossible to "support Linux". You can support Debian, or Gentoo, or CentOS, or Slackware, or one of the many other linux
by cperciva 18y ago
This would be great, except that it's impossible to "support Linux". You can support Debian, or Gentoo, or CentOS, or Slackware, or one of the many other linux distributions; but the fact that your code works on one distribution doesn't necessarily mean that it will work on another.
I'm dealing with this with tarsnap right now -- I know the code works on FreeBSD, NetBSD, OpenBSD, OS X, and OpenSolaris; but for Linux all I can say is that it works on Debian, Ubuntu, CentOS, Slackware, Gentoo, and RedHat. Does it work on SUSE, Mandriva, Xandros, MontaVista, or Linspire? I don't know. (But if anyone here runs any of those, I'd be happy to hear from you.)
Yes, I could install N different distributions of linux and test them all; but testing on N different distributions is much more work than testing on 1, and many people simply won't have the time.
- makecheck 18y agoIn my experience, Linux platform compatibility boils down to a few things: - architecture (usually i686 or x86_64) - availability of the right library versions in /usr/lib (however, you can combat this by "shipping" the versions you need with your app) - (rarely) kernel version - (even more rarely) glibc version In other words, most of the time, if it's an Intel binary, it seems to work pretty well. If a particular Linux distribution seems necessary, it usually just means that one of the above features of that distribution is important.
- wheels 18y agoIt's really a lot more complicated than that on the packager's side. What you're seeing is likely the result of the person building the binaries already linking everything statically that's possible, using older compatibility versions of the shared libraries, and hoping for the best on the rest, being certain not to make use of recent or volatile features.
- gaius 18y agoIt's getting to the point now that you might as well distribute your app in the form of a VM image.
- olefoo 18y agoI'm curious as to why that isn't more common, although you get a similar compatibility issue with your choice of vmware, xen or virtualbox; and there is some overhead; but yes, it sounds like a good idea to me. http://www.rpath.org/ http://www.rpath.org/ does something like that for server side software, and I know vmware supports that model.
- CUViper 18y agoA VM is great for trying out an app, but if I'm really going to use something, it becomes a PITA to have it in it's own sandbox. I don't want to deal with network sharing and all that just to move files between all my apps.
- jamesbritt 18y agoThat's the JumpBox (http://www.jumpbox.com/ http://www.jumpbox.com/) people are doing.
- cperciva 18y agoI've had problems with inter-distribution linux compatibility in tarsnap due to * varying definitions of off_t (fortunately autoconf fixed this for me). * the linux 2.4 kernel returning EINVAL for the interaction of TCP_NODELAY and TCP_CORK (fixed by avoiding the problematic interaction on all linuxes). * the header files for openssl, zlib, and ext2fs/ext2_fs.h sometimes being installed and sometimes being part of packages with a wide variety of names (which I'm attempting to work around by providing a list of "the package you need should have a name something like this..."). I think there was a library version issue at one point too, but I can't remember what it was. Yes, I could avoid problems with header files if I only provided binaries; but even leaving aside the question of security, this would mean that I'd have to deal with the problem of packaging binaries in N different ways.
- cgranade 18y agoTest a few the big ones (Fedora and Ubuntu spring to mind), play nice with native package managers and use a liberal enough license that someone can make a package of your game for another distro, even if they still need to install the data separately. This makes it the responsibility of package maintainers to modify the package you've already made to point at the right directories. Another approach may be to use autopackage or similar.
- nailer 18y agoAs cgrenade already mentioned, most Linux users use something either based on Debian (which includes Ubuntu) or Fedora (including RHEL). Also, consider that the major Linux ditros have far more users than the different BSDs or Solaris do (OK, there's a lot of old projects running Solaris, but it's very rare to pick for new projects, so I doubt this would be a big source of customers for new software).
- gaius 18y agoIndeed. To most major vendors (that I deal with anyway) Linux is synonymous with RHEL 4 or 5 and that's it. Sometimes only one of those.
- brl 18y agoOur application is written in Java which is a compatibility nightmare on Linux. There are half a dozen alternative Java implementations which are all slow and broken but that doesn't stop the important Linux distributions from preferring them strongly over the Sun JRE. This forced us to bundle the Sun JRE with our application on Linux, which effectively doubled the size of it. It was worth it though because we haven't seen any Linux incompatibility issues yet. (ps: I can test tarsnap on ArchLinux)
- kragen 18y agoWhat's the current legal status of bundling the JRE with your application? I seem to recall that fairly recently (three or four years ago) you had to download it from Sun and "sign" a clickwrap agreement in order to get it working.
- pmarin 18y agoI think that the only sane way is to "support Unix". Avoid conditional compiling and features that are only in one platform and use standard libraries. Of course this is the most difficult approach and usually impossible to make.
- jbjohns 18y ago"I think that the only sane way is .... the most difficult approach and usually impossible to make." Sorry, but that doesn't sound very sane to me. :)
- pmarin 18y agoWell, think about the time that you could spend in testing and debugging each platform and the time that you can spent in only one.