NetBSD Problem Report #51389
From www@NetBSD.org Fri Aug 5 15:40:23 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id DEC537A1B1
for <gnats-bugs@gnats.NetBSD.org>; Fri, 5 Aug 2016 15:40:22 +0000 (UTC)
Message-Id: <20160805154021.EE4337A2A9@mollari.NetBSD.org>
Date: Fri, 5 Aug 2016 15:40:21 +0000 (UTC)
From: Antoine.Leca.1@gmail.com
Reply-To: Antoine.Leca.1@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Kyua framework does not build up with traditional /usr/obj
X-Send-Pr-Version: www-1.0
>Number: 51389
>Category: toolchain
>Synopsis: Kyua framework does not build up with traditional /usr/obj
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: jmmv
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 05 15:45:00 +0000 2016
>Closed-Date: Sun Sep 18 07:55:59 +0000 2016
>Last-Modified: Sun Sep 18 07:55:59 +0000 2016
>Originator: Antoine Leca
>Release: 7.0_STABLE
>Organization:
(self) + MINIX
>Environment:
NetBSD localhost 7.0_STABLE NetBSD 7.0_STABLE (NB100) #0: Wed Jul 27 16:59:52 CEST 2016 antoine@localhost:/usr/obj/sys/arch/i386/compile/NB100 i386
>Description:
When the option MKKYUA is activated, and the build is performed to the traditional /usr/obj directory (not using MAKEOBJDIR* or the equivalent build.sh -O), the build fails at external/bsd/kyua-testers/libexec/kyua-atf-tester
Reading the Makefile, we found line 14:
PRIVATELIBDIR!= cd ${.CURDIR}/../../lib; ${PRINTOBJDIR}
and if we look at the corresponding external/bsd/kyua-testers/lib directory, the objdir operation was not performed there so there is no obj symlink in that directory; as a result, after the cd, PRINTOBJDIR returns ${.CURDIR}, which is not the correct place to find the just-compiled libraries.
>How-To-Repeat:
# mkdir /usr/obj && chown user /usr/obj
$ cd /usr/src
$ make MKKYUA=yes obj
. . .
obj ===> external/bsd/kyua-testers
obj ===> external/bsd/kyua-testers/lib
obj ===> external/bsd/kyua-testers/lib/libtester
# objdir /usr/obj/external/bsd/kyua-testers/lib/libtester
obj ===> external/bsd/kyua-testers/lib/libatf_tester
# objdir /usr/obj/external/bsd/kyua-testers/lib/libatf_tester
obj ===> external/bsd/kyua-testers/libexec
obj ===> external/bsd/kyua-testers/libexec/kyua-atf-tester
# objdir /usr/obj/external/bsd/kyua-testers/libexec/kyua-atf-tester
obj ===> external/bsd/kyua-testers/libexec/kyua-plain-tester
# objdir /usr/obj/external/bsd/kyua-testers/libexec/kyua-plain-tester
obj ===> external/bsd/kyua-testers/share
obj ===> external/bsd/kyua-testers/share/doc
obj ===> external/bsd/kyua-testers/share/doc/kyua-testers
# objdir /usr/obj/external/bsd/kyua-testers/share/doc/kyua-testers
. . .
$ make MKKYUA=yes build
. . .
dependall ===> external/bsd/kyua-testers/libexec/kyua-atf-tester
create kyua-atf-tester/atf_main.d
create kyua-atf-tester/.depend
compile kyua-atf-tester/atf_main.o
make[9]: don't know how to make /usr/src/external/bsd/kyua-testers/lib/libatf_tester/libatf_tester.a. Stop
...(make-unwinding)
It just occurs to me that I was using a statically-linked system; I hope this does not affect the problem.
>Fix:
Manually adding the symlink does the trick:
$ cd /usr/src
$ cd external/bsd/kyua-testers/lib
$ ln -s /usr/obj/external/bsd/kyua-testers/lib obj
$ cd -
$ make MKKYUA=yes build
. . . success
The following patch seems to do the work, but I am unsure of the consequences.
diff -u -r1.1 Makefile
--- Makefile 19 Feb 2013 06:04:42 -0000 1.1
+++ Makefile 5 Aug 2016 15:38:19 -0000
@@ -2,4 +2,5 @@
SUBDIR= libtester libatf_tester
+.include <bsd.obj.mk>
.include <bsd.subdir.mk>
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: toolchain-manager->jmmv
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 07 Aug 2016 20:20:24 +0000
Responsible-Changed-Why:
FYI.
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/51389: Kyua framework does not build up with
traditional /usr/obj
Date: Sun, 7 Aug 2016 20:22:18 +0000
On Fri, Aug 05, 2016 at 03:45:00PM +0000, Antoine.Leca.1@gmail.com wrote:
> Reading the Makefile, we found line 14:
>
> PRIVATELIBDIR!= cd ${.CURDIR}/../../lib; ${PRINTOBJDIR}
>
> and if we look at the corresponding external/bsd/kyua-testers/lib
> directory, the objdir operation was not performed there so there is
> no obj symlink in that directory; as a result, after the cd,
> PRINTOBJDIR returns ${.CURDIR}, which is not the correct place to
> find the just-compiled libraries.
It is worse than that; a generic build *outside* of /usr/src that
doesn't set any of the objdir knobs generates a separate objdir in
every source dir, and so the logic will fail completely. One needs to
PRINTOBJDIR separately for every corresponding source directory.
--
David A. Holland
dholland@netbsd.org
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51389 CVS commit: src/external/bsd/kyua-testers
Date: Sun, 7 Aug 2016 20:23:09 +0000
Module Name: src
Committed By: dholland
Date: Sun Aug 7 20:23:09 UTC 2016
Modified Files:
src/external/bsd/kyua-testers/libexec/kyua-atf-tester: Makefile
src/external/bsd/kyua-testers/libexec/kyua-plain-tester: Makefile
src/external/bsd/kyua-testers/tests/kyua-testers: Makefile
Log Message:
Fix wrong objdir-finding logic. PR 51389.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/kyua-testers/libexec/kyua-atf-tester/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/kyua-testers/libexec/kyua-plain-tester/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/kyua-testers/tests/kyua-testers/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 07 Aug 2016 20:49:52 +0000
State-Changed-Why:
please check if that works
From: Antoine LECA <antoine.leca.1@gmail.com>
To: gnats-bugs@NetBSD.org, jmmv@NetBSD.org, netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org, dholland@NetBSD.org
Cc:
Subject: Re: toolchain/51389 (Kyua framework does not build up with
traditional /usr/obj)
Date: Sat, 20 Aug 2016 19:49:25 +0200
> Synopsis: Kyua framework does not build up with traditional /usr/obj
>
> State-Changed-By: dholland@NetBSD.org
> State-Changed-When: Sun, 07 Aug 2016 20:49:52 +0000
> please check if that works
Your patch have a tiny problem, you left the libtester directory name in
the *ADD+=${TESTER_LIBDIR}/libtester/libtester.a lines
^^^^^^^^^^
Once I removed the supplementary directory name (6 times), works for me!
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51389 CVS commit: src/external/bsd/kyua-testers
Date: Fri, 26 Aug 2016 23:55:04 +0000
Module Name: src
Committed By: dholland
Date: Fri Aug 26 23:55:04 UTC 2016
Modified Files:
src/external/bsd/kyua-testers/libexec/kyua-atf-tester: Makefile
src/external/bsd/kyua-testers/libexec/kyua-plain-tester: Makefile
src/external/bsd/kyua-testers/tests/kyua-testers: Makefile
Log Message:
Fix previous. (Sigh.) PR 51389 again.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/kyua-testers/libexec/kyua-atf-tester/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/kyua-testers/libexec/kyua-plain-tester/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/kyua-testers/tests/kyua-testers/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/51389 (Kyua framework does not build up with
traditional /usr/obj)
Date: Fri, 26 Aug 2016 23:57:58 +0000
On Sat, Aug 20, 2016 at 05:50:00PM +0000, Antoine LECA wrote:
> > Synopsis: Kyua framework does not build up with traditional /usr/obj
> >
> > State-Changed-By: dholland@NetBSD.org
> > State-Changed-When: Sun, 07 Aug 2016 20:49:52 +0000
> > please check if that works
>
> Your patch have a tiny problem, you left the libtester directory name in
> the *ADD+=${TESTER_LIBDIR}/libtester/libtester.a lines
> ^^^^^^^^^^
> Once I removed the supplementary directory name (6 times), works for me!
gah. Sorry about that... try again once the next commit trickles through?
--
David A. Holland
dholland@netbsd.org
From: Antoine LECA <antoine.leca.1@gmail.com>
To: gnats-bugs@NetBSD.org, jmmv@NetBSD.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Cc:
Subject: Re: toolchain/51389 (Kyua framework does not build up with
traditional /usr/obj)
Date: Wed, 31 Aug 2016 10:40:12 +0200
> try again once the next commit trickles through?
These ones work for me. OK to close from my side.
Antoine
State-Changed-From-To: feedback->pending-pullups
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 05 Sep 2016 19:25:43 +0000
State-Changed-Why:
pullup-7 #1249
From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51389 CVS commit: [netbsd-7] src/external/bsd/kyua-testers
Date: Sun, 18 Sep 2016 06:14:01 +0000
Module Name: src
Committed By: snj
Date: Sun Sep 18 06:14:01 UTC 2016
Modified Files:
src/external/bsd/kyua-testers/libexec/kyua-atf-tester [netbsd-7]:
Makefile
src/external/bsd/kyua-testers/libexec/kyua-plain-tester [netbsd-7]:
Makefile
src/external/bsd/kyua-testers/tests/kyua-testers [netbsd-7]: Makefile
Log Message:
Pull up following revision(s) (requested by dholland in ticket #1249):
external/bsd/kyua-testers/libexec/kyua-atf-tester/Makefile: revision 1.2, 1.3
external/bsd/kyua-testers/libexec/kyua-plain-tester/Makefile: revision 1.2, 1.3
external/bsd/kyua-testers/tests/kyua-testers/Makefile: revision 1.2, 1.3
Fix wrong objdir-finding logic. PR 51389.
--
Fix previous. (Sigh.) PR 51389 again.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.14.1 \
src/external/bsd/kyua-testers/libexec/kyua-atf-tester/Makefile
cvs rdiff -u -r1.1 -r1.1.14.1 \
src/external/bsd/kyua-testers/libexec/kyua-plain-tester/Makefile
cvs rdiff -u -r1.1 -r1.1.14.1 \
src/external/bsd/kyua-testers/tests/kyua-testers/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 18 Sep 2016 07:55:59 +0000
State-Changed-Why:
pulled up to -7.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.