/usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

/usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

David Wolfskill
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     [hidden email]:/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/sbin/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='moduli'
.ERROR_META_FILE='/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/sshd/moduli.meta'
.MAKE.LEVEL='5'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 --sysroot=/common/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 -DHAVE_LDNS=1 -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1 -DUSE_BLACKLIST=1 -I/usr/src/contrib/blacklist/include -include krb5_config.h -DLIBWRAP=1 -std=gnu99 -fstack-protector-strong -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-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-parameter -Wno-parentheses  -Qunused-arguments   -L/common/S4/obj/usr/src/amd64.amd64/lib/libblacklist  /usr/src/crypto/openssh/moduli.c  -o moduli; ;'
.CURDIR='/usr/src/secure/usr.sbin/sshd'
.MAKE='make'
.OBJDIR='/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/sshd'
.TARGETS='all'
DESTDIR='/common/S4/obj/usr/src/amd64.amd64/tmp'
....

(on both the laptop and the build machine).

I have copied the .ERROR_META_FILE to
<http://www.catwhisker.org/~david/FreeBSD/head/r337903/moduli.meta and
a typescript of the attempted build to
<http://www.catwhisker.org/~david/FreeBSD/head/r337903/typescript>.

Additional information (previous day's verbose dmesg.bot, etc.) may
be found at <http://www.catwhisker.org/~david/FreeBSD/history/>.

Peace,
david
--
David H. Wolfskill [hidden email]
Trump is gaslighting us: https://www.bbc.com/news/world-us-canada-44959300

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

signature.asc (631 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

Xin LI-5
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.

Cheers,
On Thu, Aug 16, 2018 at 4:19 AM David Wolfskill <[hidden email]> 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     [hidden email]:/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/sbin/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='moduli'
> .ERROR_META_FILE='/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/sshd/moduli.meta'
> .MAKE.LEVEL='5'
> MAKEFILE=''
> .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
> _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 --sysroot=/common/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 -DHAVE_LDNS=1 -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1 -DUSE_BLACKLIST=1 -I/usr/src/contrib/blacklist/include -include krb5_config.h -DLIBWRAP=1 -std=gnu99 -fstack-protector-strong -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-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-parameter -Wno-parentheses  -Qunused-arguments   -L/common/S4/obj/usr/src/amd64.amd64/lib/libblacklist  /usr/src/crypto/openssh/moduli.c  -o moduli; ;'
> .CURDIR='/usr/src/secure/usr.sbin/sshd'
> .MAKE='make'
> .OBJDIR='/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/sshd'
> .TARGETS='all'
> DESTDIR='/common/S4/obj/usr/src/amd64.amd64/tmp'
> ....
>
> (on both the laptop and the build machine).
>
> I have copied the .ERROR_META_FILE to
> <http://www.catwhisker.org/~david/FreeBSD/head/r337903/moduli.meta and
> a typescript of the attempted build to
> <http://www.catwhisker.org/~david/FreeBSD/head/r337903/typescript>.
>
> Additional information (previous day's verbose dmesg.bot, etc.) may
> be found at <http://www.catwhisker.org/~david/FreeBSD/history/>.
>
> Peace,
> david
> --
> David H. Wolfskill                              [hidden email]
> Trump is gaslighting us: https://www.bbc.com/news/world-us-canada-44959300
>
> See http://www.catwhisker.org/~david/publickey.gpg for my public key.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

Brad Davis
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..


Regards,
Brad Davis

> On Thu, Aug 16, 2018 at 4:19 AM David Wolfskill <[hidden email]> 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     [hidden email]:/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/sbin/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='moduli'
> > .ERROR_META_FILE='/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/sshd/moduli.meta'
> > .MAKE.LEVEL='5'
> > MAKEFILE=''
> > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
> > _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 --sysroot=/common/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 -DHAVE_LDNS=1 -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1 -DUSE_BLACKLIST=1 -I/usr/src/contrib/blacklist/include -include krb5_config.h -DLIBWRAP=1 -std=gnu99 -fstack-protector-strong -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-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-parameter -Wno-parentheses  -Qunused-arguments   -L/common/S4/obj/usr/src/amd64.amd64/lib/libblacklist  /usr/src/crypto/openssh/moduli.c  -o moduli; ;'
> > .CURDIR='/usr/src/secure/usr.sbin/sshd'
> > .MAKE='make'
> > .OBJDIR='/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/sshd'
> > .TARGETS='all'
> > DESTDIR='/common/S4/obj/usr/src/amd64.amd64/tmp'
> > ....
> >
> > (on both the laptop and the build machine).
> >
> > I have copied the .ERROR_META_FILE to
> > <http://www.catwhisker.org/~david/FreeBSD/head/r337903/moduli.meta and
> > a typescript of the attempted build to
> > <http://www.catwhisker.org/~david/FreeBSD/head/r337903/typescript>.
> >
> > Additional information (previous day's verbose dmesg.bot, etc.) may
> > be found at <http://www.catwhisker.org/~david/FreeBSD/history/>.
> >
> > Peace,
> > david
> > --
> > David H. Wolfskill                              [hidden email]
> > Trump is gaslighting us: https://www.bbc.com/news/world-us-canada-44959300
> >
> > See http://www.catwhisker.org/~david/publickey.gpg for my public key.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

Charlie Li
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.

--
Charlie Li
Can't think of a witty .sigline today…

(This email address is for mailing list use only; replace local-part
with vishwin for off-list communication)


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

David Wolfskill
On Thu, Aug 16, 2018 at 12:43:42PM -0400, Charlie Li wrote:
> ....
> 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.

I got the "one" I reported twice this morning, on each of two
different machines, so that's four out of four.  Granted, that
doesn't necessarily make it "reproducible," but it does reduce the
odds that its another race condition, for example.

And one of those machines is currently available for testing possible
fixes (after I power it back up).

> This is all with META_MODE, so could be a bug with that.

True -- I am using META_MODE (as my mention of the .ERROR_META_FILE
indicated).

Peace,
david
--
David H. Wolfskill [hidden email]
Trump is gaslighting us: https://www.bbc.com/news/world-us-canada-44959300

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

signature.asc (631 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

Larry Rosenman
In reply to this post by Charlie Li
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 $


>
> --
> Charlie Li
> Can't think of a witty .sigline today…
>
> (This email address is for mailing list use only; replace local-part
> with vishwin for off-list communication)
>




--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640                 E-Mail: [hidden email]
US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106

signature.asc (693 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

Xin LI-5
In reply to this post by Brad Davis
On Thu, Aug 16, 2018 at 9:26 AM Brad Davis <[hidden email]> 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).

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 <[hidden email]> 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     [hidden email]:/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/sbin/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='moduli'
> > > .ERROR_META_FILE='/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/sshd/moduli.meta'
> > > .MAKE.LEVEL='5'
> > > MAKEFILE=''
> > > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
> > > _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 --sysroot=/common/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 -DHAVE_LDNS=1 -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1 -DUSE_BLACKLIST=1 -I/usr/src/contrib/blacklist/include -include krb5_config.h -DLIBWRAP=1 -std=gnu99 -fstack-protector-strong -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-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-parameter -Wno-parentheses  -Qunused-arguments   -L/common/S4/obj/usr/src/amd64.amd64/lib/libblacklist  /usr/src/crypto/openssh/moduli.c  -o moduli; ;'
> > > .CURDIR='/usr/src/secure/usr.sbin/sshd'
> > > .MAKE='make'
> > > .OBJDIR='/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/sshd'
> > > .TARGETS='all'
> > > DESTDIR='/common/S4/obj/usr/src/amd64.amd64/tmp'
> > > ....
> > >
> > > (on both the laptop and the build machine).
> > >
> > > I have copied the .ERROR_META_FILE to
> > > <http://www.catwhisker.org/~david/FreeBSD/head/r337903/moduli.meta and
> > > a typescript of the attempted build to
> > > <http://www.catwhisker.org/~david/FreeBSD/head/r337903/typescript>.
> > >
> > > Additional information (previous day's verbose dmesg.bot, etc.) may
> > > be found at <http://www.catwhisker.org/~david/FreeBSD/history/>.
> > >
> > > Peace,
> > > david
> > > --
> > > David H. Wolfskill                              [hidden email]
> > > Trump is gaslighting us: https://www.bbc.com/news/world-us-canada-44959300
> > >
> > > See http://www.catwhisker.org/~david/publickey.gpg for my public key.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

Ian Lepore-3
On Thu, 2018-08-16 at 11:25 -0700, Xin LI wrote:

> On Thu, Aug 16, 2018 at 9:26 AM Brad Davis <[hidden email]> 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 <david@catwhisker
> > > .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     
> > > > [hidden email]:/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
> > > > >
> > > > > >
> > > > > > >
> > > > > > > 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='moduli'
> > > > .ERROR_META_FILE='/common/S4/obj/usr/src/amd64.amd64/secure/usr
> > > > .sbin/sshd/moduli.meta'
> > > > .MAKE.LEVEL='5'
> > > > MAKEFILE=''
> > > > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes
> > > > silent=yes verbose'
> > > > _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 --
> > > > sysroot=/common/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 -DHAVE_LDNS=1
> > > > -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1 -DUSE_BLACKLIST=1
> > > > -I/usr/src/contrib/blacklist/include -include krb5_config.h
> > > > -DLIBWRAP=1 -std=gnu99 -fstack-protector-strong -Wno-pointer-
> > > > sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-
> > > > variable -Wno-tautological-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-parameter -Wno-
> > > > parentheses  -Qunused-arguments   -
> > > > L/common/S4/obj/usr/src/amd64.amd64/lib/libblacklist  /usr/src/
> > > > crypto/openssh/moduli.c  -o moduli; ;'
> > > > .CURDIR='/usr/src/secure/usr.sbin/sshd'
> > > > .MAKE='make'
> > > > .OBJDIR='/common/S4/obj/usr/src/amd64.amd64/secure/usr.sbin/ssh
> > > > d'
> > > > .TARGETS='all'
> > > > DESTDIR='/common/S4/obj/usr/src/amd64.amd64/tmp'
> > > > ....
> > > >
> > > > (on both the laptop and the build machine).
> > > >
> > > > I have copied the .ERROR_META_FILE to
> > > > <http://www.catwhisker.org/~david/FreeBSD/head/r337903/moduli.m
> > > > eta and
> > > > a typescript of the attempted build to
> > > > <http://www.catwhisker.org/~david/FreeBSD/head/r337903/typescri
> > > > pt>.
> > > >
> > > > Additional information (previous day's verbose dmesg.bot, etc.)
> > > > may
> > > > be found at <http://www.catwhisker.org/~david/FreeBSD/history/>
> > > > .
> > > >
> > > > Peace,
> > > > david
> > > > --
> > > > David H. Wolfskill                              david@catwhiske
> > > > r.org
> > > > Trump is gaslighting us: https://www.bbc.com/news/world-us-cana
> > > > da-44959300
> > > >
> > > > See http://www.catwhisker.org/~david/publickey.gpg for my
> > > > public key.
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd
> .org"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

Bryan Drewery-6
In reply to this post by Larry Rosenman
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
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

Bryan Drewery-6
In reply to this post by Ian Lepore-3
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 <[hidden email]> 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 <david@catwhisker
>>>> .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     
>>>>> [hidden email]:/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.


--
Regards,
Bryan Drewery


signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

Brad Davis

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 <[hidden email]> 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 <david@catwhisker> >>>> .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> >>>>> [hidden email]:/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

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/ld: error: undefined symbol: main [r337834 -> r337903]

David Wolfskill
In reply to this post by Bryan Drewery-6
On Thu, Aug 16, 2018 at 12:49:06PM -0700, Bryan Drewery wrote:
> ...
> r337928 should fix it.
>
>
> --
> Regards,
> Bryan Drewery
>

Just tested after applying r337928 on top of sources at r337903; the
rebuild after restoring crypto/openssh/moduli was successful:

FreeBSD freebeast.catwhisker.org 12.0-ALPHA1 FreeBSD 12.0-ALPHA1 #285  r337903M/337903:1200078: Thu Aug 16 13:30:45 PDT 2018     [hidden email]:/common/S4/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

Peace,
david
--
David H. Wolfskill [hidden email]
Trump is gaslighting us: https://www.bbc.com/news/world-us-canada-44959300

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

signature.asc (631 bytes) Download Attachment