UnixWare - saprykin/plibsys GitHub Wiki

Configurations

Version Compilers Status Tests
7.1.4 (x86) GCC 2.95.3 (x86) Compiled Passed

About

Currently UnixWare is distributed by Xinuos, developed by Novell and SCO. UnixWare is a closed-source shareware so you must buy a license after a trial period. You can download evaluation version (x86) from the SCO server. This ISO is capable to run on VMware (or similar virtualization platform which supports x86). Lot of additional software packages are available from the Skunkware repository. It is recommended that you install at least bash, tar, gzip and openssh packages to make life a bit easier. CMake is not available there. Many open-source packages are also available on CD#6 from the distribution set.

Installation

Quick tips for the package management:

  • To install a package (a .pkg file) use the following command: pkgadd -d /full/path/to/package all.
  • To remove a package use the following command: pkgrm <package_name>.

Generally speaking there are two ways to develop software under the UnixWare:

  • UnixWare and OpenServer Development Kit (UDK, or UODK): universal C/C++ development system for both UnixWare and OpenServer. On older 2.x versions of UnixWare it was also named as C/C++ Compilation System (CCS).
  • GNU development tools: well-known GCC compiler and related tools.

UnixWare is shipped with its own optimizing CCS, but it lacks C++ compiler we are also need. The UDK requires license from SCO which can be quite expensive. You should contact SCO (or Xinuos now) or one its reseller to obtain a copy of UDK, unless you have CD#5 from the original distribution set. Thus, we have only one free option which is to use the GCC. Version 2.95.2 is available in the Skunkware and should be installed.

Please note that it is recommended to use bash for building, especially for GCC.

First of all, we need GNU assembler and linker because native friends have some bugs and not working as expected.

  • Install latest make utility package from Skunkware (it should be version 3.79.1).
  • Download and unpack GNU binutils, version 2.14 should work. Build and install it using installed make version, the process is fast and straight forward.
  • You need to replace native as and ld utilities: rename them in /usr/bin and /usr/ccs/bin, then prepend binutils installation binary directory to the PATH environment variable.

QEMU

UnixWare can be run in QEMU, however it requires some special treatment. First, HDD and CD-ROM devices shall be attached to SCSI bus, otherwise system hangs. Second, a fairly old chipset emulation is required, for example i440FX with PIIX to make it working. Finally, e1000 network driver shall be selected as others are not quite supported. Below is an example command to run QEMU:

qemu-system-i386 -m 1024 -M pc \
  -device lsi53c895a,id=scsi0 \
  -drive file=unixware.qcow2,id=main_hdd,if=none,format=qcow2,cache=none \
  -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,drive=main_hdd,bootindex=0 \
  -drive if=none,media=cdrom,id=main_cd,readonly=on \
  -device scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,drive=main_cd,bootindex=1 \
  -nic vmnet-bridged,model=e1000,ifname=en0

To setup the networking stack, you need to make sure that packages like nd, nics and netmgt are installed in SCO Admin tool from distribution CD#2. After that, a network adapter can be added and configured. There maybe some issues when DHCP is enabled, for example the system may hang on graphical login; in that case, using manual IP address configuration helps.

SSH server can be installed through openssh package from the same CD.

Building CMake

Now we can prepare working CMake, version 2.8.12.2 should work (maybe 3.x branch can be also compiled). The building process is a bit tricky, so you should carefully follow the steps.

  • In system header /usr/include/unistd.h comment out exit() declaration which has C++ linkage): it would be messed up with C-styled one.
  • You need to place proper /usr/include/elf.h header file instead of the system one which lacks several structures and definitions. You can take proper file from the glibc.
  • Setup GCC environment variables explicitly: set CC to /usr/local/bin/gcc, CXX to /usr/local/bin/g++, CPP to /usr/local/bin/cpp.
  • We also need to tell that GCC is C99 compliant. Set CFLAGS and CXXFLAGS environment variables to -D__STDC__ -D__STDC_VERSION__=199901L.
  • Go to CMake root directory and edit Modules/Platforms/UnixWare.cmake file: you need to replace -K PIC arguments to -fPIC because we will be using CMake with GCC, not with bundled C compiler. Also remove -Wl,-Bexport linker flag since now we are using GNU linker.
  • Run CMake bootstrap process with ./bootstrap command.
  • Now you can compile CMake with make command and after that build installation packages with make package command.

Building

From now you can use CMake to build working library. You can also build GCC 2.95.3 version, it is quite easy.

  • Install bison from Skunkware.
  • Download and unpack GCC 2.95.3.
  • Set CFLAGS and CXXFLAGS environment variables to /usr/local/include/g++-3 because system itself lacks some required headers.
  • Configure GCC: ./configure --enable-threads=posix --with-gnu-as --with-gnu-ld. You can also pass required --prefix.
  • Run building with make bootstrap command. Here and below use make utility installed from Skunkware.
  • During the building process you can get errors about some functions redefinitions (like abs) in new GCC's headers. Just comment them out (in the building tree) and re-run building.
  • Install new GCC with make install command.
  • Fix <prefix>/lib/gcc-lib/i686-UnixWare*-sysv5/2.95.3/include/syslimits.h header: append LL suffix to LLONG_MAX constant value and ULL to ULLONG_MAX.

Additional references

⚠️ **GitHub.com Fallback** ⚠️