[cfe-dev] FW: errors building clang on Ubuntu 12.04

Dmitri Gribenko gribozavr at gmail.com
Thu Jan 10 18:35:12 PST 2013


On Fri, Jan 11, 2013 at 4:31 AM, Nathan Ridge <zeratul976 at hotmail.com> wrote:
> (sorry, forgot to "Reply All")
>
> ________________________________
> From: zeratul976 at hotmail.com
> To: kparzysz at codeaurora.org
> Subject: RE: [cfe-dev] errors building clang on Ubuntu 12.04
> Date: Fri, 11 Jan 2013 02:29:58 +0000
>
>> Date: Thu, 10 Jan 2013 18:05:13 -0600
>> From: kparzysz at codeaurora.org
>> To: cfe-dev at cs.uiuc.edu
>> Subject: Re: [cfe-dev] errors building clang on Ubuntu 12.04
>
>>
>> On 1/10/2013 5:43 PM, Nathan Ridge wrote:
>> > Hi,
>> >
>> > I'm trying to build clang 3.2 on Ubuntu 12.04 (32-bit), but I'm getting
>> > the
>> > following compiler error well into the build process:
>> >
>> > In file included from
>> >
>> > /home/nr/builds/llvm-3.2-src/projects/compiler-rt/lib/enable_execute_stack.c:13:
>> > /usr/include/i386-linux-gnu/sys/mman.h:23:10: fatal error: 'features.h'
>> > file not found
>> > #include <features.h>
>> > ^
>> >
>> > I am compiling clang with GCC 4.7.2, and configuring it as follows:
>> >
>> > ../llvm-3.2-src/configure --enable-optimized
>> > --with-gcc-toolchain=/home/nr/programs/gcc/gcc-4.7.2
>> > --prefix=/home/nr/programs/clang/clang-3.2
>> >
>> > What am I doing wrong?
>> >
>>
>> On my Ubuntu box it's in /usr/include. It came with libc6-dev:
>>
>> $ dpkg -S /usr/include/features.h
>> libc6-dev: /usr/include/features.h
>
> I have a features.h in /usr/include, but I'm still getting the error...

I think this is because of --with-gcc-toolchain.  Can you try omitting
that and building with the default system compiler?

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-dev mailing list