NetBSD Problem Report #47203

From www@NetBSD.org  Fri Nov 16 22:49:19 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id C08E563E8E1
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 16 Nov 2012 22:49:18 +0000 (UTC)
Message-Id: <20121116224917.7186163E8E1@www.NetBSD.org>
Date: Fri, 16 Nov 2012 22:49:17 +0000 (UTC)
From: jwbacon@tds.net
Reply-To: jwbacon@tds.net
To: gnats-bugs@NetBSD.org
Subject: x11/qt4-libs build fails on RHEL 5
X-Send-Pr-Version: www-1.0

>Number:         47203
>Category:       pkg
>Synopsis:       x11/qt4-libs build fails on RHEL 5
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 16 22:50:00 +0000 2012
>Originator:     Jason Bacon
>Release:        6.0
>Organization:
Acadix Consulting, LLC
>Environment:
Linux compute-4-07.hpc.local.uwm 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
>Description:
In the process of developing a FEniCS package, I ran into problems building qt4-lib on RHEL 5.3.

The attached patch file contains a workaround with comments.  I'm not 100% sure it's safe to assume that the constants pulled from futex.h will remain unchanged, so it might be a good idea to wrap the patch with a kernel version check.  This might be easier in the package Makefile using ${OS_VERSION} than it is in the source file.

>How-To-Repeat:
Try to build qt4-libs on RHEL 5.3.
>Fix:
--- src/corelib/thread/qmutex_unix.cpp.orig	2012-09-10 20:36:50.000000000 -0500
+++ src/corelib/thread/qmutex_unix.cpp	2012-11-15 07:41:51.000000000 -0600
@@ -57,7 +57,12 @@
 # include <mach/mach.h>
 # include <mach/task.h>
 #elif defined(Q_OS_LINUX)
-# include <linux/futex.h>
+// linux/futex.h does not work on older kernels, such as in RHEL 5
+// Replace with #defines below
+// https://bugreports.qt-project.org/browse/QTBUG-19565
+// #include <linux/futex.h>
+# define FUTEX_WAIT 0
+# define FUTEX_WAKE 1
 # include <sys/syscall.h>
 # include <unistd.h>
 # include <QtCore/qelapsedtimer.h>

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.