The EMX Project

From EDM2
(Redirected from EMX Project)
Jump to: navigation, search

A project started by Eberhard Mattes in the late 1980's to simplify the porting of UNIX software to 32 bit OS/2 and DOS. The basic EMX runtime package consists of a dynamic link library for OS/2 that provides extensions to the OS/2 POSIX API and an interface to the OS/2 API, and a 32 bit VCPI DOS extender that provides a POSIX API that is fully compatible with the OS/2 one. In addition the project offers a host of headers and libraries and/or ports of the same intended to replicate common UNIX libraries including all common ANSI C header files and a complete C library, a simple graphics library for 320x200 (256 colours) mode, a library for screen output in windows, partial port of the BSD C library, the BSD data base library(dbopen), the BSD curses library, regexp library, and both the GNU and BSD termcap libraries.

In addition to the default runtimes and header files EMX comes with a set of utilities such as emxfpemu (387 FPU emulator), emxomf.exe that converts o object files (a.out) to .obj object files (OMF) allowing the creation of OS/2 executables that do not need the EMX runtime. Also emximp.exe for creating import libraries, emxexp.exe for export definitions and emxbind.exe to bind (link) o object files to a DOS executable.

While you usually create separate executables for DOS and OS/2, you can also create executables that run on both OS/2 and DOS without any changes, however due to the use of VCPI, EMX programs do not run on Microsoft Windows's DOS shell unless you use RSXWIN. Note also that the EMX package does not come with a make program, the author recommended dmake and people have also been using more modern versions of GNU Make with the package but older versions of the EMX files themselves and a number of programs ported with the package actually expect the IBM/Microsoft NMAKE even though that product differs considerably from the UNIX style makes.

The EMX name simply stands for Eberhard Mattes eXtender and comes from the original idea for the project as a POSIX compatible 32 bit DOS extender, but even through the main thrust of the development ended up on OS/2 the initial project was to provide a DOS extender for the emTeX package Hr. Mattes created for DOS.

The EMX package is still useful for porting older software from UNIX like environments to OS/2 and in some cases it is justifiable to use it for developing new software with, given that is it is relatively bug free and battle hardened. But it should be taken into consideration that most of the compilers available for the system are based on old versions of the GNU system that were developed by the FSF themselves before the PGCC takeover of the codebase, and they produce some of the slowest x86 executable code of any compiler ever, and have absolutely minimal support for threads and so on. In most cases you should consider Open Watcom or newer versions of GCC first for new ports and projects.

Add on packages

There were a number of add on packages for the EMX system, both parts of the original collection by Eberhard Mattes and added by third parties. The EMX collection included:

  • GCC 2.8.1, the GNU C compiler, supporting the C, C++, and Objective C languages
  • GAS 2.6, the GNU assembler
  • GDB 4.16, the GNU debugger
  • ld, an ancient version of the GNU linker hacked for emx
  • strip: a member of an ancient version of the GNU binary utilities.
  • ar, nm, size, objdump: a subset of the GNU binary utilities 2.6
  • gprof, the BSD/GNU profiler
  • texinfo, the GNU documentation system.

Third party contributions include:

  • Newer GCC versions including 2.9.5, 3.1.1, 3.2.2 and versions of PGCC
  • GNU Objective C class libraries
  • GNU Fortran-77
  • GNU Bison
  • GNAT Ada
  • GPerf
  • CXRef
  • GNU readline library
  • GNU binary utilities
  • GNU RX
  • The SVGA-Kit and VESA-EMX libraries
  • The GNU CHILL programming language was included or available at some point.
  • POSIX Pthreads - BSD Pthreads library

For running EMX programs with other operating systems:

  • RSX & RSXWIN - Replacement memory-manager that allows EMX programs to be used with MS Windows and systems that offer DOS DPMI extenders.
  • EPOCEMX - A similar library and utilities for EPOC version 5, based on OS/2 EMX and while not 100% compatible, close enough for most programs to be ported with little or no effort.

Version / Download

  • Last known version: Version 0.9d fix04 (2001), you will also need the original EMX 0.9d package, or download the combined 0.9d release + 04 fix (WPI package)
  • There is a later unofficial patch by Vincenzo Venuto that allows EMX to work with files larger than 2GB

Prerequisites

  • If you want to create executables you need LINK386, a selective install option in OS/2 2.0 or higher.

Links

Note that you will need zoo or booz to decompress the sources provided on that site.

Licence

  • EMX is open source software released under GPL v2.

Authors

  • Eberhard Mattes
  • Vincenzo Venuto (2GB fix)
  • W. Metzenthen (emxfpemu)
  • Henry Spencer (Regxp)