Date: Sat, 25 May 2019 14:42:48 -0700 From: Cy Schubert <Cy.Schubert@cschubert.com> To: Mark Johnston <markj@freebsd.org> Cc: Cy Schubert <Cy.Schubert@cschubert.com>, freebsd-hackers@freebsd.org, rmacklem@freebsd.org Subject: Re: DTrace instrumentation build error Message-ID: <201905252142.x4PLgmEo098646@slippy.cwsent.com> In-Reply-To: Message from Mark Johnston <markj@freebsd.org> of "Fri, 24 May 2019 10:56:50 -0400." <20190524145650.GB72269@raichu>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20190524145650.GB72269@raichu>, Mark Johnston writes: > On Fri, May 24, 2019 at 05:55:51AM -0700, Cy Schubert wrote: > > Hi, > > > > I'm helping rmacklem@ with instrumentation of mountd with USDT > > probes.It builds fine on amd64 however fails on i386 > > > > ===> sbin/sconfig (all) > > ld: error: cannot open /usr/lib32/dtrace/drti.o: No such file or > > directory > > dtrace: failed to link script /home/cy/stable12/usr.sbin/mountd/mountd_d > > t.d: fai > > led to link mountd_dt.o: ld exited with status 1 > > --- mountd_dt.o --- > > *** [mountd_dt.o] Error code 1 > > > > make[6]: stopped in /home/cy/stable12/usr.sbin/mountd > > 1 error > > > > make[6]: stopped in /home/cy/stable12/usr.sbin/mountd > > --- all_subdir_usr.sbin/mountd --- > > *** [all_subdir_usr.sbin/mountd] Error code 2 > > > > A couple of interesting things here: > > > > 1. /usr/lib32/dtrace/drti.o doesn't exist in the universe12a and > > universe12b jails. > > /usr/lib32 is entirely missing in those jails. > > > 2. Why would buildworld (tinderbox in this case) link against an object > > outside of /usr/obj? > > It is simply dtrace(1)'s default behaviour. I believe this patch is > sufficient to fix the problem for both native and 32-bit compat builds. > I think it is a bit too hacky though: we should probably only add > -x libdir during a world build. A standalone make -C usr.sbin/mountd > should use the host drti.o. What's the right predicate for that? > > diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk > index 5d0aac91f1b4..ce008fdba324 100644 > --- a/share/mk/bsd.dep.mk > +++ b/share/mk/bsd.dep.mk > @@ -147,6 +147,9 @@ OBJS_DEPEND_GUESS.${_YC:R}.o+= ${_YC} > # DTrace probe definitions > .if ${SRCS:M*.d} > CFLAGS+= -I${.OBJDIR} > +.if exists(${OBJTOP}/cddl/lib/drti/drti.o) > +DTRACEFLAGS+= -x libdir=${OBJTOP}/cddl/lib/drti > +.endif > .endif > .for _DSRC in ${SRCS:M*.d:N*/*} > .for _D in ${_DSRC:R} Thanks Mark. I'll run another tinderbox with this. Wouldn't -L also work? incdir will also need updating. My initial thoughts were to add a -R option implementing --sysroot. -- Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905252142.x4PLgmEo098646>