Reference Platform Setup, Bugs

This chapter describes workarounds for areas of known incompatibility of the IRIX 5.2 Reference Platform with the MIPS ABI. This information is not available for earlier Reference Platforms (RISC/os or IRIX 5.1).

  • setting up IRIX - Setting up the IRIX ABI environment
  • /dev/abi nodes - Device nodes not made in /dev/abi
  • /opt directories - Some installation directories in /opt not made
  • abi flag - The -abi flag is not documented for cc or ld
  • mount - Mount command does not take -F type
  • cdfs - Mount command does not accept cdfs type
  • monitor - The monitor routine and profiling unavailable
  • libucb - libucb.a is not provided
  • _lib_version - _lib_version not set
  • socket library - Socket library needs to be replaced
  • some libraries not clean - Some ABI static archives are not ABI-clean
  • uname - uname call workaround
  • Setting up the IRIX ABI environment

    While IRIX 5.2 with IDO 3.18 serves as the Reference Platform, it is not, by default, installed as an ABI environment.

    The eoe1.sw.svr4net package must be installed to get the ABI libsocket and libnsl libraries. If this package is not installed from the miniroot, the system must be rebooted to force the kernel to be rebuilt before the changes will take effect.

    The dev.sw.abi and compiler_dev.sw.abi packages must be installed to get the ABI Development environment.

    The svr3pipe variable must be set to zero with systune to guarantee ABI behavior when using pipes.

    The eoe2.sw.oampkg package must be installed in order to access the ABI packaging utilities.

    Device nodes not made in /dev/abi

    According to the Conformance Guide, devices for supported installation media are found in /dev/abi. If one of the supported media devices (floppy, QIC-120 cartridge, 6250 bpi 9-track tape, or ISO 9660 CD-ROM) is present on the system, the corresponding node should be found in /dev/abi. These nodes are not made on IRIX 5.2.

    One possible workaround is to special-case installation for IRIX, to check known device names for these media. More likely, it is best to prompt for the installation device, rather than checking for particular defaults, thus avoiding the question of whether an expected default node has been made or not.

    Some installation directories in /opt not made

    The Conformance Guide specifies that the special install directories /opt/bin, /opt/man, and /opt/include are provided for symlinking files from /opt/pkg/*, in order that each package installed doesn't have to have its' bin directory added to the $PATH, or man directory added to $MANPATH. /opt/include and /opt/man are not made on IRIX 5.2.

    The workaround is for an install procedure to check for these directories, and make them if they are not present.

    The -abi flag is not documented for cc or ld

    The -abi flag for cc and ld is used to make ABI binaries on the IRIX Reference Platform. This flag is not documented in the cc and ld manpages.

    Developers are urged to use the abicc and abild wrappers to build ABI binaries. These wrappers hide the details of how cc or ld should be called. If the exact invocation is needed, cc -abi -v will show how the compiler passes are called; this output should be saved for reference, and will show the combination of preprocessor defines, ANSI compliance modes, etc. that make up ABI mode.

    Mount command does not take -F type

    According to the ABI, the mount command should take the -F type flag and argument. On IRIX 5.2, mount -t type must be used instead.

    Note that in the case of mounting an CD-ROM device, the IRIX mediad program may automatically mount the CD-ROM on the mountpoint /CDROM, as long as the CD-ROM is in a format mediad recognizes, and mediad is running. This behavior is not necessarily expected on other ABI-conforming platforms.

    Mount command does not take cdfs type

    The mount command does not accept the cdfs type. On IRIX, this type is called iso9660.

    The monitor routine and profiling unavailable

    The monitor library routine, and the synonym _monitor, are not found in the ABI C library on IRIX 5.2. On IRIX, the routine has been moved to libprof.a, which is not present in the ABI Development Environment. The cc compiler will also look for this library if the profiling flag (-p) is supplied, and fail to find it, resulting in an error message.

    Profiling should probably not be used in an ABI application. The IRIX static archive libprof.a cannot be used, as it pulls in a number of non-ABI symbols.

    libucb.a is not provided

    The Conformance Guide specifies that libucb.a is available as a transition aid for popular BSD UNIX interfaces. This library is not available on IRIX. However, virtually all of the functionality is available within libc. A possible workaround is to perform this command before compiling:

    cd /usr/lib/abi ln -s libc.so libucb.a This is not guaranteed to work correctly in all cases, but might serve as a transitional aid (libucb.a is only supposed to be a transitional aid anyway). Be sure to run check_abi_compliance on the resulting binary to insure no non-ABI interfaces were pulled in.

    _lib_version not set

    _lib_version is not set in binaries generated on the Reference Platform. ABI programs require ANSI C semantics, so _lib_version should be set non-zero.

    Socket library needs to be replaced

    The run-time ABI socket library (DSO) in IRIX 5.2 has some bugs. The workaround is to arrange things so that the IRIX libc is used to provide the socket interfaces. To perform this workaround, first check that the IRIX package eoe1.sw.svr4net is installed. If not installed, go back and install it, since this is required for the ABI execution environment.

    cd /usr/lib ls -l libsocket.so mv libsocket.so libsocket.so.orig ln -s libc.so.1 libsocket.so The ls -l step is to check that the workaround has not already been enabled; if libsocket.so is already a symbolic link to libc.so.1, there is no need to continue as the workaround has been enabled.

    Do not make any changes in the compile-time ABI environment, /usr/lib/abi.

    Some ABI static archives are not ABI-clean

    Three of the static archives supplied in the ABI build environment on the IRIX 5.2 Reference Platform are not fully ABI-clean. The three libraries are libXt.a, libXmu.a, and libmld.a. Workarounds are generally possible if the non-ABI symbols are pulled in to a program (this will not always happen).

    If check_abi_compliance reports compliance problems with the symbol gethostname, it could have come from any of the three libraries. The workaround is to provide a stub gethostname routine.

    The other problems reported are with bzero and getpagesize.

    In each case providing the stub in the program itself will force the symbol to be resolved to the local routine, not to the non-ABI-compliance routine in a system DSO.

    uname call workaround

    The uname routine is a source-level interface. The internal calling sequence has not been properly standardized with the 1.1 Conformance Guide (an oversight in the standard itself). If the file is included on the IRIX 5.2 Reference Platform, the call to uname will not be binary compatible. The workaround is to include a stub routine which will cause the proper internal call for binary compatibility.

    static int uname (struct utsname *_buf) { int ret; ret = nuname(_buf); return ret; }
    v1.4 L/M 6/15/94