From owner-freebsd-current@freebsd.org Thu Aug 16 18:25:52 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 61E041071E6B for ; Thu, 16 Aug 2018 18:25:52 +0000 (UTC) (envelope-from delphij@gmail.com) 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 F04DF7185B for ; Thu, 16 Aug 2018 18:25:51 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id B51A91071E69; Thu, 16 Aug 2018 18:25:51 +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 933961071E68 for ; Thu, 16 Aug 2018 18:25:51 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (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 2AD7E71859; Thu, 16 Aug 2018 18:25:51 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-io0-x242.google.com with SMTP id m4-v6so4676984iop.3; Thu, 16 Aug 2018 11:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bPJdUaP01IGYte6aNaiVn2zQUCqNONRMwkAgaBZawOg=; b=bVtueghwymi0iO93KBpX2iikdT2TR96JPHf96a4zfqUFf6ikhfbi9aOeX0ozESG1GZ V9mjUGimpBYGGIs1O8kmgrwGxzM7n6BDiuoIb/YfLUsGd0Id5JiR9flT1AK/pQGbc+u8 hDZaSlsmEytxNxRzVusgbbM2Swfz4sRULEpKFgWWd0enlRNRZTN9DspBLJPjEJVJPES2 q1LC5AlgVUwjkRCb+VXCX1XL4e3XXSG50f2uPwE7TVwLWkv9rNv3FrCPiKfcjmuCXksv zFCqwuhT+KujO77D3PBwbRCQmCT5I2oki34A8OP5s1bW7K1YOY2FbKiTc2cKTt8XrHSO YkaQ== 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:content-transfer-encoding; bh=bPJdUaP01IGYte6aNaiVn2zQUCqNONRMwkAgaBZawOg=; b=W2ralk4E6P4AVc/DPgBCQ5RRbMm0UEH3jVXxpR5otptriXubMTMau9KqU78iHhFTsR qRVe5a9RqvjqrsG85NDBjjIpeh/ffaRUsx/1+Imay7Y9mh3qDyGMOQlDej1x9pDJE0s6 XSL+JXH5QP4pySf6TM1a2jlk8BfC4lho9k4rGewI7PBOcaR7xnWO/VsdHIMLOtQtmLp+ C2WfuiLcbWPCwadEZS2zw+tNRFW8kEt4PjeHvMH7D069vDmDKbLo+X6ZAQao+gZwA7Ow m+H3xKWSf2sToAVR/IkuVWkPF7JTEjut/dQqSW9Y1Rr3cmL3xc1SLQsgpopB4RVdVnJh vjbg== X-Gm-Message-State: AOUpUlGnXR6d1paRnXYu1nm2hhBtyyFgiO1m8+SLC45Pf6mlaW6s5hKR 96OzD50n5ct5L77pgQQwi4EfvcA2tgnW8JlNdYfwAA== X-Google-Smtp-Source: AA+uWPz8fRCRxeSyt0snFIX0gih5F3hV1YF3+6Y3jQ9RiStjZ0G50BixMuuhcZsYMJLyETOIXmRibLdNLybhFHoKNuQ= X-Received: by 2002:a6b:1e52:: with SMTP id e79-v6mr27333314ioe.110.1534443949820; Thu, 16 Aug 2018 11:25:49 -0700 (PDT) MIME-Version: 1.0 References: <20180816111532.GY1190@albert.catwhisker.org> <1534436769.312158.1476422048.77F4DB62@webmail.messagingengine.com> In-Reply-To: <1534436769.312158.1476422048.77F4DB62@webmail.messagingengine.com> From: Xin LI Date: Thu, 16 Aug 2018 11:25:39 -0700 Message-ID: Subject: Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903] To: Brad Davis Cc: current@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 18:25:52 -0000 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 pr= oblem.. 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). 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 = wrote: > > > > > > Running: > > > > > > FreeBSD g1-215.catwhisker.org 12.0-ALPHA1 FreeBSD 12.0-ALPHA1 #80 r3= 37834M/337834:1200077: Wed Aug 15 04:34:45 PDT 2018 root@g1-215.catwhis= ker.org:/common/S4/obj/usr/src/amd64.amd64/sys/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/sbi= n/ifconfig/af_inet6.o > > > --- all_subdir_secure --- > > > --- moduli --- > > > /usr/bin/ld: error: undefined symbol: main > > > >>> referenced by crt1.c > > > >>> /common/S4/obj/usr/src/amd64.amd64/tmp/usr/lib/crt1= .o:(_start) > > > /usr/bin/ld: error: undefined symbol: Fssh_error > > > .... > > > make[5]: stopped in /usr/src/secure/usr.sbin/sshd > > > .ERROR_TARGET=3D'moduli' > > > .ERROR_META_FILE=3D'/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbi= n/sshd/moduli.meta' > > > .MAKE.LEVEL=3D'5' > > > MAKEFILE=3D'' > > > .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3D= yes verbose' > > > _ERROR_CMD=3D'cc -target x86_64-unknown-freebsd12.0 --sysroot=3D/comm= on/S4/obj/usr/src/amd64.amd64/tmp -B/common/S4/obj/usr/src/amd64.amd64/tmp/= usr/bin -O2 -pipe -I/usr/src/crypto/openssh -include ssh_namespace.h -DHA= VE_LDNS=3D1 -DUSE_BSM_AUDIT=3D1 -DHAVE_GETAUDIT_ADDR=3D1 -DUSE_BLACKLIST=3D= 1 -I/usr/src/contrib/blacklist/include -include krb5_config.h -DLIBWRAP=3D1= -std=3Dgnu99 -fstack-protector-strong -Wno-pointer-sign -Wno-empty-body -W= no-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wn= o-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-con= version -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch= -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-ar= guments -L/common/S4/obj/usr/src/amd64.amd64/lib/libblacklist /usr/src/c= rypto/openssh/moduli.c -o moduli; ;' > > > .CURDIR=3D'/usr/src/secure/usr.sbin/sshd' > > > .MAKE=3D'make' > > > .OBJDIR=3D'/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/sshd' > > > .TARGETS=3D'all' > > > DESTDIR=3D'/common/S4/obj/usr/src/amd64.amd64/tmp' > > > .... > > > > > > (on both the laptop and the build machine). > > > > > > I have copied the .ERROR_META_FILE to > > > > > a typescript of the attempted build to > > > . > > > > > > Additional information (previous day's verbose dmesg.bot, etc.) may > > > be found at . > > > > > > Peace, > > > david > > > -- > > > David H. Wolfskill david@catwhisker.org > > > Trump is gaslighting us: https://www.bbc.com/news/world-us-canada-449= 59300 > > > > > > See http://www.catwhisker.org/~david/publickey.gpg for my public key.