20.04 on mac M1
Colin Watson
cjwatson at ubuntu.com
Wed Oct 13 19:58:19 UTC 2021
On Wed, Oct 13, 2021 at 03:41:56PM -0400, Jerry Geis wrote:
> 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.
Because Alpha is a totally different CPU architecture from ARM, and you
only have that file because you installed a package for cross-compiling
programs to run on Alpha. If using that search path works for you, it
can only be by luck: the architecture-specific definitions it gives you
will be entirely wrong, because they're designed for a completely
different kind of computer. I very strongly recommend against hacking
this search path into your build process.
<sys/io.h> only exists at all on a few architectures (Intel x86, IA64,
and Alpha). A program that relies on it is simply not going to work on
ARM without more substantial porting work. (Of course, if the program
you're trying to build isn't very carefully-written, then it's always
possible that it includes this header but doesn't actually use it.)
--
Colin Watson (he/him) [cjwatson at ubuntu.com]
More information about the ubuntu-users
mailing list