NetBSD Problem Report #31955
From www@netbsd.org Mon Oct 31 08:56:49 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
id 17B5363B900; Mon, 31 Oct 2005 08:56:49 +0000 (UTC)
Message-Id: <20051031085649.17B5363B900@narn.netbsd.org>
Date: Mon, 31 Oct 2005 08:56:49 +0000 (UTC)
From: ceh@netbsd.se
Reply-To: ceh@netbsd.se
To: gnats-bugs@netbsd.org
Subject: sysutils/9base doesn't build on NetBSD/macppc
X-Send-Pr-Version: www-1.0
>Number: 31955
>Category: pkg
>Synopsis: sysutils/9base doesn't build on NetBSD/macppc
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 31 08:57:00 +0000 2005
>Closed-Date: Tue Jun 19 11:32:23 +0000 2018
>Last-Modified: Tue Jun 19 11:32:23 +0000 2018
>Originator: Emil Hessman
>Release: NetBSD 3.99.10
>Organization:
>Environment:
NetBSD Latte 3.99.10 NetBSD 3.99.10 (LATTE) #0: Mon Oct 17 10:09:28 CEST 2005 ceh@Latte:/usr/src/sys/arch/macppc/compile/LATTE macppc
>Description:
sysutils/9base does not build on NetBSD/macppc due to;
cd /usr/local/pkgsrc/sysutils/9base; make
[...]
make: don't know how to make getcallerpc-macppc.o. Stop
make: stopped in /usr/local/tmp/sysutils/9base/work/9base-20051028/lib9
*** Error code 2
make: stopped in /usr/local/tmp/sysutils/9base/work/9base-20051028
*** Error code 1
Stop.
make: stopped in /usr/local/pkgsrc/sysutils/9base
===>
===> There was an error during the ``build´´ phase.
===> Please investigate the following for more information:
===> * log of the build
===> * /usr/local/tmp/sysutils/9base/work/.work.log
===>
*** Error code 1
Stop.
make: stopped in /usr/local/pkgsrc/sysutils/9base
>How-To-Repeat:
Build sysutils/9base on NetBSD/macppc.
cd .../pkgsrc/sysutils/9base; make
>Fix:
Add getcallerpc-macppc.c to solve the problem, see;
diff -burN 9base-20051028.orig/lib9/getcallerpc-macppc.c 9base-20051028/lib9/getcallerpc-macppc.c
--- 9base-20051028.orig/lib9/getcallerpc-macppc.c 1970-01-01 01:00:00.000000000 +0100
+++ 9base-20051028/lib9/getcallerpc-macppc.c 2005-10-31 08:43:16.000000000 +0100
@@ -0,0 +1,7 @@
+#include <lib9.h>
+
+ulong
+getcallerpc(void *x)
+{
+ return (((ulong*)(x))[-4]);
+}
>Release-Note:
>Audit-Trail:
From: Peter Bex <Peter.Bex@xs4all.nl>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/31955
Date: Fri, 12 Jan 2007 21:01:02 +0100
--r7U+bLA8boMOj+mD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
The problem with this approach is that you'd have to create identical
files for every alias for an architecture uname can output on any
system supported by pkgsrc, resulting in a big number of files that
are all the same.
A better approach would be to replace known arch strings in the uname
output, like lib9/Makefile already does for all x86 architectures.
It replaces i.86 by 386. We could do the same for 'macppc' -> 'ppc'
and also 'amd64' -> 'x86_64', since it doesn't build on amd64 either.
See the attached patch for concrete example.
--r7U+bLA8boMOj+mD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="9base.diff"
Index: patches/patch-ao
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/9base/patches/patch-ao,v
retrieving revision 1.2
diff -u -r1.2 patch-ao
--- patches/patch-ao 6 Dec 2005 18:50:36 -0000 1.2
+++ patches/patch-ao 12 Jan 2007 20:00:36 -0000
@@ -1,7 +1,21 @@
$NetBSD: patch-ao,v 1.2 2005/12/06 18:50:36 rillig Exp $
---- lib9/Makefile.orig 2005-11-14 10:22:41.000000000 +0000
+--- lib9/Makefile.orig 2005-11-14 11:22:41.000000000 +0100
+++ lib9/Makefile
+@@ -2,11 +2,11 @@
+
+ # this works in gnu make
+ SYSNAME:=${shell uname}
+-OBJTYPE:=${shell uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'}
++OBJTYPE:=${shell uname -m | sed 's;i.86;386;; s;macppc;ppc;; s;amd64;x86_64;; s;/.*;;; s; ;;g'}
+
+ # this works in bsd make
+ SYSNAME!=uname
+-OBJTYPE!=uname -m | sed 's;i.86;386;; s;/.*;;; s; ;;g'
++OBJTYPE!=uname -m | sed 's;i.86;386;; s;macppc;ppc;; s;amd64;x86_64;; s;/.*;;; s; ;;g'
+
+ # the gnu rules will mess up bsd but not vice versa,
+ # hence the gnu rules come first.
@@ -189,9 +189,8 @@ all: ${LIB}
@echo built lib9
--r7U+bLA8boMOj+mD--
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 19 Jun 2018 11:32:23 +0000
State-Changed-Why:
patch no long applies - 'uname -m' is not used anywhere like this in 9base any more. (a better choice would be uname -p, probably)
thanks for the report. sorry it seemed to not get a response at the time.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.