<div>Yes, it looks like you're missing system headers for 32-bit builds.</div><div>Is there any way/package you can use to get them? (probably there should be folder /usr/include/i386-linux-gnu/</div><div>as well as /usr/include/x86_64-linux-gnu).</div>
<div>In the meantime, we should think on how to test presence of necessary headers while configuring the build...</div><div><br></div><div>On Fri, Oct 5, 2012 at 12:11 AM, kapamaroo <span dir="ltr"><<a href="mailto:kapamaroo@gmail.com" target="_blank">kapamaroo@gmail.com</a>></span> wrote:</div>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I get this error in debian unstable (arch amd64).<br>
<br>
  COMPILE:   clang_linux/asan-i386/i386: /opt/llvm/projects/compiler-rt/lib/asan/asan_linux.cc<br>
In file included from /opt/llvm/projects/compiler-rt/lib/asan/asan_linux.cc:27:<br>
/usr/include/sys/syscall.h:25:10: fatal error: 'asm/unistd.h' file not found<br>
#include <asm/unistd.h><br>
         ^<br>
1 error generated.<br>
<br>
<br>
configure options:<br>
<br>
$ ../configure \<br>
  --disable-assertions \<br>
  --enable-optimized \<br>
  --disable-debug-symbols \<br>
  --disable-debug-runtime \<br>
  --enable-targets=host-only<br>
<br>
same with --enable-targets=all<br>
<br>
installed packages:<br>
<br>
linux-libc-dev    :/usr/include/x86_64-linux-gnu/asm/unistd.h<br>
libc6-dev<br>
libc6-dev-i386<br>
<br>
Build fails after the following changes<br>
<br>
r165096    "Build ASan runtime on Linux for both x86_64 and i386, same as we do with full compiler_rt and<br>
libprofile"<br>
r165097    "Make sure 32-bit ASan runtime is available on 64-bit Linux platforms"<br>
<br>
I cannot test it with another linux distribution, so maybe it is debian related or just me.<br>
Maybe I need to enable multiarch support for i386. Anyone with the same problem?<br>
<br>
Thanks,<br>
<br>
Maroudas Manolis<br>
<div class="HOEnZb"><div class="h5"><br>
> I think your build script is OK.<br>
> r165222 should fix the problem for you.<br>
><br>
> On Thu, Oct 4, 2012 at 4:15 PM, Carsten Mattner <<a href="mailto:carstenmattner@gmail.com">carstenmattner@gmail.com</a>>wrote:<br>
> > On Thu, Oct 4, 2012 at 2:10 PM, Дмитрий Дьяченко <<a href="mailto:dimhen@gmail.com">dimhen@gmail.com</a>> wrote:<br>
> > > few days ago i saw similar on Linux-x86_64<br>
> > > with slightly different err "fatal error: 'gnu/stubs-32.h' file not<br>
> ><br>
> > found"<br>
> ><br>
> > > --> after glibc-devel-i386 installation err go away<br>
> > ><br>
> > > llvm/clang were configured with --enable-targets=host<br>
> ><br>
> > Anything wrong or improvable in the way I configure and build:<br>
> > CC=gcc CXX=g++ \<br>
> ><br>
> >     ../llvm/configure \<br>
> >     --prefix=$PREFIX \<br>
> >     --libdir=$PREFIX/lib/llvm \<br>
> >     --sysconfdir=$PREFIX/etc \<br>
> >     --enable-shared \<br>
> >     --enable-targets=all \<br>
> >     --disable-expensive-checks \<br>
> >     --disable-debug-runtime \<br>
> >     --disable-assertions \<br>
> >     --with-binutils-include=/usr/include \<br>
> >     --enable-optimized<br>
> ><br>
> > Is --enable-targets=all a bad idea? I think I copied the flags from<br>
> > a distro package.<br>
> ><br>
> > After configure is done I call "make REQUIRES_RTTI=1" also inspired<br>
> > by a distro package build script.<br>
> ><br>
> > > Dmitry<br>
> > ><br>
> > > 2012/10/4 Carsten Mattner <<a href="mailto:carstenmattner@gmail.com">carstenmattner@gmail.com</a>>:<br>
> > >> Does anybody else see the following build-error on linux-386?<br>
> > >><br>
> > >>   COMPILE:   clang_linux/asan-x86_64/x86_64:<br>
> > >>     /tmp/src/llvm/llvm/projects/compiler-rt/lib/asan/asan_linux.cc<br>
> > >><br>
> > >> In file included from<br>
> > >> /tmp/src/llvm/llvm/projects/compiler-rt/lib/asan/asan_linux.cc:24:<br>
> > >> In file included from /usr/include/sys/time.h:22:<br>
> > >> In file included from /usr/include/features.h:399:<br>
> > >> /usr/include/gnu/stubs.h:10:11: fatal error: 'gnu/stubs-64.h' file not<br>
> ><br>
> > found<br>
> ><br>
> > >> # include <gnu/stubs-64.h><br>
> > >><br>
> > >>           ^<br>
> > >><br>
> > >> 1 error generated.<br>
> > >> _______________________________________________<br>
> > >> cfe-dev mailing list<br>
> > >> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> > >> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
> ><br>
> > _______________________________________________<br>
> > cfe-dev mailing list<br>
> > <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>