Date: Thu, 16 Aug 2018 12:49:06 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Ian Lepore <ian@freebsd.org>, Xin LI <delphij@gmail.com>, Brad Davis <brd@freebsd.org> Cc: current@freebsd.org Subject: Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903] Message-ID: <b124f9cd-f523-c3b2-9019-8b04702e71bf@FreeBSD.org> In-Reply-To: <1534446597.1466.42.camel@freebsd.org> References: <20180816111532.GY1190@albert.catwhisker.org> <CAGMYy3tJk7iKM89K8j-57YbRAUu7UqOysPGXNP92-uT5XroM3A@mail.gmail.com> <1534436769.312158.1476422048.77F4DB62@webmail.messagingengine.com> <CAGMYy3smc-yptUjsgV1vOvwn5k2jqdu%2BY3Ja%2B8Uu4q7pzXEQGA@mail.gmail.com> <1534446597.1466.42.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lx8RFjRFPQNJyMUY8oCdvMyxTvcGQH44n Content-Type: multipart/mixed; boundary="e5ZZ5HvJQvOC6ZpVEZyiwWyAtUs74K6mf"; protected-headers="v1" From: Bryan Drewery <bdrewery@FreeBSD.org> To: Ian Lepore <ian@freebsd.org>, Xin LI <delphij@gmail.com>, Brad Davis <brd@freebsd.org> Cc: current@freebsd.org Message-ID: <b124f9cd-f523-c3b2-9019-8b04702e71bf@FreeBSD.org> Subject: Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903] References: <20180816111532.GY1190@albert.catwhisker.org> <CAGMYy3tJk7iKM89K8j-57YbRAUu7UqOysPGXNP92-uT5XroM3A@mail.gmail.com> <1534436769.312158.1476422048.77F4DB62@webmail.messagingengine.com> <CAGMYy3smc-yptUjsgV1vOvwn5k2jqdu+Y3Ja+8Uu4q7pzXEQGA@mail.gmail.com> <1534446597.1466.42.camel@freebsd.org> In-Reply-To: <1534446597.1466.42.camel@freebsd.org> --e5ZZ5HvJQvOC6ZpVEZyiwWyAtUs74K6mf Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable 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 <brd@freebsd.org> 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). >> >=20 > 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. >=20 > The CONFS=3Dmoduli makes moduli into a target. =C2=A0The 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. >=20 > It might be fixable by simply adding a target with a do-nothing script > for building moduli in usr.sbin/sshd/Makefile. =C2=A0Something like >=20 > moduli: > =C2=A0 =C2=A0 @ : # Do nothing. >=20 > 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. >=20 > --Ian >=20 >> 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 <david@catwhisker >>>> .org> wrote: >>>>> >>>>> >>>>> Running: >>>>> >>>>> FreeBSD g1-215.catwhisker.org 12.0-ALPHA1 FreeBSD 12.0-ALPHA1 >>>>> #80=C2=A0=C2=A0r337834M/337834:1200077: Wed Aug 15 04:34:45 PDT 201= 8=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >>>>> root@g1-215.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/s >>>>> ys/CANARY=C2=A0=C2=A0amd64 >>>>> >>>>> 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. --=20 Regards, Bryan Drewery --e5ZZ5HvJQvOC6ZpVEZyiwWyAtUs74K6mf-- --lx8RFjRFPQNJyMUY8oCdvMyxTvcGQH44n Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+Rc8ssOq6npcih8JNddxu25Gl88FAlt11TMACgkQNddxu25G l89pRgf/RTKp03Ef/5iHKsVqqMe4qKxQ6aZaPSz4Ipua0fSGfWrPEESAhKGiPccU YmkudHpBBr+U+0pu07djhWCiHLT7ixg9sR+tpiCiTG6eqF5zXxAF52G+q/RTvAx4 3vwJbuD5DpMl8k0zwzyOHXBKdOOfc3J6qhhxJ3/wKpuEAh/pHQUfv3OPTauiH/gZ LVJsSSjy1X1a08cnkVnfyArhyaRV2x9QYkSjOm0DSZduvkZ/icfzWYDLnJznRuZo QHcVg0lw1/jwkZT8yilstLf+mr7jfeEVvI6XAIpaQMIfUdTvUBfdGKlntobBBlVs kPvT0PtSzyPZ22YC0AQ9rWr10xYQfQ== =jrc6 -----END PGP SIGNATURE----- --lx8RFjRFPQNJyMUY8oCdvMyxTvcGQH44n--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b124f9cd-f523-c3b2-9019-8b04702e71bf>