NetBSD Problem Report #28239

From woods@building.weird.com  Fri Nov 12 07:58:02 2004
Return-Path: <woods@building.weird.com>
Received: from building.weird.com (building.weird.com [204.92.254.24])
	by narn.netbsd.org (Postfix) with ESMTP id 6EB4A251EDE
	for <gnats-bugs@gnats.netbsd.org>; Fri, 12 Nov 2004 07:58:02 +0000 (UTC)
Message-Id: <m1CSWJm-0024fbC@building.weird.com>
Date: Fri, 12 Nov 2004 02:58:02 -0500 (EST)
From: "Greg A. Woods" <woods@weird.com>
Reply-To: "Greg A. Woods" <woods@planix.com>
To: gnats-bugs@netbsd.org
Subject: devel/binutils does not build properly for pkgsrc
X-Send-Pr-Version: 3.95

>Number:         28239
>Category:       pkg
>Synopsis:       devel/binutils does not build properly for pkgsrc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 12 07:59:00 +0000 2004
>Closed-Date:    Mon Jan 28 22:59:22 +0000 2013
>Last-Modified:  Mon Jan 28 22:59:22 +0000 2013
>Originator:     Greg A. Woods
>Release:        NetBSD 1.6.2_STABLE
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD 1.6.2_STABLE
Architecture: alpha
Machine: alpha
>Description:

	binutils is not properly configured to use libtool yet it uses
	it exclusively during its build

	configuration is done without an autoconf config.cache file
	greatly increasing the unnecessary overhead of building
	binutils

	the combination of these first two problems requires explicit
	configuration of each sub-package so that the automated
	LIBTOOL_OVERRIDE tricks can actually take effect

	a small patch is needed to make sure LDFLAGS from MAKE_ENV
	actually makes it into the build process for sub-directories

	building of anything and everything using any automake newer
	than 1.4 really should _always_ use GNU Make (even when
	dependency tracking has been disabled and maintainer mode is
	not being used)

	some compilation and construction is done as root during install

>How-To-Repeat:

	build and install devel/binutils and note that no programs
	were built with the desired LDFLAGS and note that the wrong
	libtool program was used and so on...

>Fix:

cvs diff: Diffing devel/binutils
Index: devel/binutils/Makefile
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/devel/binutils/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- devel/binutils/Makefile	13 Aug 2004 18:47:49 -0000	1.23
+++ devel/binutils/Makefile	12 Nov 2004 07:43:51 -0000
@@ -14,12 +14,25 @@
 USE_BUILDLINK3=		yes
 USE_PKGLOCALEDIR=	yes

+USE_LIBTOOL=		yes
 USE_MAKEINFO=		yes
 TEXINFO_REQD=		4.0
 MAKEFLAGS+=		TEXINFO_LOCALE=no

 GNU_CONFIGURE=		yes
+USE_GNU_TOOLS=		make
 CONFIGURE_ARGS+=	--with-lib-path='/lib:/usr/lib'
+CONFIGURE_ARGS+=	--cache-file=${WRKSRC}/config.cache
+CONFIGURE_DIRS=		${WRKSRC}
+CONFIGURE_DIRS+=	${WRKSRC}/bfd
+CONFIGURE_DIRS+=	${WRKSRC}/binutils
+CONFIGURE_DIRS+=	${WRKSRC}/etc
+CONFIGURE_DIRS+=	${WRKSRC}/gas
+CONFIGURE_DIRS+=	${WRKSRC}/gprof
+CONFIGURE_DIRS+=	${WRKSRC}/intl
+CONFIGURE_DIRS+=	${WRKSRC}/ld
+CONFIGURE_DIRS+=	${WRKSRC}/libiberty
+CONFIGURE_DIRS+=	${WRKSRC}/opcodes
 BINUTILS_PREFIX=	${PREFIX}/${MACHINE_GNU_PLATFORM}

 PLIST_SRC=	${PKGDIR}/PLIST.common
@@ -38,6 +51,14 @@
 INFO_FILES+=	gprof.info
 .endif

+# XXX it would be _real_ nice if we could use this too....
+#
+#.if defined(GNU_PROGRAM_PREFIX)
+#CONFIGURE_ARGS+=        --program-prefix=${GNU_PROGRAM_PREFIX}
+#.endif
+#PLIST_SUBST+=           GNU_PROGRAM_PREFIX=${GNU_PROGRAM_PREFIX}
+#BUILD_DEFS+=            GNU_PROGRAM_PREFIX
+
 # Prevent the need to run texi2pod.pl and pod2man hence
 # the need for perl as build dependency.
 #
@@ -48,6 +69,11 @@
 	fi
 .endfor

+# make sure we don't need to actually build anything as root!
+#
+post-build:
+	cd ${WRKSRC}/bfd/doc && ${SETENV} ${BUILD_ENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} -f ${MAKEFILE} info
+
 post-install:
 	${FIND} ${BINUTILS_PREFIX}/lib/ldscripts -type f -print		\
 		| ${SORT} -r						\
Index: devel/binutils/distinfo
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/devel/binutils/distinfo,v
retrieving revision 1.4
diff -u -r1.4 distinfo
--- devel/binutils/distinfo	30 Jun 2004 16:18:03 -0000	1.4
+++ devel/binutils/distinfo	11 Nov 2004 22:50:23 -0000
@@ -3,3 +3,4 @@
 SHA1 (binutils-2.15.tar.gz) = 4caf693b8cbaf1118d2bfddb40a2fc91eaf51a6f
 Size (binutils-2.15.tar.gz) = 15134701 bytes
 SHA1 (patch-aa) = 34f4efe9ab793c38eccb016bd9498a7db1494953
+SHA1 (patch-za) = e9f418100643c5a1c2f5d244c287956bbbde6f5f
cvs diff: Diffing devel/binutils/patches
Index: devel/binutils/patches/patch-za
===================================================================
RCS file: devel/binutils/patches/patch-za
diff -N devel/binutils/patches/patch-za
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ devel/binutils/patches/patch-za	11 Nov 2004 22:50:18 -0000
@@ -0,0 +1,11 @@
+--- Makefile.in.orig	Mon May 17 15:38:54 2004
++++ Makefile.in	Thu Nov 11 17:49:50 2004
+@@ -228,7 +228,7 @@
+ NM = @NM@
+ 
+ LD = @LD@
+-LDFLAGS = 
++LDFLAGS = @LDFLAGS@
+ 
+ RANLIB = @RANLIB@
+ 

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: asau@NetBSD.org
State-Changed-When: Mon, 28 Jan 2013 22:59:22 +0000
State-Changed-Why:
The package was updated multiple times since then.
It builds fine in recent bulk builds.
If you still have problems (with new package), file another PR.


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