On Tue, Oct 6, 2015 at 3:17 PM, <jenkins-admin_at_freebsd.org> wrote: > > --- Module.o --- > /usr/local/bin/x86_64-portbld-freebsd10.1-g++ -isystem > /builds/FreeBSD_HEAD_amd64_gcc4.9/obj/builds/FreeBSD_HEAD_amd64_gcc4.9/tmp/usr/include > -L/builds/FreeBSD_HEAD_amd64_gcc4.9/obj/builds/FreeBSD_HEAD_amd64_gcc4.9/tmp/usr/lib > --sysroot=/builds/FreeBSD_HEAD_amd64_gcc4.9/obj/builds/FreeBSD_HEAD_amd64_gcc4.9/tmp > -B/usr/local/x86_64-freebsd/bin/ > -I/builds/FreeBSD_HEAD_amd64_gcc4.9/obj/builds/FreeBSD_HEAD_amd64_gcc4.9/tmp/usr/include/c++/v1 > -std=gnu++11 > -L/builds/FreeBSD_HEAD_amd64_gcc4.9/obj/builds/FreeBSD_HEAD_amd64_gcc4.9/tmp/../lib/libc++ > --sysroot=/builds/FreeBSD_HEAD_amd64_gcc4.9/obj/builds/FreeBSD_HEAD_amd64_gcc4.9/tmp > -B/usr/local/x86_64-freebsd/bin/ -O2 -pipe > -I/builds/FreeBSD_HEAD_amd64_gcc4.9/lib/clang/libclangbasic/../../../contrib/llvm/include > -I/builds/FreeBSD_HEAD_amd64_gcc4.9/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/include > -I/builds/FreeBSD_HEAD_amd64_gcc4.9/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic > -I. > -I/builds/FreeBSD_HEAD_amd64_gcc4.9/lib/clang/libclangbasic/../../../contrib/llvm/../../lib/clang/include > -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS > -D__STDC_CONSTANT_MACROS -DCLANG_ENABLE_ARCMT > -DCLANG_ENABLE_STATIC_ANALYZER -fno-strict-aliasing > -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.0\" > -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.0\" -DDEFAULT_SYSROOT=\"\" > -fstack-protector-strong -std=c++11 -fno-exceptions -fno-rtti -c > /builds/FreeBSD_HEAD_amd64_gcc4.9/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/Module.cpp > -o Module.o > In file included from > /builds/FreeBSD_HEAD_amd64_gcc4.9/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h:22:0, > from > /builds/FreeBSD_HEAD_amd64_gcc4.9/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/include/clang/Basic/Module.h:18, > from > /builds/FreeBSD_HEAD_amd64_gcc4.9/lib/clang/libclangbasic/../../../contrib/llvm/tools/clang/lib/Basic/Module.cpp:15: > /builds/FreeBSD_HEAD_amd64_gcc4.9/obj/builds/FreeBSD_HEAD_amd64_gcc4.9/tmp/usr/include/c++/v1/functional:1322:17: > error: '_Rp std::__1::__function::__base<_Rp(_ArgTypes > ...)>::operator()(_ArgTypes&& ...) [with _Rp = void; _ArgTypes = > {clang::VisibleModuleSet::setVisible(clang::Module*, clang::SourceLocation, > clang::VisibleModuleSet::VisibleCallback, > clang::VisibleModuleSet::ConflictCallback)::Visiting}]', declared using > local type 'clang::VisibleModuleSet::setVisible(clang::Module*, > clang::SourceLocation, clang::VisibleModuleSet::VisibleCallback, > clang::VisibleModuleSet::ConflictCallback)::Visiting', is used but never > defined [-fpermissive] > virtual _Rp operator()(_ArgTypes&& ...) = 0; > ^ > *** [Module.o] Error code 1 > > make[6]: stopped in > /builds/FreeBSD_HEAD_amd64_gcc4.9/lib/clang/libclangbasic > 1 error > > Hi, I took a look at this, and was also able to reproduce this with gcc 5.0. I was able to eliminate this error with gcc by moving the definition of "struct Visiting" from outside the function by doing: Index: llvm/tools/clang/lib/Basic/Module.cpp =================================================================== --- llvm/tools/clang/lib/Basic/Module.cpp (revision 288962) +++ llvm/tools/clang/lib/Basic/Module.cpp (working copy) _at__at_ -480,6 +480,12 _at__at_ print(llvm::errs()); } +struct Visiting { + Module *M; + Visiting *ExportedBy; +}; + + void VisibleModuleSet::setVisible(Module *M, SourceLocation Loc, VisibleCallback Vis, ConflictCallback Cb) { if (isVisible(M)) _at__at_ -487,11 +493,6 _at__at_ ++Generation; - struct Visiting { - Module *M; - Visiting *ExportedBy; - }; - std::function<void(Visiting)> VisitModule = [&](Visiting V) { // Modules that aren't available cannot be made visible. if (!V.M->isAvailable()) I am not C++11 savvy enough to know if this is a gcc bug, or a problem in the clang code. Can we have something like this as a local patch in our FreeBSD tree until we can get a better fix from LLVM? -- CraigReceived on Wed Oct 07 2015 - 07:49:53 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:00 UTC