20.04 on mac M1

Paul Smith paul at mad-scientist.net
Wed Oct 13 19:16:09 UTC 2021


On Wed, 2021-10-13 at 14:38 -0400, Jerry Geis wrote:
> my issue is I am not able to find sys/io.h  - I'm trying to compile a
> program that uses it and it is not present.  
> 
> So I tried "apt-file search sys/io.h" and it gives some files - but
> none of them are placed in 
> /usr/include/sys/io.h file path.
> 
> I still tried installing some of those packages - but still the
> compiler is not finding the file???
> 
> There isnt even a /usr/include/sys directory on the 20.04 arm ? yes
> build-essential is installed.

It's not supposed to be there.

It lives in an architecture-specific subdirectory; for example on my
system it's:

  /usr/include/x86_64-linux-gnu/sys/io.h

This is part of the libc6-dev package.

When the compiler runs, it adds the architecture-specific subdirectory
for that compiler to the default system search path for headers:

  $ gcc -v -o /tmp/foo /tmp/foo.c
    ...
  #include "..." search starts here:
  #include <...> search starts here:
   /usr/lib/gcc/x86_64-linux-gnu/9/include
   /usr/local/include
   /usr/include/x86_64-linux-gnu
   /usr/include
  End of search list.

So, if you don't see that then you'll have to figure it out I suppose.






More information about the ubuntu-users mailing list