Unix

From RogueBasin
Revision as of 20:02, 8 October 2006 by Kernigh (talk | contribs) (The start of a Unix page. Mostly I explain that Unix has almost no binary compatibility.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Unix is a family of operating systems that includes BSD, Linux, Solaris, commercial Unix and other Unix clones. Mac OS X is also a Unix clone at its core. Unix is the origin of Rogue and roguelikes; the curses library also comes from Unix. The world has gradually tired of calling it UNIX with all uppercase letters. In the 1980s, players would sit at their video screens and command lines, type "rogue" or "hack" or "larn" or another game, and enjoy the keyboard action and ASCII graphics. They still do it today. FreeBSD, NetBSD, OpenBSD, OpenSolaris and several GNU/Linux distributions are freely available; many programmers and skilled players use them.

(Unix is actually someone's trademark, but commonly refers also to Unix clones like BSD and Linux.)

How Unix is

Unix is several binary-incompatible operating systems and releases over multiple

A roguelike developer who has shipped binaries of his or her game for Macintosh, Windows, AmigaOS, BeOS and handhelds might be uncomfortable with Unix. The realm of Unix is nearly void of binary compatibility. A program compiled on one Unix operating system will not run on another. The FreeBSD operating system and the OpenSolaris operating system, for example, have different kernels and C libraries (though the C libraries contain mostly the same C functions).

There are exceptions to this. Some operating systems provide binary emulation. For example, some NetBSD/i386 kernels can load Linux/i386 binaries, providing a way to play ADOM upon NetBSD. This requires some setup, including the installation of certain Linux packages (like the GNU C library for Linux) on the NetBSD system.

Unix runs on multiple processor architectures. At the extreme, NetBSD does at least 17 architectures. Ubuntu provides Linux for 4 architectures, but Linux can also run elsewhere. Ubuntu/PowerPC will not run programs from Ubuntu/SPARC. Further, some systems are not even binary compatible between releases; OpenBSD 3.9 will not run any OpenBSD 3.8 programs, unless the user installs 3.8 libraries. Unix vendors deal with this by building popular packages themselves. What the roguelike developer needs to do is to make available the roguelike's source code and permit the public to run their C (or other language) compilers on the program.

Thanks to the Linux Standards Base and to the stability of the GNU C Library, some Linux distributions have a great deal of binary compatibility. Thus some roguelikes support Linux/x86 and no other Unix, and some provide Linux binaries without source code. This of course is an exclusion of the minority who has Linux on certain Apple or Sun hardware.

Further, Unix has a diverse set of libraries and environments to program in. NetHack can display on the terminal, with Xaw widgets, or with Qt widgets, all on Unix. This often causes dependency hell, a situation during which users must install libraries (such as Qt, and all of the libraries that Qt uses) before they can install a program. Fortunately, most roguelike games use common libraries. A copy of Angband, built with only the "gcu" interface, needs only libc (the C library) and libcurses (the curses library) to run.

Porting to Unix

To do.

Porting from Unix

Porting within Unix