[Multiarch-devel] sparse and multiarch include paths

Josh Triplett josh at joshtriplett.org
Wed Aug 24 21:42:46 UTC 2011


When trying to use sparse on some low-level userspace code, I ran into
the following error:

/usr/include/bits/socket.h:381:11: error: unable to open 'asm/socket.h'

It looks like that file lives in
/usr/include/x86_64-linux-gnu/asm/socket.h , and gcc has
/usr/include/x86_64-linux-gnu in its default include path.  This relates
to Debian's multiarch efforts, moving such headers to paths which
include the architecture to allow simultaneous installation of the
headers for multiple architectures.  I don't know how gcc ends up with
that directory in its include path, but sparse needs to follow suit to
compile any code which includes these architecture-specific
headers.

I've CCed the Debian GCC maintainers and multiarch developers, in the
hopes of getting some additional details that might help resolve this
problem.

- Josh Triplett



More information about the Multiarch-devel mailing list