Sounds like we need to test whether x86_64 and/or i386 build works by compiling a simple test program.<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 5, 2012 at 11:05 PM, Stephen Street <span dir="ltr"><<a href="mailto:sgs@redrocketcomputing.com" target="_blank">sgs@redrocketcomputing.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I'm getting the same type of error:<br>
<br>
COMPILE:   clang_linux/asan-i386/i386: /home/stephen/Workspace/clang-standalone-workspace/build/project/clang-standalone/bootstrap/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_mac.cc<br>
/home/stephen/Workspace/clang-standalone-workspace/build/project/clang-standalone/bootstrap/src/llvm/projects/compiler-rt/lib/asan/asan_linux.cc:24:10: fatal error:<br>
      'sys/time.h' file not found<br>
#include <sys/time.h><br>
<br>
which seems confusing as I configured my LLVM build with ./configure --enable-targets=x86_64 (I also tried this with --enable-targets=host on a Ubuntu 12.04 64 bit system) which should not have included the i386 support and thus not need the multiarch support...<br>

<br>
Any suggestion on how to constrain the compiler-rt build to x86_64 target only?<br>
<br>
Thanks!<br>
<span class="HOEnZb"><font color="#888888">Stephen<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Oct 5, 2012, at 9:37 AM, kapamaroo <<a href="mailto:kapamaroo@gmail.com">kapamaroo@gmail.com</a>> wrote:<br>
<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 should be<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>
><br>
>  COMPILE:   clang_linux/asan-i386/i386: /opt/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc<br>
> /opt/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:20:10: fatal error: 'new' file not found<br>
> #include <new><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 /usr/include/c++/4.7/new.<br>
> Trying to install libstdc++6-4.7-dev:i386 conflicts with the already installed version of the package for amd64.<br>
><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: /opt/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc<br>
> In file included from /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 not found<br>
> #include <bits/c++config.h><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 (and libraries) in order to offer multiarch<br>
> support.<br>
><br>
> The only workaround for me at the moment is to build without the changes introduced by commits r165096 and r165097<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>
><br>
>> On Fri, Oct 5, 2012 at 12:11 AM, kapamaroo <<a href="mailto:kapamaroo@gmail.com">kapamaroo@gmail.com</a>> 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 not<br>
>>> 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, same as<br>
>>> we do with full compiler_rt and<br>
>>> libprofile"<br>
>>> r165097    "Make sure 32-bit ASan runtime is available on 64-bit Linux<br>
>>> platforms"<br>
>>><br>
>>> I cannot test it with another linux distribution, so maybe it is debian<br>
>>> related or just me.<br>
>>> Maybe I need to enable multiarch support for i386. Anyone with the same<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, Дмитрий Дьяченко <<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 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<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>
<br>
</div></div></blockquote></div><br></div>