Slashdot Mirror


OpenBSD Linux Emulation Howto

evilviper writes: "BSDToday has a great article on how to run Linux binaries under OpenBSD. The article's already been picked up by sites like RootPromt and others so it's obviously as good of a tutorial as it gets. It's short and sweet, while covering everything from installing the OpenBSD linux package, as well as getting and installing the Linux libs for those of those without a Linux box to steal files from."

3 of 16 comments (clear)

  1. Just curious... by Rick+the+Red · · Score: 2
    Really, I'm not flaming or trolling, but there's something I just don't understand. If Linux copies UNIX, and if *BSD copies UNIX (and AIX, and HPUX, and Solaris, and etc. all copy UNIX), then why can't "UNIX" applications run on any of them?

    OK, I know why. But really, as someone pointed out the other day, the Open Group will certify NT as a "UNIX" OS if it meets their criteria, so why isn't the real goal to get *BSD certified as an official "UNIX" (and, similarly, to get Linux certified as well)? If my suspicions are correct and the certification does not mean apps are portable, then we need better UNIX certification, not abandonment of the only available certification.

    I also wonder how many people are scrambling to run *BSD binaries on their Linux boxes... Again, not to flame or troll, but I wonder about market share and how it affects software developers. Anyone know off-hand how many apps cleanly compile for both *BSD and Linux? (and yes, I know the story is about compatible binaries, not compatible source).

    Hell, how many binaries run on all Linux distros (hopefully the Linux Standard Base will help)? So are we talking getting Red Hat binaries to run on BSD, or are we talking about Debian binaries, or does it matter?

    Finally, it seems to me that it would be better to put the effort into making compiling the source so easy (transparent) that we don't care about binaries anymore. One real advantage of UNIX isn't that I can copy a binary file from my HPUX box and run it on my Solaris box, but rather that I can compile the same source on both boxes. This allows you to run UNIX on virtually any hardware and still find applications that will work -- you just have to compile them! Users new to UNIX have to learn all sorts of things that are different from the VAX/OS2/DOS/Windows/Amiga/Mac world they came from; why shouldn't compiling code be another thing all UNIX users learn?

    --
    If all this should have a reason, we would be the last to know.
    1. Re:Just curious... by _peter · · Score: 2
      UNIX:
      The Open Group's specification isn't something they bless you with for free. It's like ISO-9001; you can follow the standard like a nazi, but it won't get your "certified" unless you pay to get the tests done and approved.

      Better Source:
      See the (Net|Free|Open)BSD port systems. Lots of smallish singular apps do compile cleanly on most any unix. But complex ones (do you realize how many dependencies Gnome has??) are just a pain in the ass. Don't get me started on GNU ``portability tools'' like libtool. The ports tree allows all BSD users to benefit from just a few people's porting efforts. And it doesn't depend on the goodwill of the software authors to incorporate patches, although that's always preferred.

      Which Distro?:
      The usual barrier to cross-distribution binaries, afaik, is library versions and/or config file placement. The emulation layer is distro-agnostic in that respect.

      The emulation layer itself doesn't do much but support syscalls and convert kernel structures to what linux binaries expect. But in addition, every linux binary running sees an alternate version of the filesystem -- one in which the contents of "/emul/linux" override the rest. If "/emul/linux/foo" exists, linux binaries will access it rather than "/foo". That's how the linux_lib port works.

      Gripe:
      This is actually quite a disappointing document if you ask me. It doesn't say anything that's not easily available elsewhere. I know you linux types love having your hand held, but this question has been answered many times on OpenBSD's mailing lists, which are archived and searchable. And a more detailed explanation is available at my fingertips with the command man compat_linux. Or to the rest of you at OpenBSD's online manual pages.

  2. GNU/Linux by Z4rd0Z · · Score: 2

    I thought it was quite annoying how he constantly calls it Gnu/Linux emulation. This is the Linux kernel that's being emulated, not Gnu userspace. After all, the Gnu stuff can be compiled to native BSD binaries. All in all, I'd have to say it's a pretty poor article that added nothing that wasn't already in OpenBSD's compat_linux (8) man page.

    --
    You had me at "dicks fuck assholes".