NetBSD Problem Report #46586

From www@NetBSD.org  Mon Jun 11 14:56:27 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 9D5EA63B89C
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 11 Jun 2012 14:56:27 +0000 (UTC)
Message-Id: <20120611145626.F41C863B882@www.NetBSD.org>
Date: Mon, 11 Jun 2012 14:56:26 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: libXt regression?
X-Send-Pr-Version: www-1.0

>Number:         46586
>Category:       pkg
>Synopsis:       libXt regression?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 11 15:00:00 +0000 2012
>Closed-Date:    Wed Sep 05 16:50:25 +0000 2012
>Last-Modified:  Wed Sep 05 16:50:25 +0000 2012
>Originator:     Jörn Clausen
>Release:        
>Organization:
University of Bielefeld
>Environment:
>Description:
Compiling graphics/plotutils fails with

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I./../include -DLIBPLOT -DLIBPLOTTER -I/pkgsrc/source/pkgsrc/graphics/plotutils/work.pkgsrc-i86/.buildlink/include -O -MT apioldcc.lo -MD -MP -MF .deps/apioldcc.Tpo -c apioldcc.cc  -fPIC -DPIC -o .libs/apioldcc.o
In file included from ./../include/plotter.h:68:0,
                 from extern.h:63,
                 from apioldcc.cc:37:
/pkgsrc/source/pkgsrc/graphics/plotutils/work.pkgsrc-i86/.buildlink/include/X11/Intrinsic.h:1863:37: error: expected ',' or '...' before 'format'
/pkgsrc/source/pkgsrc/graphics/plotutils/work.pkgsrc-i86/.buildlink/include/X11/Intrinsic.h:1865:3: error: args to be formatted is not '...'
*** Error code 1

Environment is Solaris 10/i86 with stand-alone GCC 4.7.0.

I guess graphics/plotutils is just a coincidence, the update of x11/libXt is probably the cause. Version 1.0.8 did work, current version 1.1.3 has this problem. Due to the trouble with X11 (-errwarn et al.) on NetBSD, I can't check there.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/46586: libXt regression?
Date: Mon, 11 Jun 2012 17:09:23 +0200

 On Mon, Jun 11, 2012 at 03:00:01PM +0000, joern.clausen@uni-bielefeld.de wrote:
 > Due to the trouble with X11 (-errwarn et al.) on NetBSD, I can't check there.

 This problem is fixed.
  Thomas

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/46586: libXt regression?
Date: Mon, 11 Jun 2012 17:18:27 +0200

 I've just successfully compiled plotutils on NetBSD-6.99.7/amd64 with
 modular X from pkgsrc (and clang).
  Thomas

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/46586: libXt regression?
Date: Mon, 11 Jun 2012 17:20:58 +0200

 On Mon, Jun 11, 2012 at 03:00:01PM +0000, joern.clausen@uni-bielefeld.de wrote:
 > libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I./../include -DLIBPLOT -DLIBPLOTTER -I/pkgsrc/source/pkgsrc/graphics/plotutils/work.pkgsrc-i86/.buildlink/include -O -MT apioldcc.lo -MD -MP -MF .deps/apioldcc.Tpo -c apioldcc.cc  -fPIC -DPIC -o .libs/apioldcc.o
 > In file included from ./../include/plotter.h:68:0,
 >                  from extern.h:63,
 >                  from apioldcc.cc:37:
 > /pkgsrc/source/pkgsrc/graphics/plotutils/work.pkgsrc-i86/.buildlink/include/X11/Intrinsic.h:1863:37: error: expected ',' or '...' before 'format'
 > /pkgsrc/source/pkgsrc/graphics/plotutils/work.pkgsrc-i86/.buildlink/include/X11/Intrinsic.h:1865:3: error: args to be formatted is not '...'
 > *** Error code 1

 For me, the lines are:
     #ifndef _X_RESTRICT_KYWD
     # define _X_RESTRICT_KYWD
     #endif
     extern Cardinal XtAsprintf(
         String *new_string,
 1863	_Xconst char * _X_RESTRICT_KYWD format,
  	...
     ) _X_ATTRIBUTE_PRINTF(2,3);

     #ifdef XTTRACEMEMORY

 To what is _X_RESTRICT_KYWD expanded for you?
  Thomas

From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: Thomas Klausner <wiz@NetBSD.org>, pkg-manager@NetBSD.org,
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/46586: libXt regression?
Date: Tue, 12 Jun 2012 13:29:13 +0200

 >   To what is _X_RESTRICT_KYWD expanded for you?

 Probably to "restrict". I replaced the macro manually with 
 "__restrict__" and the empty string. Both versions were accepted by the 
 compiler. Only with "restrict" I got the error.

 But I have no idea if the definition of X_RESTRICT_KYWD in 
 X11/Xfuncproto.h has to be fixed for GCC 4.7.0, or what else the correct 
 solution would be.

 -- 
   Jörn Clausen                             joern.clausen@uni-bielefeld.de
   Hochschulrechenzentrum                 http://www.uni-bielefeld.de/hrz/
   Universität Bielefeld

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/46586: libXt regression?
Date: Tue, 12 Jun 2012 13:42:12 +0200

 On Tue, Jun 12, 2012 at 01:29:13PM +0200, Jörn Clausen wrote:
 > Probably to "restrict". I replaced the macro manually with
 > "__restrict__" and the empty string. Both versions were accepted by
 > the compiler. Only with "restrict" I got the error.
 > 
 > But I have no idea if the definition of X_RESTRICT_KYWD in
 > X11/Xfuncproto.h has to be fixed for GCC 4.7.0, or what else the
 > correct solution would be.

 xproto-7.0.23 grew the following lines (compared to the previous 7.0.18):
 > /* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */
 > /* requires xproto >= 7.0.21 */
 > #ifndef _X_RESTRICT_KYWD
 > # if defined(restrict) /* assume autoconf set it correctly */ || \
 >    (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */
 > #  define _X_RESTRICT_KYWD  restrict
 > # elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
 > #  define _X_RESTRICT_KYWD __restrict__
 > # else
 > #  define _X_RESTRICT_KYWD
 > # endif
 > #endif

 Can you find an appropriate change for these lines that fixes the issue?

 Or should we open a bug report with the Xorg people immediately and
 ask them to fix it?
  Thomas

From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: Thomas Klausner <wiz@NetBSD.org>, pkg-manager@NetBSD.org,
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/46586: libXt regression?
Date: Tue, 12 Jun 2012 14:53:20 +0200

 >   Can you find an appropriate change for these lines that fixes the issue?

 No way!

 >   Or should we open a bug report with the Xorg people immediately and
 >   ask them to fix it?

 That's probably the best way. If I had any clue how to answer the first 
 question, I would do it myself, but IMHO someone with a little bit more 
 knowledge about C standards and their implementation in compilers is 
 needed here.

 -- 
   Jörn Clausen                             joern.clausen@uni-bielefeld.de
   Hochschulrechenzentrum                 http://www.uni-bielefeld.de/hrz/
   Universität Bielefeld

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/46586: libXt regression?
Date: Tue, 12 Jun 2012 15:17:32 +0200

 On Tue, Jun 12, 2012 at 02:53:20PM +0200, Jörn Clausen wrote:
 > >  Or should we open a bug report with the Xorg people immediately and
 > >  ask them to fix it?
 > 
 > That's probably the best way. If I had any clue how to answer the
 > first question, I would do it myself, but IMHO someone with a little
 > bit more knowledge about C standards and their implementation in
 > compilers is needed here.

 Please subscribe to
 https://bugs.freedesktop.org/show_bug.cgi?id=51009
 in case they need feedback, since I can't provide it directly.
  Thomas

From: =?ISO-8859-1?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: Thomas Klausner <wiz@NetBSD.org>, pkg-manager@NetBSD.org,
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/46586: libXt regression?
Date: Thu, 28 Jun 2012 14:37:49 +0200

 I finally had the time to check the test case provided on 
 freedesktop.org. Using GCC 3.4.6 from pkgsrc or GCC 3.4.3 from /usr/sfw, 
 _X_RESTRICT_KYWD evaluates to "__restrict__", but with GCC 4.7.0, it 
 evaluates to "restrict".

 -- 
   Jörn Clausen                             joern.clausen@uni-bielefeld.de
   Hochschulrechenzentrum                 http://www.uni-bielefeld.de/hrz/
   Universität Bielefeld

From: "Jonathan Perkin" <jperkin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46586 CVS commit: pkgsrc/x11/xproto
Date: Wed, 5 Sep 2012 16:46:55 +0000

 Module Name:	pkgsrc
 Committed By:	jperkin
 Date:		Wed Sep  5 16:46:55 UTC 2012

 Modified Files:
 	pkgsrc/x11/xproto: Makefile distinfo
 	pkgsrc/x11/xproto/patches: patch-ad

 Log Message:
 Apply patch from https://bugs.freedesktop.org/attachment.cgi?id=66181 to
 fix Solaris build issues.  Fixes PR#46586.

 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.20 pkgsrc/x11/xproto/Makefile
 cvs rdiff -u -r1.18 -r1.19 pkgsrc/x11/xproto/distinfo
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/x11/xproto/patches/patch-ad

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

State-Changed-From-To: open->closed
State-Changed-By: jperkin@NetBSD.org
State-Changed-When: Wed, 05 Sep 2012 16:50:25 +0000
State-Changed-Why:
Applied upstream patch to fix issue.


>Unformatted:

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.