NetBSD-Users archive

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

Building -current with clang on amd64



Hello,

   I haven't built -current in a while, so I'm not sure if anything has
changed.

   This is what I did:
   1) Installed NetBSD/amd64 6.1.4
   2) Checked out netbsd -current from cvs
   3) Noticed that llvm/clang was in-tree, so no "make checkout"
   4) Set:
export MKUNPRIVED=yes
export MKLLVM=yes
export MKLIBCXX=yes
export HAVE_LLVM=yes
      (and also set build directories so that it doesn't mess up the
source tree)
   5) Run "./build.sh tools"

   This eventually fails with:
------------------------------------------
[---]
#    create  libLLVMTableGen/TableGenBackend.d
/home/jan/sysbuild/tools/bin/nbhost-mkdep -f TableGenBackend.d.tmp  --
      -I. -I/usr/src/tools/llvm-lib/libLLVMTableGen/../../ll
vm/../../external/bsd/llvm/lib/../dist/clang/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/li
b/../dist/lld/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/llvm/include
-I/usr/
src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/mclinker/include
 -I/usr/src/tools/llvm-lib/libLLV
MTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/lldb/include
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS  -D__STDC_FORM
AT_MACROS -DCLANG_ENABLE_STATIC_ANALYZER
-I/home/jan/sysbuild/obj.amd64/usr/src/tools/llvm-include
-I/home/jan/sysbuild/obj.amd64/us
r/src/tools/llvm/config/include
-I/home/jan/sysbuild/obj.amd64/usr/src/tools/llvm/config/tools/clang/include
-I/usr/src/tools/llvm-
lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../config/mclinker
 -std=c++11     /usr/src/tools/llvm-lib/libLLVMTableGe
n/../../llvm/../../external/bsd/llvm/lib/../dist/llvm/lib/TableGen/TableGenBackend.cpp
&&  mv TableGenBackend.d.tmp TableGenBackend.
d
--- TGParser.d ---
cc1plus: error: unrecognized command line option "-std=c++11"
--- TableGenBackend.d ---
cc1plus: error: unrecognized command line option "-std=c++11"
--- .depend ---
#    create  libLLVMTableGen/.depend
rm -f .depend
/home/jan/sysbuild/tools/bin/nbhost-mkdep -s .o\ .lo -d -f .depend
Error.d Main.d Record.d SetTheory.d StringMatcher.d TGLexer.d TGP
arser.d TableGenBackend.d
--- dependall ---
--- Error.lo ---
--- Main.lo ---
--- Error.lo ---
#   compile  libLLVMTableGen/Error.lo
c++ -O -O2 -fno-rtti -fno-exceptions -I.
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/clang/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/lld/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/llvm/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/mclinker/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/lldb/include
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-DCLANG_ENABLE_STATIC_ANALYZER
-I/home/jan/sysbuild/obj.amd64/usr/src/tools/llvm-include
-I/home/jan/sysbuild/obj.amd64/usr/src/tools/llvm/config/include
-I/home/jan/sysbuild/obj.amd64/usr/src/tools/llvm/config/tools/clang/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../config/mclinker
-std=c++11 -std=c++11 -c -o Error.lo.o
/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/llvm/lib/TableGen/Error.cpp
--- Main.lo ---
#   compile  libLLVMTableGen/Main.lo
c++ -O -O2 -fno-rtti -fno-exceptions -I.
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/cl
ang/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/lld/include
-I/usr/src/tools/ll
vm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llvm/lib/../dist/llvm/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../l
lvm/../../external/bsd/llvm/lib/../dist/mclinker/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/bsd/llv
m/lib/../dist/lldb/include -D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-DCLANG_ENABLE_STATIC_ANALYZER -I/h
ome/jan/sysbuild/obj.amd64/usr/src/tools/llvm-include
-I/home/jan/sysbuild/obj.amd64/usr/src/tools/llvm/config/include
-I/home/jan/s
ysbuild/obj.amd64/usr/src/tools/llvm/config/tools/clang/include
-I/usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../external/
bsd/llvm/lib/../config/mclinker -std=c++11 -std=c++11 -c -o Main.lo.o
 /usr/src/tools/llvm-lib/libLLVMTableGen/../../llvm/../../ex
ternal/bsd/llvm/lib/../dist/llvm/lib/TableGen/Main.cpp
--- Error.lo ---
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
*** [Error.lo] Error code 1
nbmake[3]: stopped in /usr/src/tools/llvm-lib/libLLVMTableGen
--- Main.lo ---
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
*** [Main.lo] Error code 1
nbmake[3]: stopped in /usr/src/tools/llvm-lib/libLLVMTableGen
[---]
------------------------------------------

   Are there additional steps needed?  It's not surprising that it
doesn't recognize -std=c++11, because it hasn't even gotten around to
building clang yet.

   Seems like it's assuming HAVE_LLVM before MKLLVM somewhere?

-- 
Kind Regards,
Jan


Home | Main Index | Thread Index | Old Index