pkgsrc-Bugs archive

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

Re: pkg/44716: x11/qt4-libs fails to build on Darwin due to qmake segfault



The following reply was made to PR pkg/44716; it has been noted by GNATS.

From: Richard Hansen <rhansen%bbn.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/44716: x11/qt4-libs fails to build on Darwin due to qmake
 segfault
Date: Sun, 13 Mar 2011 19:52:23 -0400

 This is a multi-part message in MIME format.
 --------------030706060902010808050609
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Attached is a patch that fixes the problem for qt4-libs.  I'm not sure 
 if it's the correct way to fix the problem for this package.
 
 However, the problem is bigger than x11/qt4-libs.  When '-O2' or '-Os' 
 is passed to gcc, devel/orc, multimedia/gst-plugins0.10-base, 
 multimedia/xine-lib, and probably many others fail to build.  Thus, I'm 
 attaching a second patch to tweak pkgtools/bootstrap-mk-files to use 
 '-O1' instead of '-O2' for Darwin.
 
 --------------030706060902010808050609
 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
  name="fix-x11-qt4-libs-build-for-Darwin-32-bit.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="fix-x11-qt4-libs-build-for-Darwin-32-bit.patch"
 
 From d021b41b182f48c53f1b06cfff478b8815b606f3 Mon Sep 17 00:00:00 2001
 From: Richard Hansen <rhansen%bbn.com@localhost>
 Date: Sun, 13 Mar 2011 00:06:36 -0500
 Subject: [PATCH] fix x11/qt4-libs build for Darwin 32-bit
 
 ---
  x11/qt4-libs/Makefile.common |   10 +++++++++-
  1 files changed, 9 insertions(+), 1 deletions(-)
 
 diff --git a/x11/qt4-libs/Makefile.common b/x11/qt4-libs/Makefile.common
 index 10785c0..d491057 100644
 --- a/x11/qt4-libs/Makefile.common
 +++ b/x11/qt4-libs/Makefile.common
 @@ -29,7 +29,6 @@ QTPREFIX=            ${PREFIX}/qt4
  # libphonon is available in multimedia/phonon
  CONFIGURE_ARGS+=      -no-phonon
  CONFIGURE_ARGS+=      -no-phonon-backend
 -CONFIGURE_ARGS+=      -optimized-qmake
  CONFIGURE_ARGS+=      -prefix "${QTPREFIX}"
  CONFIGURE_ARGS+=      -qt-gif # qt4 does not write compressed GIFs
  CONFIGURE_ARGS.SunOS+=        -no-xrender
 @@ -40,6 +39,15 @@ OPSYSVARS+=         CONFIGURE_ARGS
  
  .include "../../mk/bsd.prefs.mk"
  
 +.if ${OPSYS} == "Darwin" && ${ABI} == "32"
 +# qmake segfaults on Darwin 32-bit if optimized with -O2; see PR#44716
 +CONFIGURE_ARGS+=      -no-optimized-qmake
 +CFLAGS+=              -O1
 +CXXFLAGS+=            -O1
 +.else
 +CONFIGURE_ARGS+=      -optimized-qmake
 +.endif
 +
  .if !empty(MAKE_JOBS)
  CONFIGURE_ENV+=               MAKE_FLAGS=-j${MAKE_JOBS:Q}
  .endif
 -- 
 1.7.4.1
 
 
 --------------030706060902010808050609
 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
  name="use-O1-instead-of-O2-on-Darwin-due-to-buggy-compiler.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename*0="use-O1-instead-of-O2-on-Darwin-due-to-buggy-compiler.patch"
 
 From 6ce46f98b3377b8c5cbf28fb25f25872fed5f55b Mon Sep 17 00:00:00 2001
 From: Richard Hansen <rhansen%bbn.com@localhost>
 Date: Sun, 13 Mar 2011 19:05:39 -0400
 Subject: [PATCH] use '-O1' instead of '-O2' on Darwin due to buggy compiler
 
 ---
  pkgtools/bootstrap-mk-files/Makefile               |    2 +-
  .../bootstrap-mk-files/files/mods/Darwin.sys.mk    |    4 +++-
  2 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/pkgtools/bootstrap-mk-files/Makefile 
b/pkgtools/bootstrap-mk-files/Makefile
 index f14ace7..9d90101 100644
 --- a/pkgtools/bootstrap-mk-files/Makefile
 +++ b/pkgtools/bootstrap-mk-files/Makefile
 @@ -1,7 +1,7 @@
  # $NetBSD: Makefile,v 1.24 2010/01/15 22:00:36 abs Exp $
  
  DISTNAME=     bootstrap-mk-files-20090807
 -PKGREVISION=  2
 +PKGREVISION=  3
  CATEGORIES=   pkgtools
  MASTER_SITES= # empty
  DISTFILES=    # empty
 diff --git a/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk 
b/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk
 index 4ee8144..b775b09 100644
 --- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk
 +++ b/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk
 @@ -25,7 +25,9 @@ CC?=         gcc
  .else
  CC?=          cc
  .endif
 -DBG?=         -O2
 +# the gcc compiler in Xcode 3.2 is buggy and sometimes fails to
 +# produce correct code when ABI=32 and -O2
 +DBG?=         -O1
  CFLAGS?=      -pipe ${DBG}
  COMPILE.c?=   ${CC} ${CFLAGS} ${CPPFLAGS} -c
  LINK.c?=      ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
 -- 
 1.7.4.1
 
 
 --------------030706060902010808050609--
 


Home | Main Index | Thread Index | Old Index