NetBSD Problem Report #49545

From ef@math.uni-bonn.de  Wed Jan  7 13:12:31 2015
Return-Path: <ef@math.uni-bonn.de>
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 5902EA582D
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  7 Jan 2015 13:12:31 +0000 (UTC)
Message-Id: <20150107131228.4B1531BD49@trave.math.uni-bonn.de>
Date: Wed,  7 Jan 2015 14:12:28 +0100 (CET)
From: ef@math.uni-bonn.de
Reply-To: ef@math.uni-bonn.de
To: gnats-bugs@gnats.NetBSD.org
Subject: cross/avr-gcc failure on OSX
X-Send-Pr-Version: 3.95

>Number:         49545
>Category:       pkg
>Synopsis:       cross/avr-gcc failure on OSX
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    joerg
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 07 13:15:00 +0000 2015
>Last-Modified:  Sat Jan 17 15:06:17 +0000 2015
>Originator:     Edgar Fuß
>Release:        pkgsrc-2014Q4
>Organization:
>Environment:

>Description:
	At least on OSX 10.10, devel/avr-gcc fails in the stage-install phase:

	/usr/bin/install -c -o ef -g staff -m 644 unwind.h [...]/cross/avr-gcc/work/.destdir/usr/pkg/lib/gcc/avr/4.8.3/include
	(cd [...]/cross/avr-gcc/work/.destdir/usr/pkg/lib;  /bin/mv libiberty.a gcc/avr/ )
	mv: rename libiberty.a to gcc/avr/libiberty.a: No such file or directory
	*** Error code 1

	Stop.
	bmake: stopped in [...]/cross/avr-gcc
	*** Error code 1

	Stop.
	bmake: stopped in [...]/cross/avr-gcc
>How-To-Repeat:
	cd devel/avr-gcc; bmake stage-install
>Fix:
	I don't know what the point of installing a build-system library 
	into the cross package is, but libiberty is actually built into
	a directory with a name derived from calling the C compiler with 
	-print-multi-os-directory (whatever that is, actually).
	On NetBSD, that directory is simply ".", while on my OSX system, 
	it's "x86_64". So the pkgsrc Makefile needs to use that name, too:

	Index: Makefile
	===================================================================
	RCS file: /cvsroot/pkgsrc/cross/avr-gcc/Makefile,v
	retrieving revision 1.36
	diff -u -r1.36 Makefile
	--- Makefile	19 Sep 2014 08:30:52 -0000	1.36
	+++ Makefile	7 Jan 2015 11:58:20 -0000
	@@ -47,7 +47,7 @@
	 # To avoid the conflict with other cross and native compiler
	 post-install:
		(cd ${DESTDIR}${PREFIX}/lib; \
	-	 ${MV} libiberty.a gcc/avr/ )
	+	 ${MV} $$(${CC} -print-multi-os-directory)/libiberty.a gcc/avr/ )

	 CONFIGURE_DIRS=		${WRKDIR}/obj
	 CONFIGURE_SCRIPT=	${WRKSRC}/configure

>Release-Note:

>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49545: cross/avr-gcc failure on OSX
Date: Wed, 7 Jan 2015 14:41:24 +0100

 > 	I don't know what the point of installing a build-system library 
 > 	into the cross package is, but libiberty is actually built into
 > 	a directory with a name derived from calling the C compiler with 
 > 	-print-multi-os-directory (whatever that is, actually).
 > 	On NetBSD, that directory is simply ".", while on my OSX system, 
 > 	it's "x86_64". So the pkgsrc Makefile needs to use that name, too:

 That's the real bug, it should not do that. It is creating problems when
 the main compiler is not gcc. Take a look at freemint-gcc instead.

 Joerg

From: =?utf-8?Q?Edgar_Fu=C3=9F?= <ef@math.uni-bonn.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49545: cross/avr-gcc failure on OSX
Date: Wed, 7 Jan 2015 15:07:06 +0100

 > That's the real bug, it should not do that. It is creating problems when
 > the main compiler is not gcc.
 Who should not be doing what, exactly?

 > Take a look at freemint-gcc instead.
 I did have a look, but I have no idea what you are trying to tell me.

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49545: cross/avr-gcc failure on OSX
Date: Wed, 7 Jan 2015 15:24:53 +0100

 On Wed, Jan 07, 2015 at 02:10:00PM +0000, Edgar Fu wrote:
 > The following reply was made to PR pkg/49545; it has been noted by GNATS.
 > 
 > From: =?utf-8?Q?Edgar_Fu=C3=9F?= <ef@math.uni-bonn.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/49545: cross/avr-gcc failure on OSX
 > Date: Wed, 7 Jan 2015 15:07:06 +0100
 > 
 >  > That's the real bug, it should not do that. It is creating problems when
 >  > the main compiler is not gcc.
 >  Who should not be doing what, exactly?

 libiberty's build system.

 >  > Take a look at freemint-gcc instead.
 >  I did have a look, but I have no idea what you are trying to tell me.

 See the Makefile patch.

 Joerg

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sat, 17 Jan 2015 15:06:17 +0000
Responsible-Changed-Why:
Joerg, could you try fixing this please? You seem to know what the problem is.


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