tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

LLVM in current - broken in unwind code



Hi all,
I’m trying to build LLVM and Clang as part of a NetBSD build because I might 
want to use it for some research. My immediate goal is to have a working (and 
modifiable) LLVM and I don’t really care whether or not I can build NetBSD with 
Clang. I’m not using pkgsrc for Clang because I want to be able to easily mess 
with the LLVM and Clang source code.

If I try to build a release with MKLLVM=yes and HAVE_LLVM=yes then libunwind 
fails because the cassert header file is missing. 

I also tried building with just MKLLVM=yes, and libunwind fails because it then 
tries using G++ header files which don’t do it any good at all. I realise that 
using MKLLVM=yes without HAVE_LLVM=yes is an unusual way of doing things, so it 
might not have been implemented and I’m not going to get too worried if this is 
hard to fix.

Running find shows me that cassert is in 
src/external/bsd/libc++/dist/libcxx/include/cassert as well as a few other 
places that are obviously all part of GCC. The GCC copy of cassert has been 
installed in DESTDIR, but not the LLVM one. 

I reran the failed command with "x86_64--netbsd-clang-cpp -v” instead of 
"nbmkdep … --” and I see that cassert should probably be installed in 
DESTDIR/usr/include/c++, but which Makefile should install it?

Cheers,
Lloyd

FYI this is the command that fails when building.

#    create  libc/libunwind.d
CC=/Users/lloyd/scratch/build/tools/bin/x86_64--netbsd-clang++ 
/Users/lloyd/scratch/build/tools/bin/nbmkdep -f libunwind.d.tmp  --      
--sysroot=/Users/lloyd/scratch/build/destdir.amd64 -D_LIBC -DLIBC_SCCS 
-DSYSLIBC_SCCS -D_REENTRANT -D_DIAGNOSTIC -DMLIBDIR=\"\" -DHESIOD -DINET6 -DNLS 
-DYP -I/Volumes/build/src/lib/libc/include -I/Volumes/build/src/lib/libc 
-I/Volumes/build/src/sys -I/Volumes/build/src/lib/libc/compat/../locale 
-I/Volumes/build/src/lib/libc/compat/stdlib 
-I/Volumes/build/src/lib/libc/compat/../stdlib -D__BUILD_LEGACY 
-I/Volumes/build/src/lib/libc/../../common/lib/libc/quad 
-I/Volumes/build/src/lib/libc/../../common/lib/libc/string 
-I/Volumes/build/src/lib/libc/../../common/lib/libc/arch/x86_64/string 
-D__DBINTERFACE_PRIVATE -I/Volumes/build/src/libexec/ld.elf_so 
-I/Volumes/build/src/lib/libc/dlfcn -I/Volumes/build/src/lib/libc/gdtoa 
-I/Volumes/build/src/lib/libc/locale -DNO_FENV_H 
-I/Volumes/build/src/lib/libc/arch/x86_64/gdtoa -DWITH_RUNE 
-I/Volumes/build/src/lib/libc -DPOSIX_MISTAKE -DCOMPAT__RES -DUSE_POLL 
-DPORTMAP -DWIDE_DOUBLE -DALL_STATE -DUSG_COMPAT  -D_FORTIFY_SOURCE=2 
-funwind-tables -fno-rtti -fno-exceptions -fvisibility=hidden 
-Wno-old-style-cast    /Volumes/build/src/sys/lib/libunwind/libunwind.cxx &&  
mv libunwind.d.tmp libunwind.d
In file included from /Volumes/build/src/sys/lib/libunwind/libunwind.cxx:16:
In file included from /Volumes/build/src/sys/lib/libunwind/UnwindCursor.hpp:19:
/Volumes/build/src/sys/lib/libunwind/AddressSpace.hpp:17:10: fatal error: 
'cassert' file not found
#include <cassert>
         ^
1 error generated.
nbmkdep: compile failed.




Home | Main Index | Thread Index | Old Index