From owner-freebsd-current@freebsd.org Wed Dec 12 15:19:48 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 079291312171 for ; Wed, 12 Dec 2018 15:19:48 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5971569C6C; Wed, 12 Dec 2018 15:19:47 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f43.google.com with SMTP id t24so15132027ioi.0; Wed, 12 Dec 2018 07:19:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EecC4Lfzzgb2QrQ8l55ODvEFa2WJKNWdZ4YpgM/DxOg=; b=WWIZhXIYljSn24yITQbNhhTB971MxOiE9hOQL9X5odrTL4fpFZyyzW8s2xoQKYqUrx v+xpEx/tZplYcBh/fpVVgf2jFKO5LEBq0/U1XXh/PyQYUoFHPlYnHEXU+s08ba1wTcGM 8sh8hSJ+b4CY2JkAO4ZJTSUYPomV1hJ+BolwT3mcPkhiwPBoYMQKdiouoxuX4acYRrJQ QmvuIv0EaWX0NfqWDD9h+3UqBGcmajpUE9AoE8Vu3xKjv61l3dvzk4hSfkzoQU9aWtzu Pv1EQd+CL2ws+LKut/Rg9ldQnrS+4Bw6Iaacg//HPxdxEEXOvjoqzScNvlXgva2UutES dyWg== X-Gm-Message-State: AA+aEWbN+BzBV1aDRYuEOjn2TvvEc5oQTfVOn5U+oB4BemxmDmR16bHx v4OFPjhYrHjaSJt8znWGxtujlHPBolA+YdCMXJO4llpJICw= X-Google-Smtp-Source: AFSGD/XFqXdZiFnKBCylF8WmIYwJih3eC6S7UQ5I4dDJCpt2iHfg4y/6e/70ELk/6a+7pSvcGRIP+NOBgxnsmZZN8ng= X-Received: by 2002:a5d:8788:: with SMTP id f8mr1029162ion.239.1544627986123; Wed, 12 Dec 2018 07:19:46 -0800 (PST) MIME-Version: 1.0 References: <1348923530.20181212021110@serebryakov.spb.ru> <20181212100602.332da246@ernst.home> <20181212102455.102e8024@thor.intern.walstatt.dynvpn.de> In-Reply-To: From: Ed Maste Date: Wed, 12 Dec 2018 10:19:32 -0500 Message-ID: Subject: Re: r111 build error To: lev@freebsd.org Cc: Dimitry Andric , "O. Hartmann" , gljennjohn@gmail.com, FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 5971569C6C X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.43 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-3.83 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.91)[-0.910,0]; RCVD_IN_DNSWL_NONE(0.00)[43.166.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[43.166.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; IP_SCORE(-2.91)[ip: (-9.63), ipnet: 209.85.128.0/17(-3.54), asn: 15169(-1.28), country: US(-0.09)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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, 12 Dec 2018 15:19:48 -0000 On Wed, 12 Dec 2018 at 07:35, Lev Serebryakov wrote: > > On 12.12.2018 14:59, Dimitry Andric wrote: > > >>>> ld: error: undefined symbol: clang::CallExpr::getLocStart() const > >>>>>>> referenced by MacOSXAPIChecker.cpp:86 > >>>>>>> (/usr/src/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp:86) > >>>>>>> MacOSXAPIChecker.o:((anonymous > >>>>>>> namespace)::MacOSXAPIChecker::CheckDispatchOnce(clang::ento::CheckerContext&, > >>>>>>> clang::CallExpr const*, llvm::StringRef) const) in > >>>>>>> archive /usr/obj/usr/src/amd64.amd64/lib/clang/libclang/libclang.a > > > > Any ideas on how to reproduce this build failure? I have run multiple > > universe builds before committing this update, and I never saw any error > > which resembles the above. > rm -rf /usr/obj/src helps to get rid of this error. I've had /usr/obj > from previous version (but I didn't use -DNO_CLEAN!). This sounds like a similar issue to one I fixed in r341796 after the most recent wpa update - there are a few cases of source changes that are not handled well by .depend files. While we could take this to root cause I think the most expedient fix is probably just to check for evidence of clang 6 in the object tree, and rm the .depend files and objects if found. Checking for clang 6 can be done by grepping for a file removed in the clang 7 update. This approach is rather hacky, but has allowed builds with -DNO_CLEAN to succeed for the last year and a half or so, and the hacks do not need to persist indefinitely. It would look something like: @if [ -e "${OBJTOP}/lib/clang/.../.depend.foo.o" ] && \ egrep -q 'some/file/removed/in/clang7.c' \ ${OBJTOP}/lib/clang/.../.depend.foo.o; then \ echo "Removing stale clang 6 dependencies and objects"; \ find ${OBJTOP}/lib/clang -name '.depend.*' -o -name '*.o' -delete \ fi I might move these cleanup hacks out into a standalone shell script to make it easier to test and maintain them.