[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile on ubuntu - core/base fails

From: Ivan Vučica
Subject: Re: compile on ubuntu - core/base fails
Date: Fri, 10 Jun 2011 21:46:18 +0200

On Fri, Jun 10, 2011 at 16:29, Niels Grewe <niels.grewe@halbordnung.de> wrote:
On Fri, Jun 10, 2011 at 04:10:58PM +0200, nova wrote:
> Hi,
> The config.log says over socket.h:
> In file included from /usr/include/sys/socket.h:40:
> /usr/include/bits/socket.h:381:10: fatal error: 'asm/socket.h' file not
> found #include <asm/socket.h>
>          ^
> 1 error generated.
> configure:6380: $? = 1
> configure: failed program was:
> | /* confdefs.h.  */
> A find to locate any */asm/socket.h I got following result:
> ////// SNIP ////
> /usr/include/i386-linux-gnu/asm/socket.h
> ///// SNIP /////
> Is this the same problem like with the clang (see my post at
> clang-devel from today) that the a path like /usr/include/asm is
> expected but ubuntu 11.04 located it under /usr/include/i386/asm ?

This is a known bug with clang [0]. It is notoriously bad on picking up
the various distribution/arch dependent header directories. As a
workaround you could configure llvm/clang with the --with-c-include-dirs
switch and pass it the directories appropriate for your distribution.

Alternatively, to avoid recompiling clang, call ./configure with:

./configure CFLAGS=-Ifull/path/relative/to/asm CXXFLAGS=-Ifull/path/relative/to/asm

for example, in your case that is:

./configure CFLAGS=-I/usr/include/i386-linux-gnu CXXFLAGS=-I/usr/include/i386-linux-gnu

You can also define CFLAGS and CXXFLAGS as environment variables. Two examples:

CFLAGS=-I/usr/include/i386-linux-gnu CXXFLAGS=-I/usr/include/i386-linux-gnu ./configure
export CFLAGS=-I/usr/include/i386-linux-gnu; export CXXFLAGS=-I/usr/include/i386-linux-gnu;  ./configure

I think I have it written down somewhere how to get GCC to output its default search paths, but I can't dig it out now. If you can find that, you can probably just pass these paths to clang.


Ivan Vučica

reply via email to

[Prev in Thread] Current Thread [Next in Thread]