NetBSD Problem Report #50083

From www@NetBSD.org  Fri Jul 24 04:43:24 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2E9B2A5864
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 24 Jul 2015 04:43:24 +0000 (UTC)
Message-Id: <20150724044322.87C88A654F@mollari.NetBSD.org>
Date: Fri, 24 Jul 2015 04:43:22 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: x11/sessreg on DragonFly 4.3-DEVELOPMENT gcc5 needs Makefile CPP -P patch 
X-Send-Pr-Version: www-1.0

>Number:         50083
>Category:       pkg
>Synopsis:       x11/sessreg on DragonFly 4.3-DEVELOPMENT gcc5 needs Makefile CPP -P patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 24 04:45:00 +0000 2015
>Last-Modified:  Mon Sep 07 15:00:00 +0000 2015
>Originator:     David Shao
>Release:        pkgsrc current
>Organization:
>Environment:
DragonFly  4.3-DEVELOPMENT DragonFly v4.2.2.96.g1d3c4-DEVELOPMENT #7: Thu Jul 23 17:41:09 PDT 2015     xxxxx@:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64
>Description:
Due to DragonFly 4.3-DEVELOPMENT now using the gcc 5.x series as the base compiler:

$ gcc --version
gcc 5.2.1 [DragonFly] Release/2015-07-18

x11/sessreg needs a patch to Makefile.  The DragonFly dports version of the patch is

CPP+=  -P

That didn't seem to work for pkgsrc, so I converted it to the following patch that does work.  Without the patch on DragonFly 4.3 one gets an error such as:

/usr/pkg/bin/bmake  all-recursive
Making all in man
  GEN      filenames.sed
  GEN      sessreg.1
sed: 3: filenames.sed: unescaped newline inside substitute pattern

Here is an example link explaining the problem:

http://www.linuxfromscratch.org/blfs/view/svn/x/x7app.html

"sed -e 's/\$(CPP) \$(DEFS)/$(CPP) -P $(DEFS)/' -i man/Makefile.in: with gcc-5 the behaviour of cpp was changed to emit line numbers. That results in unterminated sed commands in filenames.sed. Adding -P restores the old behaviour."

If this patch or something similar can be committed, all of meta-pkgs/modular-xorg-apps builds on DragonFly 4.3.
>How-To-Repeat:

>Fix:
--- Makefile.orig	2015-07-15 19:03:55.121593000 -0700
+++ Makefile	2015-07-19 08:51:47.600950000 -0700
@@ -16,6 +16,12 @@
 BUILD_DEFS+=	VARBASE
 CONFIGURE_ARGS+=--localstatedir=${VARBASE:Q}

+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "DragonFly"
+# Required for gcc5+
+CPP_PRECOMP_FLAGS+=	-P
+.endif
+
 ###
 ### Please see patches/patch-ab for details on this.
 ###

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50083: x11/sessreg on DragonFly 4.3-DEVELOPMENT gcc5 needs
 Makefile CPP -P patch
Date: Fri, 24 Jul 2015 05:25:37 +0000

 On Fri, Jul 24, 2015 at 04:45:00AM +0000, davshao@gmail.com wrote:
  > x11/sessreg needs a patch to Makefile.  The DragonFly dports
  > version of the patch is
  > 
  > CPP+=  -P
  > 
  > That didn't seem to work for pkgsrc, so I converted it to the
  > following patch that does work.  Without the patch on DragonFly 4.3
  > one gets an error such as:
  > 
  > /usr/pkg/bin/bmake  all-recursive
  > Making all in man
  >   GEN      filenames.sed
  >   GEN      sessreg.1
  > sed: 3: filenames.sed: unescaped newline inside substitute pattern

 Might be better to have it use tradcpp, whose behavior on non-C input
 is well defined and stable.

 (if so, it should be unconditional and not os-specific)

 -- 
 David A. Holland
 dholland@netbsd.org

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/50083: x11/sessreg on DragonFly 4.3-DEVELOPMENT gcc5 needs
 Makefile CPP -P patch
Date: Mon, 7 Sep 2015 07:58:32 -0700

 On Thu, Jul 23, 2015 at 10:30 PM, David Holland
 <dholland-pbugs@netbsd.org> wrote:
 > The following reply was made to PR pkg/50083; it has been noted by GNATS.
 >
 > From: David Holland <dholland-pbugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: pkg/50083: x11/sessreg on DragonFly 4.3-DEVELOPMENT gcc5 needs
 >  Makefile CPP -P patch
 > Date: Fri, 24 Jul 2015 05:25:37 +0000
 >
 >  On Fri, Jul 24, 2015 at 04:45:00AM +0000, davshao@gmail.com wrote:
 >   > x11/sessreg needs a patch to Makefile.  The DragonFly dports
 >   > version of the patch is
 >   >
 >   > CPP+=  -P
 >   >
 >   > That didn't seem to work for pkgsrc, so I converted it to the
 >   > following patch that does work.  Without the patch on DragonFly 4.3
 >   > one gets an error such as:
 >   >
 >   > /usr/pkg/bin/bmake  all-recursive
 >   > Making all in man
 >   >   GEN      filenames.sed
 >   >   GEN      sessreg.1
 >   > sed: 3: filenames.sed: unescaped newline inside substitute pattern
 >
 >  Might be better to have it use tradcpp, whose behavior on non-C input
 >  is well defined and stable.
 >
 >  (if so, it should be unconditional and not os-specific)
 >
 >  --
 >  David A. Holland
 >  dholland@netbsd.org

 Unlike say x11/xinit, x11/sessreg's configure.ac and thus configure do not have

 XORG_PROG_RAWCPP

 Therefore the usual addition to the port Makefile of:

 TOOL_DEPENDS+=        tradcpp-[0-9]*:../../devel/tradcpp
 CONFIGURE_ENV+=        ac_cv_path_RAWCPP="${PREFIX}/bin/tradcpp -Uunix"

 does nothing to help x11/sessreg if using gcc5 on DragonFly 4.3-DEVELOPMENT.

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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.