<br><br><div class="gmail_quote">On Tue, Oct 9, 2012 at 3:45 AM, kapamaroo <span dir="ltr"><<a href="mailto:kapamaroo@gmail.com" target="_blank">kapamaroo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> Could you test if CMake build of LLVM (<a href="http://llvm.org/docs/CMake.html" target="_blank">http://llvm.org/docs/CMake.html</a>)<br>
> would work on your platform?<br>
> You'd need to install cmake 2.8.8 and follow the build instructions.<br>
><br>
> $ mkdir mybuilddir<br>
> $ cd mybuilddir<br>
> $ cmake path/to/llvm/source/root<br>
> $ make<br>
><br>
> I'm specifically interested in the contents<br>
> of mybuilddir/lib/clang/3.2/lib/linux<br>
<br>
</div>Yes, CMake build completes without errors for me, no need for i386 headers :)<br></blockquote><div><br></div><div>Thanks for this test! I've submitted some checks to compiler-rt build system.</div><div>Could you check if configure+make build doesn't attempt to build 32-bit libraries on your systems now (r165504 or later)?</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
$ cmake --version<br>
cmake version 2.8.9<br>
<br>
$ ls -1 lib/clang/3.2/lib/linux/<br>
libclang_rt.asan-x86_64.a<br>
libclang_rt.tsan-x86_64.a<br>
libclang_rt.x86_64.a<br>
<br>
$ ./bin/clang -v<br>
clang version 3.2 (trunk 165441)<br>
Target: x86_64-unknown-linux-gnu<br>
Thread model: posix<br>
<div><div class="h5"><br>
<br>
> > On Fri, Oct 5, 2012 at 11:05 PM, Stephen Street <<br>
> ><br>
> > <a href="mailto:sgs@redrocketcomputing.com">sgs@redrocketcomputing.com</a>> wrote:<br>
> >> Hello,<br>
> >><br>
> >> I'm getting the same type of error:<br>
> >><br>
> >> COMPILE:   clang_linux/asan-i386/i386:<br>
> >> /home/stephen/Workspace/clang-standalone-workspace/build/project/clang-s<br>
> >> tandalone/bootstrap/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_m<br>
> >> ac.cc<br>
> >> /home/stephen/Workspace/clang-standalone-workspace/build/project/clang-<br>
> >> standalone/bootstrap/src/llvm/projects/compiler-rt/lib/asan/asan_linux.c<br>
> >> c:24:10:<br>
> >><br>
> >> fatal error:<br>
> >>       'sys/time.h' file not found<br>
> >><br>
> >> #include <sys/time.h><br>
> >><br>
> >> which seems confusing as I configured my LLVM build with ./configure<br>
> >> --enable-targets=x86_64 (I also tried this with --enable-targets=host on<br>
> >> a Ubuntu 12.04 64 bit system) which should not have included the i386<br>
> >> support and thus not need the multiarch support...<br>
> >><br>
> >> Any suggestion on how to constrain the compiler-rt build to x86_64<br>
> >> target only?<br>
> >><br>
> >> Thanks!<br>
> >> Stephen<br>
> >><br>
> >> On Oct 5, 2012, at 9:37 AM, kapamaroo <<a href="mailto:kapamaroo@gmail.com">kapamaroo@gmail.com</a>> wrote:<br>
> >> >> Yes, it looks like you're missing system headers for 32-bit builds.<br>
> >> >> Is there any way/package you can use to get them? (probably there<br>
> >><br>
> >> should be<br>
> >><br>
> >> >> folder /usr/include/i386-linux-gnu/<br>
> >> >> as well as /usr/include/x86_64-linux-gnu).<br>
> >> >> In the meantime, we should think on how to test presence of necessary<br>
> >> >> headers while configuring the build...<br>
> >> ><br>
> >> > I installed this package through multiarch<br>
> >> ><br>
> >> > linux-libc-dev:i386    :/usr/include/i386-linux-gnu/asm/unistd.h<br>
> >> ><br>
> >> > and now I get this error:<br>
> >> >  COMPILE:   clang_linux/asan-i386/i386:<br>
> >> /opt/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc<br>
> >><br>
> >> > /opt/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:20:10:<br>
> >> > fatal<br>
> >><br>
> >> error: 'new' file not found<br>
> >><br>
> >> > #include <new><br>
> >> ><br>
> >> >         ^<br>
> >> ><br>
> >> > 1 error generated.<br>
> >> ><br>
> >> ><br>
> >> ><br>
> >> > Searching for 'new' I get the following results:<br>
> >> ><br>
> >> > $ mlocate new |grep /usr/include |grep new$<br>
> >> > /usr/include/boost/tr1/tr1/new<br>
> >> > /usr/include/c++/4.6/new<br>
> >> > /usr/include/c++/4.7/new<br>
> >> ><br>
> >> > I have libstdc++6-4.7-dev installed on my system which provides<br>
> >><br>
> >> /usr/include/c++/4.7/new.<br>
> >><br>
> >> > Trying to install libstdc++6-4.7-dev:i386 conflicts with the already<br>
> >><br>
> >> installed version of the package for amd64.<br>
> >><br>
> >> > If I change the previous line to<br>
> >> ><br>
> >> > #include <c++/4.7/new><br>
> >> ><br>
> >> > I get<br>
> >> ><br>
> >> >  COMPILE:   clang_linux/asan-i386/i386:<br>
> >> /opt/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc<br>
> >><br>
> >> > In file included from<br>
> >><br>
> >> /opt/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:21:<br>
> >> > /usr/include/c++/4.7/new:40:10: fatal error: 'bits/c++config.h' file<br>
> >><br>
> >> not found<br>
> >><br>
> >> > #include <bits/c++config.h><br>
> >> ><br>
> >> >         ^<br>
> >> ><br>
> >> > 1 error generated.<br>
> >> ><br>
> >> ><br>
> >> > yet another search this time for 'bits/c++config.h' returns:<br>
> >> ><br>
> >> > $ mlocate bits/c++config.h<br>
> >> > /usr/include/c++/4.6/x86_64-linux-gnu/32/bits/c++config.h<br>
> >> > /usr/include/c++/4.6/x86_64-linux-gnu/bits/c++config.h<br>
> >> > /usr/include/c++/4.7/x86_64-linux-gnu/32/bits/c++config.h<br>
> >> > /usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h<br>
> >> ><br>
> >> ><br>
> >> > I think this has to do with the debian way of installing header files<br>
> >><br>
> >> (and libraries) in order to offer multiarch<br>
> >><br>
> >> > support.<br>
> >> ><br>
> >> > The only workaround for me at the moment is to build without the<br>
> >><br>
> >> changes introduced by commits r165096 and r165097<br>
> >><br>
> >> > which is something I am trying to avoid.<br>
> >> ><br>
> >> > Any help would be appreciated.<br>
> >> ><br>
> >> > Thanks,<br>
> >> ><br>
> >> > Maroudas Manolis<br>
> >> ><br>
> >> >> On Fri, Oct 5, 2012 at 12:11 AM, kapamaroo <<a href="mailto:kapamaroo@gmail.com">kapamaroo@gmail.com</a>><br>
> >><br>
> >> wrote:<br>
> >> >>> Hello,<br>
> >> >>><br>
> >> >>> I get this error in debian unstable (arch amd64).<br>
> >> >>><br>
> >> >>>  COMPILE:   clang_linux/asan-i386/i386:<br>
> >> >>> /opt/llvm/projects/compiler-rt/lib/asan/asan_linux.cc<br>
> >> >>> In file included from<br>
> >> >>> /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<br>
> >> >>> not found<br>
> >> >>> #include <asm/unistd.h><br>
> >> >>><br>
> >> >>>         ^<br>
> >> >>><br>
> >> >>> 1 error generated.<br>
> >> >>><br>
> >> >>><br>
> >> >>> configure options:<br>
> >> >>><br>
> >> >>> $ ../configure \<br>
> >> >>><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,<br>
> >><br>
> >> same as<br>
> >><br>
> >> >>> we do with full compiler_rt and<br>
> >> >>> libprofile"<br>
> >> >>> r165097    "Make sure 32-bit ASan runtime is available on 64-bit<br>
> >> >>> Linux platforms"<br>
> >> >>><br>
> >> >>> I cannot test it with another linux distribution, so maybe it is<br>
> >><br>
> >> debian<br>
> >><br>
> >> >>> related or just me.<br>
> >> >>> Maybe I need to enable multiarch support for i386. Anyone with the<br>
> >><br>
> >> same<br>
> >><br>
> >> >>> problem?<br>
> >> >>><br>
> >> >>> Thanks,<br>
> >> >>><br>
> >> >>> Maroudas Manolis<br>
> >> >>><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 <<br>
> >> >>><br>
> >> >>> <a href="mailto:carstenmattner@gmail.com">carstenmattner@gmail.com</a>>wrote:<br>
> >> >>>>> On Thu, Oct 4, 2012 at 2:10 PM, Дмитрий Дьяченко<br>
> >> >>>>> <<a href="mailto:dimhen@gmail.com">dimhen@gmail.com</a>><br>
> >> >>><br>
> >> >>> wrote:<br>
> >> >>>>>> few days ago i saw similar on Linux-x86_64<br>
> >> >>>>>> with slightly different err "fatal error: 'gnu/stubs-32.h' file<br>
> >> >>>>>> 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<br>
> >> >>>>> from a distro package.<br>
> >> >>>>><br>
> >> >>>>> After configure is done I call "make REQUIRES_RTTI=1" also<br>
> >> >>>>> inspired 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.c<br>
> >> >>>>>>>    c<br>
> >> >>>>>>><br>
> >> >>>>>>> In file included from<br>
> >> >>>>>>> /tmp/src/llvm/llvm/projects/compiler-rt/lib/asan/asan_linux.cc:2<br>
</div></div>> >> >>>>>>> 4: In file included from /usr/include/sys/time.h:22:<br>
<div class="HOEnZb"><div class="h5">> >> >>>>>>> In file included from /usr/include/features.h:399:<br>
> >> >>>>>>> /usr/include/gnu/stubs.h:10:11: fatal error: 'gnu/stubs-64.h'<br>
> >> >>>>>>> file<br>
> >> >>><br>
> >> >>> 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>
> >> ><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>