Subject: pkg/37285: devel/jam fails to build under NetBSD-4
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <cheusov@tut.by>
List: pkgsrc-bugs
Date: 11/05/2007 19:50:00
>Number:         37285
>Category:       pkg
>Synopsis:       devel/jam fails to build under NetBSD-4
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 05 19:50:00 +0000 2007
>Originator:     cheusov@tut.by
>Release:        NetBSD 4.0_RC3
>Organization:
>Environment:
System: NetBSD chen.chizhovka.net 4.0_RC3 NetBSD 4.0_RC3 (GENERIC) #2: Sat Oct 20 21:41:02 EEST 2007 cheusov@chen.chizhovka.net:/srv/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Full log of failure:

0 jam>make update
===> deinstall [jam-2.5nb2] ===> Deinstalling for jam-2.5nb2
=> Becoming ``root'' to make su-deinstall (/usr/local/bin/sudo)
Running /usr/sbin/pkg_delete -K /var/db/pkg -r -v jam-2.5.2
Change working directory to /usr/pkg
Delete file /usr/pkg/bin/jam
Delete file /usr/pkg/bin/mkjambase
Delete file /usr/pkg/share/doc/html/jam/Jam.html
Delete file /usr/pkg/share/doc/html/jam/Jambase.html
Delete file /usr/pkg/share/doc/html/jam/Jamfile.html
Delete file /usr/pkg/share/doc/jam/Porting
Delete file /usr/pkg/share/doc/jam/README
Delete file /usr/pkg/share/doc/jam/RELNOTES
Delete directory /usr/pkg/share/doc/jam
Delete directory /usr/pkg/share/doc/html/jam
=> Dropping ``root'' privileges.
=> Bootstrap dependency digest>=20010302: digest-20060826 found
=> Bootstrap dependency checkperms>=1.1: checkperms-1.9 found
===> _flavor-check-vulnerable [jam-2.5nb2] ===> Checking for vulnerabilities in jam-2.5nb2
=> Fetching jam-2.5.zip
=> Checksum SHA1 OK for jam-2.5nb1/jam-2.5.zip
=> Checksum RMD160 OK for jam-2.5nb1/jam-2.5.zip
===> depends-message [jam-2.5nb2] ===> Installing dependencies for jam-2.5nb2
=> Build dependency unzip-[0-9]*: unzip-5.52nb3 found
=> Build dependency unzip-[0-9]*: unzip-5.52nb3 found
===> barrier [jam-2.5nb2] ===> Invoking ``package'' after barrier for jam-2.5nb2
===> tools-message [jam-2.5nb2] ===> Overriding tools for jam-2.5nb2
===> extract-message [jam-2.5nb2] ===> Extracting for jam-2.5nb2
===> patch-message [jam-2.5nb2] ===> Patching for jam-2.5nb2
=> Applying pkgsrc patches for jam-2.5nb2
=> Verifying /mnt/hde1/pkgsrc/devel/jam/patches/patch-aa
=> Applying pkgsrc patch /mnt/hde1/pkgsrc/devel/jam/patches/patch-aa
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-aa,v 1.3 2007/08/01 21:53:16 joerg Exp $
|
|--- jam.h.orig 2007-08-01 21:32:10.000000000 +0000
|+++ jam.h
--------------------------
Patching file jam.h using Plan A...
Hunk #1 succeeded at 379.
done
===> wrapper-message [jam-2.5nb2] ===> Creating toolchain wrappers for jam-2.5nb2
=> Creating AS wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/as
=> Creating CC wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/cc
=> Linking CC wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/gcc
=> Creating CPP wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/cpp
=> Creating CXX wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/c++
=> Linking CXX wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/g++
=> Linking CXX wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/CC
=> Linking CXX wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/cxx
=> Creating FC wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/f77
=> Linking FC wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/g77
=> Creating LD wrapper: /srv/obj_pkgsrc/devel/jam/work/.wrapper/bin/ld
===> configure-message [jam-2.5nb2] ===> Configuring for jam-2.5nb2
=> Checking for portability problems in extracted files
===> build-message [jam-2.5nb2] ===> Building for jam-2.5nb2
cc -o ./jam0  builtins.c  command.c compile.c execunix.c execvms.c expand.c  filent.c fileos2.c fileunix.c filevms.c glob.c hash.c  headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c  newstr.c option.c parse.c pathunix.c pathvms.c regexp.c  rules.c scan.c search.c timestamp.c variable.c 
execunix.c: In function 'execcmd':
execunix.c:229: warning: incompatible implicit declaration of built-in function '_exit'
./jam0
*** Signal 10

Stop.
make: stopped in /srv/obj_pkgsrc/devel/jam/work
*** Error code 1

Stop.
make: stopped in /mnt/hde1/pkgsrc/devel/jam
*** Error code 1

Stop.
make: stopped in /srv/pkgsrc/devel/jam
*** Error code 1

Stop.
make: stopped in /srv/pkgsrc/devel/jam
0 jam>
>Fix:
I propose to upgrade it to version 2.5.2.
(devel/jam is needed by wip/lincity-ng)

? upgrade_to_2_5_2.diff
Index: Makefile
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/devel/jam/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- Makefile	24 Mar 2007 06:20:30 -0000	1.11
+++ Makefile	5 Nov 2007 19:46:20 -0000
@@ -1,11 +1,12 @@
 # $NetBSD: Makefile,v 1.11 2007/03/24 06:20:30 schmonz Exp $
 #
 
-DISTNAME=	jam-2.5
-PKGREVISION=	2
+PKGNAME=	jam-2.5.2
+DISTNAME=	ft${PKGNAME}
 CATEGORIES=	devel
-MASTER_SITES=	ftp://ftp.perforce.com/pub/jam/
-EXTRACT_SUFX=	.zip
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=freetype/} \
+                ftp://ftp.perforce.com/pub/jam/
+EXTRACT_SUFX=	.tar.bz2
 
 MAINTAINER=	schmonz@NetBSD.org
 HOMEPAGE=	http://www.perforce.com/jam/jam.html
@@ -13,14 +14,15 @@
 
 CONFLICTS=	acunia-jam-[0-9]*
 
-DIST_SUBDIR=	${PKGNAME_NOREV}nb1
-WRKSRC=		${WRKDIR}
-USE_TOOLS+=	yacc
+GNU_CONFIGURE=	yes
+
+DIST_SUBDIR=	${PKGBASE}
+USE_TOOLS+=	yacc gmake
 
 DOCDIR=		share/doc/${PKGBASE}
 HTMLDIR=	share/doc/html/${PKGBASE}
 
-INSTALLATION_DIRS=	bin
+INSTALLATION_DIRS=	bin ${DOCDIR} ${HTMLDIR}
 
 do-install:
 	for f in jam mkjambase; do \
Index: distinfo
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/devel/jam/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo	1 Aug 2007 21:53:16 -0000	1.6
+++ distinfo	5 Nov 2007 19:46:20 -0000
@@ -1,6 +1,7 @@
 $NetBSD: distinfo,v 1.6 2007/08/01 21:53:16 joerg Exp $
 
-SHA1 (jam-2.5nb1/jam-2.5.zip) = 794a3f4483315c6b9f010f03b592646d3815328c
-RMD160 (jam-2.5nb1/jam-2.5.zip) = 8e2779e6e41e34d2368e54813e3c92d4604b9e66
-Size (jam-2.5nb1/jam-2.5.zip) = 191864 bytes
-SHA1 (patch-aa) = b24098cda1e4dfc1638df0ba945716de030a7d48
+SHA1 (jam/ftjam-2.5.2.tar.bz2) = 08bad35e74ec85c4592d378014586174d22297b5
+RMD160 (jam/ftjam-2.5.2.tar.bz2) = fd1d1161963ba85be09aecffe832cf1db8a7b70f
+Size (jam/ftjam-2.5.2.tar.bz2) = 196631 bytes
+SHA1 (patch-aa) = 23bc0f13d2a982d4ebac93d07b8a63c4bafa67cf
+SHA1 (patch-ab) = ffe98ae6545458ff5c5da4f9f4eb7d82c2ece094
Index: patches/patch-aa
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/devel/jam/patches/patch-aa,v
retrieving revision 1.3
diff -u -r1.3 patch-aa
--- patches/patch-aa	1 Aug 2007 21:53:16 -0000	1.3
+++ patches/patch-aa	5 Nov 2007 19:46:20 -0000
@@ -1,24 +1,24 @@
-$NetBSD: patch-aa,v 1.3 2007/08/01 21:53:16 joerg Exp $
+$NetBSD$
 
---- jam.h.orig	2007-08-01 21:32:10.000000000 +0000
+--- jam.h.orig	2006-06-05 13:52:05.000000000 +0300
 +++ jam.h
 @@ -379,19 +379,7 @@
- # include <memory.h>
- # endif
- 
--# ifndef OS_ULTRIX
- # include <stdlib.h>
--# endif
--
--# if !defined(OS_BSDI) && \
--     !defined(OS_FREEBSD) && \
--     !defined(OS_NEXT) && \
--     !defined(OS_MACHTEN) && \
--     !defined(OS_MACOSX) && \
--     !defined(OS_RHAPSODY) && \
--     !defined(OS_MVS)
--# include <malloc.h>
--# endif
- 
- # endif 
- 
+ # include <memory.h>
+ # endif
+ 
+-# ifndef OS_ULTRIX
+ # include <stdlib.h>
+-# endif
+-
+-# if !defined(OS_BSDI) && \
+-     !defined(OS_FREEBSD) && \
+-     !defined(OS_NEXT) && \
+-     !defined(OS_MACHTEN) && \
+-     !defined(OS_MACOSX) && \
+-     !defined(OS_RHAPSODY) && \
+-     !defined(OS_MVS)
+-# include <malloc.h>
+-# endif
+ 
+ # endif
+ 
Index: patches/patch-ab
===================================================================
RCS file: patches/patch-ab
diff -N patches/patch-ab
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-ab	5 Nov 2007 19:46:20 -0000
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- execunix.c.orig	2006-06-05 13:52:27.000000000 +0300
++++ execunix.c
+@@ -42,6 +42,7 @@
+ # include "lists.h"
+ # include "execcmd.h"
+ # include <errno.h>
++# include <unistd.h>
+ 
+ # ifdef USE_EXECUNIX
+