20.04 on mac M1

Jerry Geis jerry.geis at gmail.com
Wed Oct 13 19:41:56 UTC 2021


On Wed, Oct 13, 2021 at 3:17 PM Paul Smith <paul at mad-scientist.net> wrote:

> 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.
>
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Hi Paul - thanks for the reply..  So I have
/usr/alpha-linux-gnu/include/sys/io.h

but it must not be actually included when I compile as a standard include
directory ???

if I add the -I/usr/alpha-linux-gnu/include to the compile - now - that
does work.   Thanks!  Not sure why its not picking it up automatically.

jerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20211013/7ac29b77/attachment.html>


More information about the ubuntu-users mailing list