Platform Notes (OS/2)

From FreeM Wiki
Jump to navigation Jump to search
This article documents one or more features currently implemented only in cvs-current, and as such, may not apply to any current, official release.

Port Status

OS/2 is a Tier 2 Port

Verified Releases

  • FreeM 0.62.3 (27 Mar 2025)
  • FreeM cvs-current (23 Mar 2025)

Testing Details

We build and test the OS/2 port on an ArcaOS 5.1 VM running in VirtualBox.

Building and Installing

Currently, the OS/2 port is only tested on ArcaOS, and you will need to install several things in order to build and run:

  • autoconf
  • automake
  • gcc
  • readline-devel
  • bash
  • binutils-devel
  • coreutils
  • emxrt
  • gawk
  • gcc-wlink
  • gcc-wrt
  • grep
  • info
  • libc-devel
  • libtool
  • kbuild-make
  • sed
  • tar
  • gzip

All of these can be installed with yum install or the Arca Noae Package Manager (ANPM).

Once the dependencies are met, simply download and extract the FreeM source code, and follow these steps:

  • Open an OS/2 Window (in the Command Prompts folder in OS/2 System or Computer on the desktop)
  • Run the following commands:
[C:\] bash
$ autoreconf --install  # only needed if installing from the CVS repo
$ ./configure CC=gcc GREP=grep
$ make
$ make install
$ fmadm configure

Once this is done, proceed to the next section.

Workarounds

Under OS/2 and ArcaOS, FreeM binaries are installed under C:\USR\LOCAL\BIN, but the FreeM daemon and the FreeM interpreter cannot be launched from the same executable (the daemon will start, but interpreters will give an error resembling Resource busy).

The fmadm configure (and fmadm reconfigure) commands will automatically copy C:\USR\LOCAL\BIN\freem.exe to C:\USR\LOCAL\BIN\freemd.exe.

Running

  1. Open an OS/2 Window command prompt
  2. Run bash
  3. Run /usr/local/bin/freemd -dk to start the FreeM daemon
  4. Minimize the FreeM daemon process
  5. Open a second OS/2 Window command prompt
  6. Run the following commands:
[C:\] CD \USR\LOCAL\BIN
[C:\USR\LOCAL\BIN] FREEM

Platform Limitations

  • Only one interpreter instance can be launched at a time
  • JOB does not work
  • Terminal windows are fixed in size to 80x24
  • The FreeM daemon must be launched in the foreground, as fork() is unsupported here (freemd.exe will refuse to launch if you do not pass the -k or --nofork flags).
  • Network sockets functionality is unavailable
  • Building without readline causes direct mode to echo each line of code entered
  • No binary package is available: once we have an RPM package for Red Hat-derived distributions, an OS/2 RPM should be fairly straightforward

Documentation for porting UNIX applications to OS/2 is scant, which makes many of these issues difficult to work around. However, we do want to iron out all of these shortcomings and promote this port to Tier 1 status.

Required Kernel Tuning

Coming soon.