NetBSD Problem Report #43021
From www@NetBSD.org Sat Mar 20 11:21:58 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 3D4E863C49B
for <gnats-bugs@gnats.NetBSD.org>; Sat, 20 Mar 2010 11:21:58 +0000 (UTC)
Message-Id: <20100320112157.DAB5F63B873@www.NetBSD.org>
Date: Sat, 20 Mar 2010 11:21:57 +0000 (UTC)
From: dennis.c.ferguson@gmail.com
Reply-To: dennis.c.ferguson@gmail.com
To: gnats-bugs@NetBSD.org
Subject: librump* build procedures don't get along with powerpc64 builds
X-Send-Pr-Version: www-1.0
>Number: 43021
>Category: port-powerpc
>Synopsis: librump* build procedures don't get along with powerpc64 builds
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: mrg
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 20 11:25:00 +0000 2010
>Closed-Date: Sun Mar 28 04:30:39 +0000 2010
>Last-Modified: Sun Mar 28 04:30:39 +0000 2010
>Originator: Dennis Ferguson
>Release: very recent 5.99.24
>Organization:
>Environment:
NetBSD acer.hk.akit-ferguson.com 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Sun Mar 14 17:25:30 HKT 2010 dennis@acer.hk.akit-ferguson.com:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
Doing a macppc64 build results in the following when
it gets to doing dependencies in a librump directory
(anyone will do):
# create librump/__cmsg_alignbytes.d
CC=/usr/src/obj/tooldir.NetBSD-5.99.24-amd64/bin/powerpc64--netbsd-gcc /usr/src/obj/tooldir.NetBSD-5.99.24-amd64/bin/nbmkdep -f __cmsg_alignbytes.d -- -I/usr/src/lib/librump/../../sys/rump/include -D_RUMPKERNEL -D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR -DMAXUSERS=32 -DDIAGNOSTIC -DCOMPAT_50 -DDEBUGPRINT -I/usr/src/lib/librump -I. -I/usr/src/lib/librump/../../sys/rump/../../common/include -I/usr/src/lib/librump/../../sys/rump/../arch -I/usr/src/lib/librump/../../sys/rump/include -I/usr/src/lib/librump/../../sys/rump/librump/rumpkern/opt -nostdinc -I/usr/src/lib/librump/../../sys/rump/.. -D__NetBSD__ -I/usr/src/lib/librump/../../sys/rump/librump/rumpkern -I/usr/src/lib/librump/../../sys/rump/librump/rumpvfs -I/usr/src/lib/librump/../../sys/rump/librump/rumpnet -I/usr/src/lib/librump/../../sys/rump/librump/rumpdev -I/usr/src/lib/librump/../../sys/rump/../lib/libkern/arch/ -I/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/quad -I/usr/src/li
b/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/string -I/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/powerpc64/string -I/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/include /usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/net/__cmsg_alignbytes.c
In file included from /usr/src/lib/librump/../../sys/rump/../sys/types.h:45,
from /usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/net/__cmsg_alignbytes.c:44:
./machine/types.h:3:27: error: powerpc/types.h: No such file or directory
In file included from /usr/src/lib/librump/../../sys/rump/../sys/types.h:47,
from /usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/net/__cmsg_alignbytes.c:44:
./machine/ansi.h:3:26: error: powerpc/ansi.h: No such file or directory
and so on. It can't find include files like <powerpc/anything.h>.
Note that a macppc64 build ends up with the following settings:
MACHINE=macppc
MACHINE_ARCH=powerpc64
As far as I can tell, librump doesn't want to use the target include
files in destdir.x/usr/include but does want to include stuff from
the arch-specific parts of the kernel. To do so it appears to try
to make two symbolic links in its obj/ directories:
machine/ -> sys/arch/$MACHINE/include/
$MACHINE_ARCH/ -> sys/arch/$MACHINE_ARCH/include/
For powerpc64 it doesn't bother making the second link since there
is no arch/powerpc64 directory.
It then #includes stuff like <machine/types.h> and <machine/ansi.h>
via the first link. Unfortunately, <macppc/types.h> and
<macppc/ansi.h>, along with pretty much <macppc/anything.h>,
recursively include <powerpc/anything.h>, but a link named
"powerpc" doesn't exist and the above happens.
>How-To-Repeat:
Do a
MACHINE=macppc64 ./build.sh distribution
in a clean source tree.
>Fix:
I don't know. I get around it now by doing a regular macppc
build in the source tree before trying macppc64; apparently
the librump makefiles don't clean up the old links before
doing the new build.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed
State-Changed-By: pooka@NetBSD.org
State-Changed-When: Sun, 21 Mar 2010 08:53:57 +0300
State-Changed-Why:
powerpc64 fails to set MACHINE_CPU. try to build sys/modules.
this might fix it:
Index: bsd.own.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.own.mk,v
retrieving revision 1.623
diff -p -u -r1.623 bsd.own.mk
--- bsd.own.mk 13 Mar 2010 19:31:51 -0000 1.623
+++ bsd.own.mk 21 Mar 2010 05:52:30 -0000
@@ -14,7 +14,7 @@ MAKECONF?= /etc/mk.conf
#
# CPU model, derived from MACHINE_ARCH
#
-MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/}
+MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/:S/powerpc64/powerpc/}
#
# Subdirectory used below ${RELEASEDIR} when building a release
From: Dennis Ferguson <dennis.c.ferguson@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: port-powerpc-maintainer@netbsd.org,
netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org,
pooka@NetBSD.org
Subject: Re: port-powerpc/43021 (librump* build procedures don't get along with powerpc64 builds)
Date: Sun, 21 Mar 2010 17:20:06 +0800
Ah, thanks so much, I can see right away that
will fix a couple of the build problems that I
was currently hacking around. I'll update the
PRs I filed if that's the case.
It introduced another problem though: I've now
got a powerpc64--netbsd-lint which thinks longs are
4 bytes even though the compiler thinks they are
8 bytes. Will investigate that.
From: matthew green <mrg@eterna.com.au>
To: Dennis Ferguson <dennis.c.ferguson@gmail.com>
Cc: port-powerpc-maintainer@netbsd.org, netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org, pooka@NetBSD.org, gnats-bugs@NetBSD.org
Subject: re: port-powerpc/43021 (librump* build procedures don't get along with powerpc64 builds)
Date: Mon, 22 Mar 2010 00:58:39 +1100
It introduced another problem though: I've now
got a powerpc64--netbsd-lint which thinks longs are
4 bytes even though the compiler thinks they are
8 bytes. Will investigate that.
usr.bin/xlint/arch/powerpc64/targparam.h seems to do the right thing.
is it not being included, but the "powerpc" one is?
.mrg.
From: Dennis Ferguson <dennis.c.ferguson@gmail.com>
To: matthew green <mrg@eterna.com.au>
Cc: port-powerpc-maintainer@netbsd.org,
netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org,
pooka@NetBSD.org,
gnats-bugs@NetBSD.org
Subject: Re: port-powerpc/43021 (librump* build procedures don't get along with powerpc64 builds)
Date: Sun, 21 Mar 2010 22:20:28 +0800
On 21 Mar 2010, at 21:58 , matthew green wrote:
usr.bin/xlint/arch/powerpc64/targparam.h seems to do the right thing.
> is it not being included, but the "powerpc" one is?
I think the problem is actually in usr.bin/xlint/Makefile.inc, which
now uses the MACHINE* variables in the following manner:
# On the m68000, MACHINE_CPU is "m68k", but we have different
# target parameters (namely, long double is a different size
# on the m68000), so we special case the directory name here.
.if ${MACHINE_ARCH} == "m68000"
ARCHSUBDIR= m68000
.elif ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
ARCHSUBDIR= mips64
.else
ARCHSUBDIR= ${MACHINE_CPU}
.endif
With MACHINE_ARCH=powerpc64/MACHINE_CPU=powerpc that ends up
with ARCHSUBDIR=powerpc, with builds a 32-bit lint. I would
like to change this to something like
.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
ARCHSUBDIR= mips64
.elif exists(${.CURDIR}/../arch/${MACHINE_ARCH})
ARCHSUBDIR= ${MACHINE_ARCH}
.else
ARCHSUBDIR= ${MACHINE_CPU}
.endif
which fixes my problem and removes the m68000 special case as a
side effect. I'm so far out of my depth with the mechanics of
the build system, however, that I don't know if this change
would be fixing something that is broken, or if the thing that
is broken is setting MACHINE_CPU=powerpc. Note that lint isn't
the only new problem I've got; I'm also getting unresolved symbols
from the libgcc4 libraries when loading c++ programs (i.e. groff)
so I think I must have hit a similar problem in there somewhere too.
Errors in kernel and powerpc code I can deal with, but the build
system is way scarier.
From: christos@zoulas.com (Christos Zoulas)
To: Dennis Ferguson <dennis.c.ferguson@gmail.com>,
matthew green <mrg@eterna.com.au>
Cc: port-powerpc-maintainer@netbsd.org, netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org, pooka@NetBSD.org, gnats-bugs@NetBSD.org
Subject: Re: port-powerpc/43021 (librump* build procedures don't get along with powerpc64 builds)
Date: Sun, 21 Mar 2010 10:22:10 -0400
On Mar 21, 10:20pm, dennis.c.ferguson@gmail.com (Dennis Ferguson) wrote:
-- Subject: Re: port-powerpc/43021 (librump* build procedures don't get along
| On 21 Mar 2010, at 21:58 , matthew green wrote:
| usr.bin/xlint/arch/powerpc64/targparam.h seems to do the right thing.
| > is it not being included, but the "powerpc" one is?
|
| I think the problem is actually in usr.bin/xlint/Makefile.inc, which
| now uses the MACHINE* variables in the following manner:
|
| # On the m68000, MACHINE_CPU is "m68k", but we have different
| # target parameters (namely, long double is a different size
| # on the m68000), so we special case the directory name here.
| .if ${MACHINE_ARCH} == "m68000"
| ARCHSUBDIR= m68000
| .elif ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
| ARCHSUBDIR= mips64
| .else
| ARCHSUBDIR= ${MACHINE_CPU}
| .endif
|
| With MACHINE_ARCH=powerpc64/MACHINE_CPU=powerpc that ends up
| with ARCHSUBDIR=powerpc, with builds a 32-bit lint. I would
| like to change this to something like
|
| .if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
| ARCHSUBDIR= mips64
| .elif exists(${.CURDIR}/../arch/${MACHINE_ARCH})
| ARCHSUBDIR= ${MACHINE_ARCH}
| .else
| ARCHSUBDIR= ${MACHINE_CPU}
| .endif
|
| which fixes my problem and removes the m68000 special case as a
| side effect. I'm so far out of my depth with the mechanics of
| the build system, however, that I don't know if this change
| would be fixing something that is broken, or if the thing that
| is broken is setting MACHINE_CPU=powerpc. Note that lint isn't
| the only new problem I've got; I'm also getting unresolved symbols
| from the libgcc4 libraries when loading c++ programs (i.e. groff)
| so I think I must have hit a similar problem in there somewhere too.
|
| Errors in kernel and powerpc code I can deal with, but the build
| system is way scarier.
Go for it.
christos
Responsible-Changed-From-To: port-powerpc-maintainer->mrg
Responsible-Changed-By: mrg@NetBSD.org
Responsible-Changed-When: Sun, 21 Mar 2010 23:49:26 +0000
Responsible-Changed-Why:
OK, i'll test dennis' suggested change for this. it should work
but i'll build a few platforms and make sure it looks right too.
From: matthew green <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43021 CVS commit: src/share/mk
Date: Mon, 22 Mar 2010 03:35:26 +0000
Module Name: src
Committed By: mrg
Date: Mon Mar 22 03:35:26 UTC 2010
Modified Files:
src/share/mk: bsd.own.mk
Log Message:
set MACHINE_CPU to powerpc for MACHINE_ARCH of powerpc64.
from pooka via PR#43021.
To generate a diff of this commit:
cvs rdiff -u -r1.623 -r1.624 src/share/mk/bsd.own.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: matthew green <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43021 CVS commit: src/usr.bin/xlint
Date: Mon, 22 Mar 2010 05:12:24 +0000
Module Name: src
Committed By: mrg
Date: Mon Mar 22 05:12:24 UTC 2010
Modified Files:
src/usr.bin/xlint: Makefile.inc
Log Message:
for mips64*, use mips64 subdir, otherwise use $MACHINE_ARCH if exists,
or $MACHINE_CPU. idea from dennis.c.ferguson@gmail.com in PR#43021.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/xlint/Makefile.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: analyzed->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Sun, 28 Mar 2010 04:30:39 +0000
State-Changed-Why:
this one is fixed a while ago.
>Unformatted:
(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.