I'm trying to build IBCS (source here) on Ubuntu 15.10 (Linux 4.2.35).

This module is obviously pretty old, because its CONFIG.i386 file gives gcc an option -m486, which doesn't exist anymore, but changing to -march=native seems to work OK.

The file emulate.c contains #includes like:

#include <linux/config.h>
#include <linux/module.h>
#include <linux/version.h>
#include <asm/uaccess.h>

On my system, only linux/version.h exists. The following seems to work, however:

#include "/usr/include/valgrind/config.h"
#include "/usr/include/sepol/module.h"
#include <linux/version.h>
#include </usr/src/linux-headers-4.2.0-35/include/linux/uaccess.h>

(YMMV, of course, if you don't have sepol.)

That works, except for /usr/src/linux-headers-4.2.0-35/include/linux/uaccess.h, the top of which has

#include <asm/uaccess.h>

Which is not found.

I don't seem to have an asm folder in /usr/include or /usr/include/linux. I do have an /usr/include/asm_generic, but it doesn't have uaccess.h.

My questions are:

  1. Why do the modern kernel headers contain references to (apparently) nonexistent files, rather than providing them itself?

  2. Where can I get a version of asm/uaccess.h and the other headers needed for compilation?

  • 2
    Try adding -I /lib/modules/$(uname -r)/build/arch/x86/include to the compiler command line. Commented Mar 21, 2016 at 17:41
  • @MarkPlotnick Oh, that's worked.
    – cat
    Commented Mar 21, 2016 at 17:54

1 Answer 1


iBCS is obsolete, has been for a long time. Too much has changed in the Linux innards to there be any chance for this to still compile, even on an early 4.x kernel. Today it is linux-abi, but that is dead since 2013. Perhaps one of the binfmt modules does the job today.

  • I know about binfmt :P I stumbled upon Gilles' comment on Oldest binary working on Linux?, and decided to test it out.
    – cat
    Commented Mar 21, 2016 at 19:24
  • @tac, that is a native binary, iBCS was for running SCO binaries.
    – vonbrand
    Commented Mar 21, 2016 at 19:31
  • I'm aware, I just thought I might point out where the idea appeared to me to use IBCS.
    – cat
    Commented Mar 21, 2016 at 19:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .