NetBSD Problem Report #52241

From www@NetBSD.org  Thu May 18 08:05:52 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(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 9F6257A209
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 18 May 2017 08:05:52 +0000 (UTC)
Message-Id: <20170518080551.771F47A27B@mollari.NetBSD.org>
Date: Thu, 18 May 2017 08:05:51 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: graphics/netpbm does not compile on Solaris 10
X-Send-Pr-Version: www-1.0

>Number:         52241
>Category:       pkg
>Synopsis:       graphics/netpbm does not compile on Solaris 10
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    adam
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 18 08:10:00 +0000 2017
>Closed-Date:    
>Last-Modified:  Wed Feb 21 14:40:00 +0000 2018
>Originator:     Joern Clausen
>Release:        
>Organization:
University of Bielefeld
>Environment:
>Description:
graphics/netpbm fails to build on Solaris 10, because the script "netpbm/buildtools/stamp-date" fails with

syntax error at line 12: `DATE=$' unexpected

which should produce the file "compile.h"
>How-To-Repeat:

>Fix:
Call the script with a more reasonable Shell in "netpbm/lib/Makefile", e.g.

compile.h:
        ksh $(SRCDIR)/buildtools/stamp-date >$@ || rm $@

or replace the shell in the script before calling it.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->adam
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Mon, 22 May 2017 19:42:35 +0000
Responsible-Changed-Why:
Over to maintainer.


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/52241 (graphics/netpbm does not compile on Solaris 10)
Date: Tue, 20 Feb 2018 10:19:28 +0000

 Got the PR number wrong.

    ------

 From: "David A. Holland" <dholland@netbsd.org>
 To: pkgsrc-changes@NetBSD.org
 Subject: CVS commit: pkgsrc/graphics/netpbm
 Date: Tue, 20 Feb 2018 07:04:54 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Tue Feb 20 07:04:54 UTC 2018

 Modified Files:
 	pkgsrc/graphics/netpbm: Makefile

 Log Message:
 Use REPLACE_SH on buildtools/stamp-date so it gets a shell that works on
 Solaris. PR 55241


 To generate a diff of this commit:
 cvs rdiff -u -r1.216 -r1.217 pkgsrc/graphics/netpbm/Makefile

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

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 20 Feb 2018 10:22:51 +0000
State-Changed-Why:
Is that sufficient?


From: Joern Clausen <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org, adam@NetBSD.org, pkgsrc-bugs@NetBSD.org,
 gnats-admin@NetBSD.org, dholland@NetBSD.org
Cc: 
Subject: Re: pkg/52241 (graphics/netpbm does not compile on Solaris 10)
Date: Wed, 21 Feb 2018 15:26:57 +0100

 > Is that sufficient?

 Yes and no...

 buildtools/stamp-date is now executed, but the generated file 
 "compile.h" contains

 #define BUILD_DATETIME %s

 because Solaris-10's "date" (or strftime, to be precise) does not know 
 about "%s". This breaks compilation of libpm.c.

 I'm pretty sure that when I opened the PR, replacing the shell was the 
 only fix necessary. Either BUILD_DATETIME wasn't there, or someone 
 changed the format definition? Judging from the use of BUILD_DATETIME in 
 libpm.c, anything else than a numeral should not work. I personally 
 would prefer

 date +%Y%m%d%H%M%S

 as it is more readable anyway. Using gdate is probably the easier fix in 
 pkgsrc, though.

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 BITS - Bielefelder IT-Servicezentrum

 Universität Bielefeld
 Universitätsstraße 25
 33615 Bielefeld
 Telefon: +49 521 106-12601
 E-Mail: joern.clausen@uni-bielefeld.de

 http://www.uni-bielefeld.de/bits

From: Jonathan Perkin <jperkin@joyent.com>
To: Joern Clausen <joern.clausen@uni-bielefeld.de>
Cc: gnats-bugs@NetBSD.org, adam@NetBSD.org, pkgsrc-bugs@NetBSD.org,
	gnats-admin@NetBSD.org, dholland@NetBSD.org
Subject: Re: pkg/52241 (graphics/netpbm does not compile on Solaris 10)
Date: Wed, 21 Feb 2018 14:35:07 +0000

 * On 2018-02-21 at 14:27 GMT, Joern Clausen wrote:

 > > Is that sufficient?
 > 
 > Yes and no...
 > 
 > buildtools/stamp-date is now executed, but the generated file "compile.h"
 > contains
 > 
 > #define BUILD_DATETIME %s
 > 
 > because Solaris-10's "date" (or strftime, to be precise) does not know about
 > "%s". This breaks compilation of libpm.c.
 > 
 > I'm pretty sure that when I opened the PR, replacing the shell was the only
 > fix necessary. Either BUILD_DATETIME wasn't there, or someone changed the
 > format definition? Judging from the use of BUILD_DATETIME in libpm.c,
 > anything else than a numeral should not work. I personally would prefer
 > 
 > date +%Y%m%d%H%M%S
 > 
 > as it is more readable anyway. Using gdate is probably the easier fix in
 > pkgsrc, though.

 The better fix would be to remove it completely so that we move one
 step closer to reproducible builds.

 -- 
 Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.