linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sparse and multiarch include paths
@ 2011-08-24 21:42 Josh Triplett
  2011-08-24 21:48 ` Chris Forbes
  2011-08-24 22:43 ` Ludovic Brenta
  0 siblings, 2 replies; 4+ messages in thread
From: Josh Triplett @ 2011-08-24 21:42 UTC (permalink / raw)
  To: linux-sparse; +Cc: debian-gcc, multiarch-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sparse and multiarch include paths
  2011-08-24 21:42 sparse and multiarch include paths Josh Triplett
@ 2011-08-24 21:48 ` Chris Forbes
  2011-08-24 22:43 ` Ludovic Brenta
  1 sibling, 0 replies; 4+ messages in thread
From: Chris Forbes @ 2011-08-24 21:48 UTC (permalink / raw)
  To: Josh Triplett; +Cc: linux-sparse, debian-gcc, multiarch-devel

I've hit this as well. The ubuntu-packaged sparse seems to get this
right; building from git sources gives busted paths -- suspect they
have patches that need to come upstream?

-- Chris

On Thu, Aug 25, 2011 at 9:42 AM, Josh Triplett <josh@joshtriplett.org> wrote:
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sparse and multiarch include paths
  2011-08-24 21:42 sparse and multiarch include paths Josh Triplett
  2011-08-24 21:48 ` Chris Forbes
@ 2011-08-24 22:43 ` Ludovic Brenta
  2011-08-25  3:16   ` Josh Triplett
  1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Brenta @ 2011-08-24 22:43 UTC (permalink / raw)
  To: Josh Triplett; +Cc: linux-sparse, debian-gcc, multiarch-devel

Josh Triplett <josh@joshtriplett.org> writes:
> 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'

See http://bugs.debian.org/638418

Hope this helps

-- 
Ludovic Brenta.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sparse and multiarch include paths
  2011-08-24 22:43 ` Ludovic Brenta
@ 2011-08-25  3:16   ` Josh Triplett
  0 siblings, 0 replies; 4+ messages in thread
From: Josh Triplett @ 2011-08-25  3:16 UTC (permalink / raw)
  To: Ludovic Brenta; +Cc: linux-sparse, debian-gcc, multiarch-devel

On Thu, Aug 25, 2011 at 12:43:37AM +0200, Ludovic Brenta wrote:
> Josh Triplett <josh@joshtriplett.org> writes:
> > 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'
> 
> See http://bugs.debian.org/638418
> 
> Hope this helps

Thanks!  That does seem to explain the problem; I removed and
reinstalled gcc-multilib, and now I have a /usr/include/asm symlink and
sparse seems happy.

- Josh Triplett

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-25  3:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 21:42 sparse and multiarch include paths Josh Triplett
2011-08-24 21:48 ` Chris Forbes
2011-08-24 22:43 ` Ludovic Brenta
2011-08-25  3:16   ` Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).