Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2018 12:44:11 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Larry Rosenman <ler@lerctr.org>, Charlie Li <ml@vishwin.info>
Cc:        current@freebsd.org
Subject:   Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]
Message-ID:  <1ce1779f-5fae-0ffe-83f7-11adf85c5cc6@FreeBSD.org>
In-Reply-To: <20180816165337.n4uxpkbpn52mewfa@ler-imac.local>
References:  <20180816111532.GY1190@albert.catwhisker.org> <CAGMYy3tJk7iKM89K8j-57YbRAUu7UqOysPGXNP92-uT5XroM3A@mail.gmail.com> <1534436769.312158.1476422048.77F4DB62@webmail.messagingengine.com> <d1c8c48c-333e-f3a6-1105-ba74a0a43719@vishwin.info> <20180816165337.n4uxpkbpn52mewfa@ler-imac.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/16/18 9:53 AM, Larry Rosenman wrote:
> On Thu, Aug 16, 2018 at 12:43:42PM -0400, Charlie Li wrote:
>> On 16/08/2018 12:26, 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..
>>>
>> I've found this one intermittent at best. I'll run a buildworld on
>> anything newer than r337852, get the linker error, update to even the
>> next newer revision that changes completely unrelated files, build
>> succeeds. Case in point, r337835 to r337863 failed, but r337863 to
>> r337865 succeeded.
>>
>> This is all with META_MODE, so could be a bug with that.
> I've seen the same thing with meta-mode.  A svn up after the failure
> restores the missing moduli file, and a re-run will succeed.
> 
> borg.lerctr.org /usr/src $ sudo svn up
> Updating '.':
> Restored 'crypto/openssh/moduli'
> At revision 337914.
> borg.lerctr.org /usr/src $
> 
> 

FYI it's not META_MODE related. It happens with a clean build as long as
the moduli timestamp is old enough.

> ~/git/freebsd/secure/usr.sbin/sshd # make buildconfig -dmM MK_META_MODE=no
> Make_ExpandUse: examine buildconfig
> MakeAddChild: need to examine moduli
> MakeAddChild: need to examine sshd_config
> Make_ExpandUse: examine moduli
> MakeAddChild: need to examine moduli.c
> Make_ExpandUse: examine sshd_config
> Make_ExpandUse: examine moduli.c
> Examining moduli.c...modified  7:59:30 Jun 07, 2018...up-to-date.
> Examining moduli...modified  0:00:00 Nov 30, 2017...modified before source /root/git/freebsd/crypto/openssh/moduli.c...out-of-date.
> cc -O2 -pipe   -I/root/git/freebsd/crypto/openssh -include ssh_namespace.h -DHAVE_LDNS=1 -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1 -DUSE_BLACKLIST=1 -I/root/git/freebsd/contrib/blacklist/include -include
>  krb5_config.h -DLIBWRAP=1 -DXAUTH_PATH=\"/usr/local/bin/xauth\" -g  -std=gnu99 -fstack-protector-strong -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautologic
> al-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-pa
> rameter -Wno-parentheses  -fcolor-diagnostics -Qunused-arguments   -L/scratch/obj/root/git/freebsd/amd64.amd64/lib/libblacklist  /root/git/freebsd/crypto/openssh/moduli.c  -o /root/git/freebsd/crypto/op
> enssh/moduli
> /usr/bin/ld: error: undefined symbol: main



-- 
Regards,
Bryan Drewery



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1ce1779f-5fae-0ffe-83f7-11adf85c5cc6>