NetBSD Problem Report #44236
From www@NetBSD.org Wed Dec 15 18:37:15 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 2778163B886
for <gnats-bugs@gnats.NetBSD.org>; Wed, 15 Dec 2010 18:37:15 +0000 (UTC)
Message-Id: <20101215183714.C75F263B883@www.NetBSD.org>
Date: Wed, 15 Dec 2010 18:37:14 +0000 (UTC)
From: tez@netbsd.org
Reply-To: tez@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: gcc44 bug causing latest ImageMagick build failure on Solaris
X-Send-Pr-Version: www-1.0
>Number: 44236
>Category: pkg
>Synopsis: gcc44 bug causing latest ImageMagick build failure on Solaris
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 15 18:40:00 +0000 2010
>Closed-Date: Sun Jul 22 06:12:46 +0000 2018
>Last-Modified: Sun Jul 22 06:12:46 +0000 2018
>Originator: Tim
>Release: pkgrsc HEAD
>Organization:
>Environment:
SunOS 5.10 Generic_144488-02 sun4u sparc SUNW,Sun-Fire-V440 Solaris
>Description:
To get the latest ImageMagick package to build, I had to hack around this bug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41169
The hack I used was to copy /usr/include/complex.h to /usr/pkg/gcc44/lib/gcc/sparc-sun-solaris2.10/4.4.4/include-fixed/
and apply the following patch:
--- /usr/include/complex.h 2004-11-23 17:11:26.000000000 -0600
+++ /usr/pkg/gcc44/lib/gcc/sparc-sun-solaris2.10/4.4.4/include-fixed/complex.h 2010-12-15 11:40:50.803494200 -0600
@@ -14,12 +14,10 @@
* Compilation environments for Solaris must provide the _Imaginary datatype
* and the compiler intrinsics _Complex_I and _Imaginary_I
*/
-#define _Complex_I _Complex_I
+#define _Complex_I (__extension__ 1.0iF)
#define complex _Complex
-#define _Imaginary_I _Imaginary_I
-#define imaginary _Imaginary
#undef I
-#define I _Imaginary_I
+#define I _Complex_I
extern float cabsf(float complex);
extern float cargf(float complex);
Without the hack, the build fails like this:
CC magick/magick_libMagickCore_la-fourier.lo
magick/fourier.c: In function 'InverseFourier':
magick/fourier.c:1016: error: '_Imaginary_I' undeclared (first use in this function)
magick/fourier.c:1016: error: (Each undeclared identifier is reported only once
magick/fourier.c:1016: error: for each function it appears in.)
gmake[1]: *** [magick/magick_libMagickCore_la-fourier.lo] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/graphics/ImageMagick/work/ImageMagick-6.6.6-5'
gmake: *** [all] Error 2
*** Error code 2
Stop.
bmake: stopped in /usr/pkgsrc/graphics/ImageMagick
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/graphics/ImageMagick
>How-To-Repeat:
cd pkgsrc/graphics/ImageMagick
bmake
>Fix:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41169
>Release-Note:
>Audit-Trail:
From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/44236
Date: Tue, 04 Jan 2011 09:26:48 +0100
This bug is not only related to gcc44. I get the same error with lang/gcc34.
And I think it would be much better if ImageMagick would work around
this bug. As far as I understand the thread on gcc.gnu.org, complex
arithmetic is not standardized anyway.
As a workaround, this patch
--- Makefile 2011/01/04 07:56:21 1.1
+++ Makefile 2011/01/04 07:56:38
@@ -19,6 +19,7 @@
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --disable-assert
CONFIGURE_ARGS+= --with-fontconfig
+CONFIGURE_ARGS+= --without-fftw
PKGCONFIG_OVERRIDE= Magick++/lib/ImageMagick++.pc.in
PKGCONFIG_OVERRIDE+= magick/ImageMagick.pc.in
seems to exclude the problematic code. Maybe there is a more
fine-grained check in configure, but I prefer this to meddling around
with GCC header files. The above patch has to be enclosed in reasonable
conditionals, of course.
--
Jörn Clausen joern.clausen@uni-bielefeld.de
Hochschulrechenzentrum http://www.uni-bielefeld.de/hrz/
Universität Bielefeld
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 22 Jul 2018 06:12:46 +0000
State-Changed-Why:
GCC bug was resolved fixed upstream and a backport was done for 4.4.x. At this point it doesn't make sense to implement a hack workaround for it. All realistically used GCC versions will have the fix. Thanks for the report.
>Unformatted:
(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.