NetBSD Problem Report #52309

From tsutsui@ceres.dti.ne.jp  Sun Jun 18 13:21:14 2017
Return-Path: <tsutsui@ceres.dti.ne.jp>
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 410F57A1B9
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 18 Jun 2017 13:21:14 +0000 (UTC)
Message-Id: <201706181321.v5IDL6vI006973@ceres.dti.ne.jp>
Date: Sun, 18 Jun 2017 22:21:06 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: firefox 54.0 build fails on NetBSD 7.1
X-Send-Pr-Version: 3.95

>Number:         52309
>Category:       pkg
>Synopsis:       firefox 54.0 build fails on NetBSD/i386 7.1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ryoon
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 18 13:25:00 +0000 2017
>Closed-Date:    Sun Jul 02 07:10:47 +0000 2017
>Last-Modified:  Sun Jul 02 07:10:47 +0000 2017
>Originator:     Izumi Tsutsui
>Release:        NetBSD 7.1 + pkgsrc HEAD
>Organization:
>Environment:
System: NetBSD 7.1
Architecture: i386
Machine: i386
>Description:
Building recently updated firefox 54.0 fails on NetBSD/i386 7.1:

> [...]/firefox-54.0/ipc/chromium/src/base/lock_impl_posix.cc:35:46: error: 'PTHREAD_PRIO_INHERIT' was not declared in this scope

It looks NetBSD -current (and netbsd-8) has PTHREAD_PRIO_INHERIT
in <pthread.h> but 7.1 doesn't.
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libpthread/pthread.h#rev1.37

>How-To-Repeat:
Build pkgsrc HEAD firefox 54.0 on NetBSD/i386 7.1.

>Fix:
The lock_impl_posix.cc seems to have ifdef to disable
PRIORITY_INHERITANCE_LOCKS.

Disabling it (via patch-ipc_chromium_src_base_lock__impl__posix.cc)
on NetBSD without PTHREAD_PRIO_INHERIT works around.

---
$NetBSD$

- Fix build on NetBSD 7.1 (which doesn't have PTHREAD_PRIO_INHERIT)

--- ipc/chromium/src/base/lock_impl_posix.cc.orig	2017-06-05 20:45:20.000000000 +0000
+++ ipc/chromium/src/base/lock_impl_posix.cc
@@ -20,7 +20,7 @@ namespace internal {
 // Lock::PriorityInheritanceAvailable still must be checked as the code may
 // compile but the underlying platform still may not correctly support priority
 // inheritance locks.
-#if defined(OS_NACL) || defined(OS_ANDROID)
+#if defined(OS_NACL) || defined(OS_ANDROID) || (defined(__NetBSD__) && !defined(PTHREAD_PRIO_INHERIT))
 #define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 0
 #else
 #define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 1

---

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Sun, 18 Jun 2017 13:32:34 +0000
Responsible-Changed-Why:
Ryo, can you please give it a look?
(over to MAINTAINER)


From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52309 CVS commit: pkgsrc/www/firefox
Date: Fri, 30 Jun 2017 16:36:19 +0000

 Module Name:	pkgsrc
 Committed By:	tsutsui
 Date:		Fri Jun 30 16:36:19 UTC 2017

 Modified Files:
 	pkgsrc/www/firefox: distinfo
 Added Files:
 	pkgsrc/www/firefox/patches:
 	    patch-ipc_chromium_src_base_lock__impl__posix.cc

 Log Message:
 Fix build on NetBSD 7.1.  PR/52309


 To generate a diff of this commit:
 cvs rdiff -u -r1.283 -r1.284 pkgsrc/www/firefox/distinfo
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/www/firefox/patches/patch-ipc_chromium_src_base_lock__impl__posix.cc

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

State-Changed-From-To: open->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 02 Jul 2017 07:10:47 +0000
State-Changed-Why:
Fix applied.


>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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.