NetBSD Problem Report #52812

From www@NetBSD.org  Tue Dec 12 17:39:19 2017
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id CD7A17A1E3
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 12 Dec 2017 17:39:19 +0000 (UTC)
Message-Id: <20171212173911.1551C7A1F3@mollari.NetBSD.org>
Date: Tue, 12 Dec 2017 17:39:11 +0000 (UTC)
From: scole_mail@gmx.com
Reply-To: scole_mail@gmx.com
To: gnats-bugs@NetBSD.org
Subject: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
X-Send-Pr-Version: www-1.0

>Number:         52812
>Category:       kern
>Synopsis:       src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 12 17:40:00 +0000 2017
>Closed-Date:    Tue Dec 12 21:33:25 +0000 2017
>Last-Modified:  Tue Dec 12 21:33:25 +0000 2017
>Originator:     scole_mail
>Release:        current
>Organization:
none
>Environment:
NetBSD dstar 7.1.0_PATCH NetBSD 7.1.0_PATCH (GENERIC) #1: Wed Nov 29 14:17:46 PST 2017  scole@dstar:/home/scole/nbsd/cvs/7_0/obj/sys/arch/i386/compile/GENERIC i386
>Description:
ia64 can't build rump and currently has MKRUMP=no.  If a distribution or release is attempted to be built it fails with:

t_timeleft.o: In function `tester':
/usr/src/tests/kernel/t_timeleft.c:92: undefined reference to `pthread_create'
/usr/src/tests/kernel/t_timeleft.c:95: undefined reference to `pthread_kill'
collect2: error: ld returned 1 exit status

The attached patch worked for me, but someone who understand the test framework better should look at this.

Thanks

>How-To-Repeat:
build a distribution or release with MKRUMP=no
>Fix:
Apply patch with "cd .../src/tests/kernel ; patch -s -p0 < .../patchfile"

Index: Makefile
===================================================================
RCS file: /cvsroot/src/tests/kernel/Makefile,v
retrieving revision 1.50
diff -b -u -r1.50 Makefile
--- Makefile	10 Dec 2017 15:37:54 -0000	1.50
+++ Makefile	12 Dec 2017 17:23:04 -0000
@@ -46,9 +46,8 @@
 LDADD.t_filedesc+=  ${LDADD.t_rnd}
 LDADD.t_rnd+=  -lrumpvfs -lrumpdev_rnd -lrumpdev -lrump -lrumpuser
 LDADD.t_rnd+=  -lrump -lpthread
-LDADD.t_timeleft+=	-lpthread
-
 .endif
+LDADD.t_timeleft+=	-lpthread

 CPPFLAGS+=	-D_KERNTYPES

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52812 CVS commit: src/tests/kernel
Date: Tue, 12 Dec 2017 13:19:45 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Tue Dec 12 18:19:45 UTC 2017

 Modified Files:
 	src/tests/kernel: Makefile

 Log Message:
 PR/52812: scole_mail: src/tests/kernel/t_timeleft.c doesn't compile with MKRUMP=no
 It needs libpthread regardless MKRUMP..


 To generate a diff of this commit:
 cvs rdiff -u -r1.50 -r1.51 src/tests/kernel/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/52812 CVS commit: src/tests/kernel
Date: Tue, 12 Dec 2017 13:10:26 -0800

 That update worked for me.  This PR can be closed from my point of view.

 Thanks

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 12 Dec 2017 21:33:25 +0000
State-Changed-Why:
Confirmed fixed, thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.