From nobody@FreeBSD.org  Fri May 25 12:52:50 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A743B16A46B
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 May 2007 12:52:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 7DCC013C4BA
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 May 2007 12:52:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l4PCqopd025310
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 May 2007 12:52:50 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l4PCqonk025309;
	Fri, 25 May 2007 12:52:50 GMT
	(envelope-from nobody)
Message-Id: <200705251252.l4PCqonk025309@www.freebsd.org>
Date: Fri, 25 May 2007 12:52:50 GMT
From: Hyogeol Lee<hyogeollee@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: graphics/xfig, graphics/xfig-devel build broken in -current with GCC 4.2
X-Send-Pr-Version: www-3.0

>Number:         112990
>Category:       ports
>Synopsis:       graphics/xfig, graphics/xfig-devel build broken in -current with GCC 4.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 25 13:00:11 GMT 2007
>Closed-Date:    Wed Jun 06 14:27:42 GMT 2007
>Last-Modified:  Wed Jun  6 14:30:08 GMT 2007
>Originator:     Hyogeol Lee
>Release:        -current 7.0
>Organization:
>Environment:
FreeBSD localhost.localdomain 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Fri May 25 02:23:16 KST 2007     ez8@localhost.localdomain:/usr/obj/elftoolchain/usr/src/sys/EZ8KERNEL  amd64

>Description:
graphics/xfig, graphics/xfig-devel build broken in -current with GCC 4.2 

because of early extern declaration.

Error message is below.

cc -c -O2 -pipe -fno-strict-aliasing -march=athlon64      -I/usr/local/include -I/usr/local/include/libpng -I/usr/local/include/X11 -I/usr/local/include/X11/Xaw3d -I/usr/local/include    -DCSRG_BASED  -DFUNCPROTO=15 -DNARROWPROTO                            -DUSE_INLINE -DUSE_XPM -DXAW3D                         -DUSE_JPEG -DI18N                        -DWHEELMOUSE    d_text.c
In file included from d_text.c:26:
u_fonts.h:35: error: array type has incomplete element type
u_fonts.h:35: error: array type has incomplete element type
u_fonts.h:36: error: array type has incomplete element type
u_fonts.h:37: error: array type has incomplete element type
*** Error code 1

>How-To-Repeat:
Build graphics/xfig, graphics/xfig-devel in -current with GCC 4.2
>Fix:
I attached patch file, and that patch file can works with both ports xfig,

xfig-devel.


Patch attached with submission follows:

--- u_fonts.h.orig	Fri May 25 21:39:29 2007
+++ u_fonts.h	Fri May 25 21:40:07 2007
@@ -32,9 +32,6 @@
 
 extern int		psfontnum();
 extern int		latexfontnum();
-extern struct _xfstruct	x_fontinfo[], x_backup_fontinfo[];
-extern struct _fstruct	ps_fontinfo[];
-extern struct _fstruct	latex_fontinfo[];
 
 /* element of linked list for each font
    The head of list is for the different font NAMES,
@@ -60,6 +57,10 @@
     struct xfont   *xfontlist;	/* linked list of X fonts for different point
 				 * sizes */
 };
+
+extern struct _xfstruct	x_fontinfo[], x_backup_fontinfo[];
+extern struct _fstruct	ps_fontinfo[];
+extern struct _fstruct	latex_fontinfo[];
 
 int		x_fontnum();
 #endif /* U_FONTS_H */


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Tue May 29 15:09:10 UTC 2007 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112990 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Wed Jun 6 14:27:41 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112990 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/112990: commit references a PR
Date: Wed,  6 Jun 2007 14:27:36 +0000 (UTC)

 miwi        2007-06-06 14:27:30 UTC
 
   FreeBSD ports repository
 
   Added files:
     graphics/xfig/files  patch-u_fonts.h 
     graphics/xfig-devel/files patch-u_fonts.h 
   Log:
   - Fix build with gcc 4.2
   
   PR:             112990
   Submitted by:   Hyogeol Lee <hyogeollee@gmail.com>
   
   Revision  Changes    Path
   1.1       +32 -0     ports/graphics/xfig-devel/files/patch-u_fonts.h (new)
   1.1       +32 -0     ports/graphics/xfig/files/patch-u_fonts.h (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
