From owner-freebsd-current@freebsd.org Thu Aug 16 20:03:22 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 938BE10755CB for ; Thu, 16 Aug 2018 20:03:22 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1D8771D7 for ; Thu, 16 Aug 2018 20:03:22 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id D2E0B10755CA; Thu, 16 Aug 2018 20:03:21 +0000 (UTC) Delivered-To: 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 B0ED710755C9 for ; Thu, 16 Aug 2018 20:03:21 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D0EC771D4; Thu, 16 Aug 2018 20:03:21 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: brd/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 394CC20370; Thu, 16 Aug 2018 20:03:21 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 08E2E21D23; Thu, 16 Aug 2018 16:03:21 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Thu, 16 Aug 2018 16:03:21 -0400 X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 6BB8C41D5; Thu, 16 Aug 2018 16:03:20 -0400 (EDT) Message-Id: <1534449800.3133736.1476651000.26ADC4C2@webmail.messagingengine.com> From: Brad Davis To: Bryan Drewery , Ian Lepore , Xin LI Cc: current@freebsd.org MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface - ajax-7b72137a Date: Thu, 16 Aug 2018 14:03:20 -0600 In-Reply-To: References: <20180816111532.GY1190@albert.catwhisker.org> <1534436769.312158.1476422048.77F4DB62@webmail.messagingengine.com> <1534446597.1466.42.camel@freebsd.org> Subject: Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 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: Thu, 16 Aug 2018 20:03:22 -0000 On Thu, Aug 16, 2018, at 1:49 PM, Bryan Drewery wrote: > On 8/16/18 12:09 PM, Ian Lepore wrote: > > On Thu, 2018-08-16 at 11:25 -0700, Xin LI wrote: > >> On Thu, Aug 16, 2018 at 9:26 AM Brad Davis wrote:> >>> > >>> > >>> On Thu, Aug 16, 2018, at 10:13 AM, Xin LI wrote: > >>>> > >>>> This was caused by r337852, but I didn't investigated further. > >>>> > >>>> The problem is that we have a source file called 'moduli.c' in > >>>> crypto/openssh/ while the build target was moduli, and bmake seen> >>>> 'moduli' in source tree as older than moduli.c, and decided to > >>>> rebuild > >>>> it from source, while the two files are unrelated. > >>> Hi Xin, > >>> > >>> I don't see how that could be the case as I didn't move the file > >>> around, I just moved how it gets installed. > >>> > >>> I have done many many builds with this change in and haven't seen> >>> this problem.. > >> Yeah, let me rephrase: this might have been exposed by r337852; I > >> don't think your change itself really caused or should have caused> >> problem, but my theory based on what we have observed was that it > >> might have exposed a bug where either bmake itself, or some .mk > >> files> >> might have generated e.g. automatic rule for ${foo}: ${foo}.c rules> >> (haven't traced that part down yet). > >> > > > > There is an implicit rule to build file from file.c, it's why > > you can> > type "make foo" in a dir that contains a foo.c and no Makefile. > > > > The CONFS=moduli makes moduli into a target. The implicit rules > > search> > finds the rule to make moduli from moduli.c and because of the .PATH> > it's able to find a moduli.c. > > > > It might be fixable by simply adding a target with a do-nothing > > script> > for building moduli in usr.sbin/sshd/Makefile. Something like > > > > moduli: > > @ : # Do nothing. > > > > But that's just a wild guess on my part, not sure that'll work. > > Hmm, in> > fact, it'll probably cause a make warning about duplicate > > targets with> > scripts. > > > > --Ian > > > >> The most scaring part is that the build system seems to trying > >> building crypto/openssh/moduli because moduli.c was newer, and the> >> file was deleted as part of the rebuild; should moduli.c compile by> >> its own, we would end up with a binary moduli file. > >> > >> I'll take another look tonight if I had some time. > >> > >>> > >>> > >>> > >>> Regards, > >>> Brad Davis > >>> > >>>> > >>>> On Thu, Aug 16, 2018 at 4:19 AM David Wolfskill >>>> .org> wrote: > >>>>> > >>>>> > >>>>> Running: > >>>>> > >>>>> FreeBSD g1-215.catwhisker.org 12.0-ALPHA1 FreeBSD 12.0-ALPHA1 > >>>>> #80 r337834M/337834:1200077: Wed Aug 15 04:34:45 PDT 2018> >>>>> root@g1-215.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/s> >>>>> ys/CANARY amd64 > >>>>> > >>>>> after updating working copy to r337903, I'm seeing: > >>>>> > >>>>> ... > >>>>>> > >>>>>>> > >>>>>>>> > >>>>>>>> stage 4.3: building everything > >>>>> ... > >>>>> --- ifconfig_make --- > >>>>> Building > >>>>> /common/S4/obj/usr/src/amd64.amd64/rescue/rescue/usr/src/sbin/i> >>>>> fconfig/af_inet6.o > >>>>> --- all_subdir_secure --- > >>>>> --- moduli --- > >>>>> /usr/bin/ld: error: undefined symbol: main > >>>>>> > > r337928 should fix it. > Thank you. Regards, Brad Davis