by cperciva · 17y ago · 0 comments
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.
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)
Another approach may be to use autopackage or similar.
- 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.
http://www.rpath.org/ does something like that for server side software, and I know vmware supports that model.
* 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.
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).
Sorry, but that doesn't sound very sane to me. :)