NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/51389: Kyua framework does not build up with traditional /usr/obj



>Number:         51389
>Category:       toolchain
>Synopsis:       Kyua framework does not build up with traditional /usr/obj
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 05 15:45:00 +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>



Home | Main Index | Thread Index | Old Index