<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
> >> > I'm trying to build clang 3.2 on Ubuntu 12.04 (32-bit), but I'm getting<br><div>> >> > the<br>> >> > following compiler error well into the build process:<br>> >> ><br>> >> > In file included from<br>> >> ><br>> >> > /home/nr/builds/llvm-3.2-src/projects/compiler-rt/lib/enable_execute_stack.c:13:<br>> >> > /usr/include/i386-linux-gnu/sys/mman.h:23:10: fatal error: 'features.h'<br>> >> > file not found<br>> >> > #include <features.h><br>> >> > ^<br>> >> ><br>> >> > I am compiling clang with GCC 4.7.2, and configuring it as follows:<br>> >> ><br>> >> > ../llvm-3.2-src/configure --enable-optimized<br>> >> > --with-gcc-toolchain=/home/nr/programs/gcc/gcc-4.7.2<br>> >> > --prefix=/home/nr/programs/clang/clang-3.2<br>> >> ><br>> >> > What am I doing wrong?<br>> >> ><br>> >><br>> >> On my Ubuntu box it's in /usr/include. It came with libc6-dev:<br>> >><br>> >> $ dpkg -S /usr/include/features.h<br>> >> libc6-dev: /usr/include/features.h<br>> ><br>> > I have a features.h in /usr/include, but I'm still getting the error...<br>> <br>> I think this is because of --with-gcc-toolchain.  Can you try omitting<br>> that and building with the default system compiler?<br><br>I tried that, I built it with the default system compiler which is gcc 4.6.3.<br>However, I am still getting the same error.<br><br>Any other ideas?<br><br>Thanks,<br>Nate<br><br></div>                                     </div></body>
</html>