From owner-freebsd-current@freebsd.org Wed Oct 7 09:49:53 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E2099B9B86 for ; Wed, 7 Oct 2015 09:49:53 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-yk0-x235.google.com (mail-yk0-x235.google.com [IPv6:2607:f8b0:4002:c07::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D9C61502; Wed, 7 Oct 2015 09:49:53 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by ykdz138 with SMTP id z138so11251170ykd.2; Wed, 07 Oct 2015 02:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=5kM5XjRcqKdjctfMQYKDdtIu9SKLozZSYQGXi7itWes=; b=oyAM9W0XmhFNDMYy7SpEtr25qRU3fXA+4qNKyH03ru/FbRGmxghqjZY1wumluSpWCg Ckgl1P2sBCmqWsQe9EPQCfTKPSkw5bOY1x7vILnkPI9S+ke9bRPxEDyIIsqSJJqnK+q8 Z+6VdXn//nlkaueFXR6Ro1fRGMHB6AtNBHhXy8/mIYqpOVNzJcL0/ky4E12AYmz7GEVn yQbBzD5A2cMjjsnUY+x51A6H727cKUBWq8R2oFcg4Fv0yP8e3ZIq1Bt7EYeXfi7NC6R+ MIjOah/qM8ePOTN5aMqhiPIBGfFPHYQWU5NbVGvp11n4GX7ikewObJZNsuR9qVP9Rix4 0Vdg== MIME-Version: 1.0 X-Received: by 10.129.102.193 with SMTP id a184mr35867ywc.19.1444211392367; Wed, 07 Oct 2015 02:49:52 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.37.111.214 with HTTP; Wed, 7 Oct 2015 02:49:52 -0700 (PDT) In-Reply-To: <443323959.208.1444169882292.JavaMail.jenkins@jenkins-9.freebsd.org> References: <443323959.208.1444169882292.JavaMail.jenkins@jenkins-9.freebsd.org> Date: Wed, 7 Oct 2015 02:49:52 -0700 X-Google-Sender-Auth: 77Ts9SODO8gqPegN34a0UETsrCw Message-ID: Subject: Re: FreeBSD_HEAD_amd64_gcc4.9 - Build #614 - Failure From: Craig Rodrigues To: Dimitry Andric Cc: freebsd-current Current , "jenkins-admin@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2015 09:49:53 -0000 On Tue, Oct 6, 2015 at 3:17 PM, 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) @@ -480,6 +480,12 @@ print(llvm::errs()); } +struct Visiting { + Module *M; + Visiting *ExportedBy; +}; + + void VisibleModuleSet::setVisible(Module *M, SourceLocation Loc, VisibleCallback Vis, ConflictCallback Cb) { if (isVisible(M)) @@ -487,11 +493,6 @@ ++Generation; - struct Visiting { - Module *M; - Visiting *ExportedBy; - }; - std::function 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? -- Craig