NetBSD Problem Report #53197

From www@NetBSD.org  Wed Apr 18 21:00:37 2018
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 673687A103
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 18 Apr 2018 21:00:37 +0000 (UTC)
Message-Id: <20180418210036.0029C7A1FB@mollari.NetBSD.org>
Date: Wed, 18 Apr 2018 21:00:35 +0000 (UTC)
From: mikeowens@gmail.com
Reply-To: mikeowens@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Qt5 5.10.1 compile failure (patch) for Illumos
X-Send-Pr-Version: www-1.0

>Number:         53197
>Category:       pkg
>Synopsis:       Qt5 5.10.1 compile failure (patch) for Illumos
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 18 21:05:00 +0000 2018
>Closed-Date:    Thu Apr 19 08:25:08 +0000 2018
>Last-Modified:  Thu Apr 19 08:35:01 +0000 2018
>Originator:     MIke Owens
>Release:        pkgsrc-2018Q1
>Organization:
>Environment:
SunOS dev 5.11 omnios-r151024-70c39e6e15 i86pc i386 i86pc Solaris
>Description:
The compile fails due to a simple setting in the src/corelib/global/qglobal.h file. This has been reported, fixed and merged into the Qt 5.11 branch. 

The fix is a one-line change and could be easily added as a patch to the current qt5 package in pkgsrc which would enable the build to work on Illumos.

The fix is here:

https://codereview.qt-project.org/#/c/221071/3/src/corelib/global/qglobal.h,unified

The Qt PR is here:

https://codereview.qt-project.org/#/c/221071/


>How-To-Repeat:
On Illumos (SmartOS or OmniOS with pkgsrc installed on /opt/pkgsrc):

cd /opt/pkgsrc/x11/qt5
bmake
>Fix:
Change src/corelib/global/qglobal.h as follows:

iff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index aa94462..cd4b4a2 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -542,21 +542,21 @@
542	542	 #  define Q_NEVER_INLINE __declspec(noinline)
543	543	 #  define Q_ALWAYS_INLINE __forceinline
544	544	 #elif defined(Q_CC_GNU)
545	545	 #  define Q_NEVER_INLINE __attribute__((noinline))
546	546	 #  define Q_ALWAYS_INLINE inline __attribute__((always_inline))
547	547	 #else
548	548	 #  define Q_NEVER_INLINE
549	549	 #  define Q_ALWAYS_INLINE inline
550	550	 #endif
551	551	 
	552     -#ifdef Q_CC_GNU
552	        +#if defined(Q_CC_GNU) && defined(Q_OS_WIN)
553	553	 #  define QT_INIT_METAOBJECT __attribute__((init_priority(101)))
554	554	 #else
555	555	 #  define QT_INIT_METAOBJECT
556	556	 #endif
557	557	 
558	558	 //defines the type for the WNDPROC on windows
559	559	 //the alignment needs to be forced for sse2 to not crash with mingw
560	560	 #if defined(Q_OS_WIN)
561	561	 #  if defined(Q_CC_MINGW) && !defined(Q_OS_WIN64)
562	562	 #    define QT_ENSURE_STACK_ALIGNED_FOR_SSE __attribute__ ((force_align_arg_pointer))

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: jperkin@NetBSD.org
State-Changed-When: Thu, 19 Apr 2018 08:25:08 +0000
State-Changed-Why:
Patch applied, thanks!


From: "Jonathan Perkin" <jperkin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53197 CVS commit: pkgsrc/x11/qt5-qtbase
Date: Thu, 19 Apr 2018 08:23:12 +0000

 Module Name:	pkgsrc
 Committed By:	jperkin
 Date:		Thu Apr 19 08:23:12 UTC 2018

 Modified Files:
 	pkgsrc/x11/qt5-qtbase: distinfo
 Added Files:
 	pkgsrc/x11/qt5-qtbase/patches: patch-src_corelib_global_qglobal.h

 Log Message:
 qt5: Pull in upstream fix for init_priority.

 Fixes PR#53197 from Mike Owens.


 To generate a diff of this commit:
 cvs rdiff -u -r1.39 -r1.40 pkgsrc/x11/qt5-qtbase/distinfo
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/x11/qt5-qtbase/patches/patch-src_corelib_global_qglobal.h

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.