Re: Build error on i386 when building dtrace tests

From: NGie Cooper <yaneurabeya_at_gmail.com>
Date: Sat, 19 Dec 2015 18:05:09 -0800
(fixed the subject line again..)

> On Dec 19, 2015, at 17:57, Mark Johnston <markj_at_FreeBSD.org> wrote:
> 
> On Sat, Dec 19, 2015 at 05:03:51PM -0800, NGie Cooper wrote:
>> Hi Mark,
>> 	I ran into the following error when trying to build the dtrace tests on i386 (both with 10.2-RELEASE-p7 and 11.0-CURRENT) — have you seen this issue before?
> 
> Yes, that's because drti.o in stable/10 depends on libelf. The change
> which removes the libelf dependency shouldn't be MFCed because it breaks
> compatibility. When building an MFCed test suite on stable/10, you'll
> need to link the test programs against libelf. When building current on
> stable/10, dtrace(1) should use the drti.o from the objdir rather than
> the installed base. The diff below should solve these two problems.
> 
> diff --git a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk
> index 0c528ef..dcec33a 100644
> --- a/cddl/usr.sbin/dtrace/tests/dtrace.test.mk
> +++ b/cddl/usr.sbin/dtrace/tests/dtrace.test.mk
> _at__at_ -30,6 +30,8 _at__at_ SRCS.${prog}+= ${prog:S/.exe$/.c/}
> 
> .if exists(${prog:S/^tst.//:S/.exe$/.d/})
> SRCS.${prog}+=	${prog:S/^tst.//:S/.exe$/.d/}
> +LDADD.${prog}+= -lelf
> +DPADD.${prog}+= ${LIBELF}
> .endif
> .endfor
> 
> diff --git a/share/mk/sys.mk b/share/mk/sys.mk
> index 8fe6b68..1eeb0b9 100644
> --- a/share/mk/sys.mk
> +++ b/share/mk/sys.mk
> _at__at_ -128,7 +128,7 _at__at_ CXXFLAGS	?=	${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sig
> PO_CXXFLAGS	?=	${CXXFLAGS}
> 
> DTRACE		?=	dtrace
> -DTRACEFLAGS	?=	-C -x nolibs
> +DTRACEFLAGS	?=	-C -x nolibs -x libdir=${.OBJDIR}/cddl/lib/drti
> 
> .if empty(.MAKEFLAGS:M-s)
> ECHO		?=	echo

	I was still running into this issue with the dtrace testcases on CURRENT. Once I cleaned out the directories (cddl/…) with make cleandir, things worked — huh… it seems like things are broken in the build system in subtle ways based on this issue and the other libkvm weirdness with rescue/rescue :/..
Thanks,
-NGie
Received on Sun Dec 20 2015 - 01:05:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:01 UTC