Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Dec 2015 18:05:09 -0800
From:      NGie Cooper <yaneurabeya@gmail.com>
To:        Mark Johnston <markj@FreeBSD.org>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>, Bryan Drewery <bdrewery@freebsd.org>
Subject:   Re: Build error on i386 when building dtrace tests
Message-ID:  <6ABCF474-EFF6-493F-ADE3-88A8D7F7186D@gmail.com>
In-Reply-To: <20151220015735.GA48337@charmander>
References:  <468DF7A4-47F9-4460-A41F-226A799EA645@gmail.com> <20151220015735.GA48337@charmander>

next in thread | previous in thread | raw e-mail | index | archive | help
(fixed the subject line again..)

> On Dec 19, 2015, at 17:57, Mark Johnston <markj@FreeBSD.org> wrote:
>=20
> 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) =E2=80=94 =
have you seen this issue before?
>=20
> 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.
>=20
> 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
> @@ -30,6 +30,8 @@ SRCS.${prog}+=3D ${prog:S/.exe$/.c/}
>=20
> .if exists(${prog:S/^tst.//:S/.exe$/.d/})
> SRCS.${prog}+=3D	${prog:S/^tst.//:S/.exe$/.d/}
> +LDADD.${prog}+=3D -lelf
> +DPADD.${prog}+=3D ${LIBELF}
> .endif
> .endfor
>=20
> 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
> @@ -128,7 +128,7 @@ CXXFLAGS	?=3D	=
${CFLAGS:N-std=3D*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sig
> PO_CXXFLAGS	?=3D	${CXXFLAGS}
>=20
> DTRACE		?=3D	dtrace
> -DTRACEFLAGS	?=3D	-C -x nolibs
> +DTRACEFLAGS	?=3D	-C -x nolibs -x libdir=3D${.OBJDIR}/cddl/lib/drti
>=20
> .if empty(.MAKEFLAGS:M-s)
> ECHO		?=3D	echo

	I was still running into this issue with the dtrace testcases on =
CURRENT. Once I cleaned out the directories (cddl/=E2=80=A6) with make =
cleandir, things worked =E2=80=94 huh=E2=80=A6 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=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6ABCF474-EFF6-493F-ADE3-88A8D7F7186D>