Technical article 100804

What SCO OpenServer Release 5.0.0 system calls won't work with SCO XENIX?

OpenServer 5.0.0

Written · Last revised

Problem

Code compiled on SCO OpenServer 5.0 Development System will not run on SCO XENIX.

Cause

The XENIX kernel does not recognize the system call that the OSES binary is attempting to execute and sends signal SIGSYS (bad argument to system call) to the process. The system call number is not understood by the XENIX kernel.

SCO OpenServer 5.0 COFF binaries will mostly work unchanged on
a 3.2V4.2 kernel.  The library code actually adjusts to the kernel
it happens to be running on (either a 3.2V4.2 or SCO OpenServer 5.0
kernel) and simply "works", albeit in a slower and less efficient
manner.  This scheme won't work on SCO XENIX since the underlying
kernel doesn't support any of the choices that the library code
is trying to make.

Here is a partial list of function calls that will not work when run on XENIX:

chsize(S) fchdir(S) fchmod(S) fchown(S) fpathconf(S) fstatvfs(S) getgroups(S) getitimer(S) getpmsg(S) getrlimit(S) lchown(S) lstat(S) mmap(S) mprotect(S) munmap(S) paccess(S) pathconf(S) putpmsg(S) readlink(S) readv(S) rename(S) scoinfo(S) setcontext(S) setegid(S) seteuid(S) setgroups(S) setitimer(S) setrlimit(S) sigaltstack(S) sigsendset(S) sigsuspend(S) statvfs(S) symlink(S) sysconf(S) truncate(S) vfork(S) waitid(S) writev(S)

This list is not comprehensive, but it includes the majority of functions.

Solution

To resolve this problem, follow these steps:

Compile the binary on XENIX with the XENIX Development System.

*or*
Cross compile to XENIX (cc -xenix or cc -x2.3).  The SCO 3.2V4.2
Development System cc command supports this option.  For SCO
OpenServer 5.0 you must purchase the XENIX/DOS Cross Development
System Extended Feature Supplement product.
*or*
If the XENIX/DOS Cross Development System product is not available,
compiling with the "-b ibcs2" flag _may_ work.  This causes the
libraries to choose older (and potentially less safe or capable)
code paths.  Specifically, OpenServer Release 5.0 is significantly
better at running APIs like sleep, popen, signal, and so on, than
Open Server 3.0 was, and avoids the sysconf() calls of Open Server
3.0 in most of these alternate code paths.
NOTE:     SCO OpenServer Release 5.0 is not 100% iBCS2 compliant, and XENIX
          is not 100% compatible with the SCO OpenServer Release Development
          System if the iBCS2 mode is selected over the default.

From the Xinuos technical article database, record 100804. Reproduced with permission. The original is at www.sco.com/ta/100804, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.