Hi Kenton, Thanks very much and I appreciate your comments! I tried again and again but unfortunately still couldn't make capnproto built by clang.3.5... the information is as follows:
luckyboy@cse-322osu10:capnproto-c++-0.6.0$ *./configure CXX=clang++ CXXFLAGS=-g* checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether UID '1001' is supported by ustar format... yes checking whether GID '1001' is supported by ustar format... yes checking how to create a ustar tar archive... gnutar checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking whether we are using the GNU C++ compiler... yes checking whether clang++ accepts -g... yes checking dependency style of clang++... gcc3 checking whether clang++ supports C++11 features by default... no checking whether clang++ supports C++11 features with -std=gnu++11... yes checking whether clang++ -std=gnu++11 supports C++11 library features by default... yes checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking whether to check for GCC pthread/shared inconsistencies... yes checking whether -pthread is sufficient with -shared... yes checking whether pthread flag is sufficient with -nostdlib... no checking whether adding -lpthread fixes that... yes checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/local/bin/ld checking if the linker (/usr/local/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/local/bin/nm -B checking the name lister (/usr/local/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/local/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/local/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking how to run the C++ preprocessor... clang++ -std=gnu++11 -E checking for ld used by clang++ -std=gnu++11... /usr/local/bin/ld -m elf_x86_64 checking if the linker (/usr/local/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the clang++ -std=gnu++11 linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes checking for clang++ -std=gnu++11 option to produce PIC... -fPIC -DPIC checking if clang++ -std=gnu++11 PIC flag -fPIC -DPIC works... yes checking if clang++ -std=gnu++11 static flag -static works... yes checking if clang++ -std=gnu++11 supports -c -o file.o... yes checking if clang++ -std=gnu++11 supports -c -o file.o... (cached) yes checking whether the clang++ -std=gnu++11 linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for library containing sched_yield... none required checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating capnp.pc config.status: creating capnp-rpc.pc config.status: creating capnp-json.pc config.status: creating kj.pc config.status: creating kj-async.pc config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands Here is the error during compilation: luckyboy@cse-322osu10:capnproto-c++-0.6.0$ *make* depbase=`echo src/capnp/compiler/module-loader.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ clang++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR='"/usr/local/include"' -pthread -g -pthread -MT src/capnp/compiler/module-loader.o -MD -MP -MF $depbase.Tpo -c -o src/capnp/compiler/module-loader.o src/capnp/compiler/module-loader.c++ &&\ mv -f $depbase.Tpo $depbase.Po clang: ASTContext.cpp:3040: clang::QualType clang::ASTContext::getSubstTemplateTypeParmType(const clang::TemplateTypeParmType *, clang::QualType) const: Assertion `Replacement.isCanonical() && "replacement types must always be canonical"' failed. 0 clang 0x000000000288d535 llvm::sys::PrintStackTrace(_IO_FILE*) + 37 1 clang 0x000000000288de33 2 libpthread.so.0 0x00002b7638bf3330 3 libc.so.6 0x00002b7639a84c37 gsignal + 55 4 libc.so.6 0x00002b7639a88028 abort + 328 5 libc.so.6 0x00002b7639a7dbf6 6 libc.so.6 0x00002b7639a7dca2 7 clang 0x000000000151ab1d 8 clang 0x0000000000f76ca2 9 clang 0x0000000000f740d4 10 clang 0x0000000000f8782e 11 clang 0x0000000000f8907c 12 clang 0x0000000000f8872a 13 clang 0x0000000000f84218 14 clang 0x0000000000f771d9 15 clang 0x0000000000f740d4 16 clang 0x0000000000f7a797 clang::Sema::SubstType(clang::QualType, clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation, clang::DeclarationName) + 135 17 clang 0x0000000000ee3583 clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation, clang::TemplateArgumentListInfo&) + 1843 18 clang 0x0000000000ee4f65 clang::Sema::ActOnTemplateIdType(clang::CXXScopeSpec&, clang::SourceLocation, clang::OpaquePtr<clang::TemplateName>, clang::SourceLocation, clang::SourceLocation, llvm::MutableArrayRef<clang::ParsedTemplateArgument>, clang::SourceLocation, bool) + 677 19 clang 0x0000000000b68fa3 clang::Parser::AnnotateTemplateIdTokenAsType() + 131 20 clang 0x0000000000af5132 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 2690 21 clang 0x0000000000aeb6d2 clang::Parser::ParseSpecifierQualifierList(clang::DeclSpec&, clang::AccessSpecifier, clang::Parser::DeclSpecContext) + 66 22 clang 0x0000000000aeb353 clang::Parser::ParseTypeName(clang::SourceRange*, clang::Declarator::TheContext, clang::AccessSpecifier, clang::Decl**, clang::ParsedAttributes*) + 307 23 clang 0x0000000000b0664a clang::Parser::ParseFunctionDeclarator(clang::Declarator&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&, bool, bool) + 2218 24 clang 0x0000000000b03d7e clang::Parser::ParseDirectDeclarator(clang::Declarator&) + 2686 25 clang 0x0000000000b02a43 clang::Parser::ParseDeclaratorInternal(clang::Declarator&, void (clang::Parser::*)(clang::Declarator&)) + 1939 26 clang 0x0000000000b64a3f clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 1711 27 clang 0x0000000000b64037 clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 1015 28 clang 0x0000000000b63a30 clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 288 29 clang 0x0000000000af4228 clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 872 30 clang 0x0000000000ae42db clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 1755 31 clang 0x0000000000b0b149 clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 313 32 clang 0x0000000000b0aa11 clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, clang::SourceLocation) + 5921 33 clang 0x0000000000af4069 clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 425 34 clang 0x0000000000ae42db clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 1755 35 clang 0x0000000000b0b149 clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 313 36 clang 0x0000000000b0aa11 clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, clang::SourceLocation) + 5921 37 clang 0x0000000000af4069 clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 425 38 clang 0x0000000000ae42db clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 1755 39 clang 0x0000000000ae3b06 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 502 40 clang 0x0000000000adf816 clang::ParseAST(clang::Sema&, bool, bool) + 406 41 clang 0x0000000000708bde clang::FrontendAction::Execute() + 62 42 clang 0x00000000006dd513 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 851 43 clang 0x00000000006bfe70 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3104 44 clang 0x00000000006b7029 cc1_main(char const**, char const**, char const*, void*) + 665 45 clang 0x00000000006bdb16 main + 9158 46 libc.so.6 0x00002b7639a6ff45 __libc_start_main + 245 47 clang 0x00000000006b6cc9 Stack dump: 0. Program arguments: /usr/local/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name module-loader.c++ -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.24 -g -dwarf-column-info -coverage-file /home/sxl463/working/capnproto/capnproto-c++-0.6.0/src/capnp/compiler/module-loader.o -resource-dir /usr/local/bin/../lib/clang/3.5.0 -dependency-file src/capnp/compiler/.deps/module-loader.Tpo -sys-header-deps -MP -MT src/capnp/compiler/module-loader.o -D HAVE_CONFIG_H -D KJ_HEADER_WARNINGS -D CAPNP_HEADER_WARNINGS -D CAPNP_INCLUDE_DIR="/usr/local/include" -I . -I ./src -I ./src -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward -internal-isystem /usr/local/include -internal-isystem /usr/local/bin/../lib/clang/3.5.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -std=gnu++11 -fdeprecated-macro -fdebug-compilation-dir /home/sxl463/working/capnproto/capnproto-c++-0.6.0 -ferror-limit 19 -fmessage-length 134 -pthread -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o src/capnp/compiler/module-loader.o -x c++ src/capnp/compiler/module-loader.c++ 1. ./src/kj/parse/../tuple.h:271:8: at annotation token 2. ./src/kj/parse/../tuple.h:47:1: parsing namespace 'kj' 3. ./src/kj/parse/../tuple.h:48:1: parsing namespace '_' clang: error: unable to execute command: Aborted (core dumped) clang: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.5.0 (tags/RELEASE_350/final) Target: x86_64-unknown-linux-gnu Thread model: posix clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /tmp/module-loader-b9f855.cpp clang: note: diagnostic msg: /tmp/module-loader-b9f855.sh clang: note: diagnostic msg: ******************** make: *** [src/capnp/compiler/module-loader.o] Error 254 I tried this on both 0.5.3.1 and 0.6.0, neither can be compiled. Did you have similar experience before? Best LuckyBoy On Thursday, May 25, 2017 at 7:52:40 PM UTC-4, Kenton Varda wrote: > > Hi, > > Clang 3.5 should be OK. > > In the build log you gave, the "-std=gnu++1y" flag is not being passed to > the compiler, which explains the errors that follow. > > One reason this could happen is if you are building from source and you > are using an older version of libtool. libtool is known to drop flags from > CXXFLAGS if it doesn't recognize them, and perhaps it doesn't recognize > "-std=gnu++1y". Note that normally the configure script automatically > detects which -std= flag to use and automatically works around this bug in > libtool, however since you specified -std= manually in your CXXFLAGS, > you've disabled the auto-detection. > > I suggest starting over and letting the autodetection do its thing: > > make distclean > ./configure CXX=clang++ CXXFLAGS=-g > > Or if you really want to enable C++14 (even though Cap'n Proto doesn't use > it), put it in CXX to work around libtool: > > make distclean > ./configure CXX="clang++ -std=gnu++1y" CXXFLAGS=-g > > BTW, I see you are using 0.5.3.1, but note that the current version is > 0.6.0. > > -Kenton > > On Thu, May 25, 2017 at 12:14 PM, Lucky Boy <[email protected] > <javascript:>> wrote: > >> Hi everyone, >> >> I am a beginner on Cap'n Proto and I would like to ask a build question. >> I am using Clang 3.5.0 to build Cap'n Proto but failed. What I did for >> build was >> >> ./configure CXX=clang++ CXXFLAGS='-std=gnu++1y -g' >> >> make >> >> and the build error is as follows: >> >> >> luckyboy@cse-322osu10:capnproto-c++-0.5.3.1$ make >> depbase=`echo src/capnp/compiler/module-loader.o | sed >> 's|[^/]*$|.deps/&|;s|\.o$||'`;\ >> clang++ -stdlib=libc++ -DHAVE_CONFIG_H -I. -I./src -I./src >> -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS >> -DCAPNP_INCLUDE_DIR='"/usr/local/include"' -pthread -g -pthread -MT >> src/capnp/compiler/module-loader.o -MD -MP -MF $depbase.Tpo -c -o >> src/capnp/compiler/module-loader.o src/capnp/compiler/module-loader.c++ &&\ >> mv -f $depbase.Tpo $depbase.Po >> In file included from src/capnp/compiler/module-loader.c++:22: >> In file included from src/capnp/compiler/module-loader.h:29: >> In file included from src/capnp/compiler/compiler.h:29: >> In file included from ./src/capnp/compiler/grammar.capnp.h:7: >> In file included from ./src/capnp/generated-header-support.h:31: >> In file included from ./src/capnp/layout.h:36: >> ./src/kj/common.h:35:4: error: "This code requires C++11. Either your >> compiler does not support it or it is not enabled." >> #error "This code requires C++11. Either your compiler does not support >> it or it is not enabled." >> ^ >> ./src/kj/common.h:38:6: error: "Pass -std=c++11 on the compiler command >> line to enable C++11." >> #error "Pass -std=c++11 on the compiler command line to enable C++11." >> ^ >> ./src/kj/common.h:289:39: warning: alias declarations are a C++11 >> extension [-Wc++11-extensions] >> template <typename T> using NoInfer = typename NoInfer_<T>::Type; >> ^ >> ./src/kj/common.h:295:43: warning: alias declarations are a C++11 >> extension [-Wc++11-extensions] >> template <typename T> using RemoveConst = typename RemoveConst_<T>::Type; >> ^ >> ./src/kj/common.h:297:56: error: unknown type name 'constexpr' >> template <typename> struct IsLvalueReference_ { static constexpr bool >> value = false; }; >> ^ >> ./src/kj/common.h:297:66: error: expected member name or ';' after >> declaration specifiers >> template <typename> struct IsLvalueReference_ { static constexpr bool >> value = false; }; >> ~~~~~~~~~~~~~~~~ ^ >> ./src/kj/common.h:298:62: error: unknown type name 'constexpr' >> template <typename T> struct IsLvalueReference_<T&> { static constexpr >> bool value = true; }; >> ^ >> ./src/kj/common.h:298:72: error: expected member name or ';' after >> declaration specifiers >> template <typename T> struct IsLvalueReference_<T&> { static constexpr >> bool value = true; }; >> ~~~~~~~~~~~~~~~~ ^ >> ./src/kj/common.h:300:8: error: unknown type name 'constexpr' >> inline constexpr bool isLvalueReference() { return >> IsLvalueReference_<T>::value; } >> ^ >> ./src/kj/common.h:300:18: error: expected unqualified-id >> inline constexpr bool isLvalueReference() { return >> IsLvalueReference_<T>::value; } >> ^ >> ./src/kj/common.h:303:30: error: explicit specialization of non-template >> struct 'Decay_' >> template <typename T> struct Decay_<T&> { typedef typename >> Decay_<T>::Type Type; }; >> ^ ~~~~ >> ./src/kj/common.h:303:71: error: no type named 'Type' in 'Decay_<T>' >> template <typename T> struct Decay_<T&> { typedef typename >> Decay_<T>::Type Type; }; >> ~~~~~~~~~~~~~~~~~~~~^~~~ >> ./src/kj/common.h:304:38: warning: rvalue references are a C++11 >> extension [-Wc++11-extensions] >> template <typename T> struct Decay_<T&&> { typedef typename >> Decay_<T>::Type Type; }; >> ^ >> ./src/kj/common.h:311:37: warning: alias declarations are a C++11 >> extension [-Wc++11-extensions] >> template <typename T> using Decay = typename Decay_<T>::Type; >> ^ >> ./src/kj/common.h:315:36: warning: alias declarations are a C++11 >> extension [-Wc++11-extensions] >> template <bool b> using EnableIf = typename EnableIf_<b>::Type; >> ^ >> ./src/kj/common.h:322:13: error: expected ';' at end of declaration >> T instance() noexcept; >> ^ >> ; >> ./src/kj/common.h:322:14: error: C++ requires a type specifier for all >> declarations >> T instance() noexcept; >> ^~~~~~~~ >> ./src/kj/common.h:343:25: warning: defaulted function definitions are a >> C++11 extension [-Wc++11-extensions] >> DisallowConstCopy() = default; >> ^ >> ./src/kj/common.h:345:38: warning: rvalue references are a C++11 >> extension [-Wc++11-extensions] >> DisallowConstCopy(DisallowConstCopy&&) = default; >> ^ >> ./src/kj/common.h:345:44: warning: defaulted function definitions are a >> C++11 extension [-Wc++11-extensions] >> DisallowConstCopy(DisallowConstCopy&&) = default; >> ^ >> ./src/kj/common.h:347:49: warning: rvalue references are a C++11 >> extension [-Wc++11-extensions] >> DisallowConstCopy& operator=(DisallowConstCopy&&) = default; >> ^ >> ./src/kj/common.h:347:55: warning: defaulted function definitions are a >> C++11 extension [-Wc++11-extensions] >> DisallowConstCopy& operator=(DisallowConstCopy&&) = default; >> ^ >> ./src/kj/common.h:351:67: warning: defaulted function definitions are a >> C++11 extension [-Wc++11-extensions] >> inline DisallowConstCopy::DisallowConstCopy(DisallowConstCopy&) = default; >> ^ >> ./src/kj/common.h:352:78: warning: defaulted function definitions are a >> C++11 extension [-Wc++11-extensions] >> inline DisallowConstCopy& >> DisallowConstCopy::operator=(DisallowConstCopy&) = default; >> >> ^ >> ./src/kj/common.h:364:48: error: unknown type name 'constexpr' >> template <typename T> struct IsConst_ { static constexpr bool value = >> false; }; >> ^ >> ./src/kj/common.h:364:58: error: expected member name or ';' after >> declaration specifiers >> template <typename T> struct IsConst_ { static constexpr bool value = >> false; }; >> ~~~~~~~~~~~~~~~~ ^ >> ./src/kj/common.h:365:57: error: unknown type name 'constexpr' >> template <typename T> struct IsConst_<const T> { static constexpr bool >> value = true; }; >> ^ >> ./src/kj/common.h:365:67: error: expected member name or ';' after >> declaration specifiers >> template <typename T> struct IsConst_<const T> { static constexpr bool >> value = true; }; >> ~~~~~~~~~~~~~~~~ ^ >> ./src/kj/common.h:366:23: error: unknown type name 'constexpr' >> template <typename T> constexpr bool isConst() { return >> IsConst_<T>::value; } >> ^ >> ./src/kj/common.h:366:33: error: expected unqualified-id >> template <typename T> constexpr bool isConst() { return >> IsConst_<T>::value; } >> ^ >> ./src/kj/common.h:369:30: error: explicit specialization of non-template >> struct 'EnableIfNotConst_' >> template <typename T> struct EnableIfNotConst_<const T>; >> ^ ~~~~~~~~~ >> ./src/kj/common.h:370:48: warning: alias declarations are a C++11 >> extension [-Wc++11-extensions] >> template <typename T> using EnableIfNotConst = typename >> EnableIfNotConst_<T>::Type; >> ^ >> ./src/kj/common.h:374:45: warning: alias declarations are a C++11 >> extension [-Wc++11-extensions] >> template <typename T> using EnableIfConst = typename >> EnableIfConst_<T>::Type; >> ^ >> ./src/kj/common.h:378:52: warning: alias declarations are a C++11 >> extension [-Wc++11-extensions] >> template <typename T> using RemoveConstOrDisable = typename >> RemoveConstOrDisable_<T>::Type; >> ^ >> fatal error: too many errors emitted, stopping now [-ferror-limit=] >> clang: >> /home/sxl463/working/softboundcets-3.5.0/softboundcets-llvm-3.5.0/include/llvm/Support/Casting.h:95: >> >> static bool llvm::isa_impl_cl<clang::FunctionDecl, const clang::DeclContext >> *>::doit(const From *) [To = clang::FunctionDecl, From = const >> clang::DeclContext *]: Assertion `Val && "isa<> used on a null pointer"' >> failed. >> 0 clang 0x000000000288d535 >> llvm::sys::PrintStackTrace(_IO_FILE*) + 37 >> 1 clang 0x000000000288de33 >> 2 libpthread.so.0 0x00002b42dfb1c330 >> 3 libc.so.6 0x00002b42e09adc37 gsignal + 55 >> 4 libc.so.6 0x00002b42e09b1028 abort + 328 >> 5 libc.so.6 0x00002b42e09a6bf6 >> 6 libc.so.6 0x00002b42e09a6ca2 >> 7 clang 0x0000000000c60e1b >> clang::Sema::FinalizeDeclaration(clang::Decl*) + 3307 >> 8 clang 0x0000000000b17115 >> clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier, >> clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&, >> clang::ParsingDeclRAIIObject*) + 6069 >> 9 clang 0x0000000000b136eb >> clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, >> clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned >> int, clang::Decl*) + 2491 >> 10 clang 0x0000000000b11f47 >> clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, >> clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo >> const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, >> clang::Parser::ParsedAttributesWithRange&) + 8231 >> 11 clang 0x0000000000af51f8 >> clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, >> clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, >> clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 2888 >> 12 clang 0x0000000000b645ec >> clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int, >> clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&, >> clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 604 >> 13 clang 0x0000000000b64037 >> clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int, >> clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + >> 1015 >> 14 clang 0x0000000000b63a30 >> clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int, >> clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 288 >> 15 clang 0x0000000000af4228 >> clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, >> unsigned int, clang::SourceLocation&, >> clang::Parser::ParsedAttributesWithRange&) + 872 >> 16 clang 0x0000000000ae42db >> clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, >> >> clang::ParsingDeclSpec*) + 1755 >> 17 clang 0x0000000000b0b149 >> clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation, >> std::allocator<clang::SourceLocation> >&, >> std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> >> >&, std::vector<clang::SourceLocation, >> std::allocator<clang::SourceLocation> >&, unsigned int, >> clang::SourceLocation&, clang::ParsedAttributes&, >> clang::BalancedDelimiterTracker&) + 313 >> 18 clang 0x0000000000b0aa11 >> clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, >> clang::SourceLocation) + 5921 >> 19 clang 0x0000000000af4069 >> clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, >> unsigned int, clang::SourceLocation&, >> clang::Parser::ParsedAttributesWithRange&) + 425 >> 20 clang 0x0000000000ae42db >> clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, >> >> clang::ParsingDeclSpec*) + 1755 >> 21 clang 0x0000000000b0b149 >> clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation, >> std::allocator<clang::SourceLocation> >&, >> std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> >> >&, std::vector<clang::SourceLocation, >> std::allocator<clang::SourceLocation> >&, unsigned int, >> clang::SourceLocation&, clang::ParsedAttributes&, >> clang::BalancedDelimiterTracker&) + 313 >> 22 clang 0x0000000000b0aa11 >> clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, >> clang::SourceLocation) + 5921 >> 23 clang 0x0000000000af4069 >> clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, >> unsigned int, clang::SourceLocation&, >> clang::Parser::ParsedAttributesWithRange&) + 425 >> 24 clang 0x0000000000ae42db >> clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, >> >> clang::ParsingDeclSpec*) + 1755 >> 25 clang 0x0000000000ae3b06 >> clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + >> 502 >> 26 clang 0x0000000000adf816 clang::ParseAST(clang::Sema&, bool, >> bool) + 406 >> 27 clang 0x0000000000708bde clang::FrontendAction::Execute() + >> 62 >> 28 clang 0x00000000006dd513 >> clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 851 >> 29 clang 0x00000000006bfe70 >> clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3104 >> 30 clang 0x00000000006b7029 cc1_main(char const**, char >> const**, char const*, void*) + 665 >> 31 clang 0x00000000006bdb16 main + 9158 >> 32 libc.so.6 0x00002b42e0998f45 __libc_start_main + 245 >> 33 clang 0x00000000006b6cc9 >> Stack dump: >> 0. Program arguments: /usr/local/bin/clang -cc1 -triple >> x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free >> -main-file-name module-loader.c++ -mrelocation-model static >> -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases >> -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version >> 2.24 -g -dwarf-column-info -coverage-file >> /home/sxl463/working/capnproto/capnproto-c++- >> 0.5.3.1/src/capnp/compiler/module-loader.o -resource-dir >> /usr/local/bin/../lib/clang/3.5.0 -dependency-file >> src/capnp/compiler/.deps/module-loader.Tpo -sys-header-deps -MP -MT >> src/capnp/compiler/module-loader.o -D HAVE_CONFIG_H -D KJ_HEADER_WARNINGS >> -D CAPNP_HEADER_WARNINGS -D CAPNP_INCLUDE_DIR="/usr/local/include" -I . -I >> ./src -I ./src -internal-isystem /usr/local/bin/../include/c++/v1 >> -internal-isystem /usr/local/include -internal-isystem >> /usr/local/bin/../lib/clang/3.5.0/include -internal-externc-isystem >> /usr/include/x86_64-linux-gnu -internal-externc-isystem /include >> -internal-externc-isystem /usr/include -fdeprecated-macro >> -fdebug-compilation-dir >> /home/sxl463/working/capnproto/capnproto-c++-0.5.3.1 -ferror-limit 19 >> -fmessage-length 134 -pthread -mstackrealign -fobjc-runtime=gcc >> -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o >> src/capnp/compiler/module-loader.o -x c++ >> src/capnp/compiler/module-loader.c++ >> 1. ./src/capnp/generated-header-support.h:262:40: current parser token >> 'const' >> 2. ./src/capnp/generated-header-support.h:39:1: parsing namespace 'capnp' >> 3. ./src/capnp/generated-header-support.h:48:1: parsing namespace '_' >> 4. ./src/capnp/generated-header-support.h:260:1: parsing >> struct/union/class body 'ChooseBrand' >> clang: error: unable to execute command: Aborted (core dumped) >> clang: error: clang frontend command failed due to signal (use -v to see >> invocation) >> clang version 3.5.0 (tags/RELEASE_350/final) >> Target: x86_64-unknown-linux-gnu >> Thread model: posix >> clang: note: diagnostic msg: PLEASE submit a bug report to >> http://llvm.org/bugs/ and include the crash backtrace, preprocessed >> source, and associated run script. >> clang: note: diagnostic msg: Error generating preprocessed source(s). >> make: *** [src/capnp/compiler/module-loader.o] Error 254 >> >> >> >> -------------------------------------------------------------------------------------------------------------------------- >> >> It seems someone had asked similar questions 3 years ago but no official >> solution. What I am eager to know is how should I handle this? If I want to >> keep using Clang 3.5, is this unavoidable? >> >> Thanks very much for any hints and help! >> >> >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Cap'n Proto" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> Visit this group at https://groups.google.com/group/capnproto. >> > > -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/capnproto.
