1

When trying to build jonesforth, which is a 32-bit GNU Assembler program, on Ubuntu 18.10 64-bit, I get the following message:

~/src/jonesforth $ make
gcc -m32 -nostdlib -static  -o jonesforth jonesforth.S
jonesforth.S:1154:10: fatal error: asm/unistd.h: No such file or directory
 #include <asm/unistd.h>
          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:11: jonesforth] Error 1

The source has the following lines:

//#include <asm-i386/unistd.h>  // you might need this instead
#include <asm/unistd.h>

When I try using asm-i386/unistd.h instead, it runs into the same issue.

Is the best course of action to install more headers via sudo apt install linux-headers...? If so, which should I go with? Should linux-headers-generic be sufficient?

Or, should I change the header that jonesforth.S is referring to?

Thanks!

dharmatech
  • 2,543
  • 3
  • 19
  • 12
  • 3
    You probably need [`linux-libc-dev`](https://packages.ubuntu.com/bionic/all/linux-libc-dev/filelist) or [`linux-libc-dev-i386-cross`](https://packages.ubuntu.com/bionic/all/linux-libc-dev-i386-cross/filelist) (and use `CFLAGS="-I ...` accordingly). – muru Dec 11 '18 at 01:54

0 Answers0