From nobody@FreeBSD.org  Sat Apr 25 10:30:16 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A207B106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 25 Apr 2009 10:30:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8681A8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 25 Apr 2009 10:30:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3PAUGtJ087754
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 25 Apr 2009 10:30:16 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n3PAUGTm087753;
	Sat, 25 Apr 2009 10:30:16 GMT
	(envelope-from nobody)
Message-Id: <200904251030.n3PAUGTm087753@www.freebsd.org>
Date: Sat, 25 Apr 2009 10:30:16 GMT
From: Dominic Fandrey <kamikaze@bsdforen.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: kernel crosscompile on amd64 for i386 fails
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         133994
>Category:       kern
>Synopsis:       kernel crosscompile on amd64 for i386 fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 25 10:40:04 UTC 2009
>Closed-Date:    Sat Apr 25 20:43:59 UTC 2009
>Last-Modified:  Sat Apr 25 20:43:59 UTC 2009
>Originator:     Dominic Fandrey
>Release:        RELENG_7
>Organization:
private
>Environment:
FreeBSD mobileKamikaze.norad 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #2: Sat Apr 25 10:00:15 CEST 2009     root@mobileKamikaze.norad:/usr/obj/HP6510b/amd64/usr/src/sys/HP6510b  amd64

>Description:
I'm trying to build RELENG_7 for i386 on an amd64 machine.
I have done this quite often for a long time. It used to work this way:

# env MAKEOBJDIRPREFIX=/usr/obj/VECTRA-7 make -j3 buildworld buildkernel TARGET=i386 KERNCONF=VECTRA-7

This is how it fails (pretty late during kernel build):
===> zyd (all)
env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache cc -O2 -fno-strict
-aliasing -pipe  -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc   -DHAVE_KERNEL_OPTIO
N_HEADERS -include /usr/obj/VECTRA-7/i386/usr/src/sys/VECTRA-7/opt_global.h -I.
-I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param
large-function-growth=1000 -fno-common  -I/usr/obj/VECTRA-7/i386/usr/src/sys/VEC
TRA-7 -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow
-mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-ext
erns -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-q
ual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/zyd/.
./../dev/usb/if_zyd.c
ld  -d -warn-common -r -d -o if_zyd.kld if_zyd.o
:> export_syms
awk -f /usr/src/sys/modules/zyd/../../conf/kmod_syms.awk if_zyd.kld  export_syms
 | xargs -J% objcopy % if_zyd.kld
ld -Bshareable  -d -warn-common -o if_zyd.ko if_zyd.kld
objcopy --strip-debug if_zyd.ko
1 error
*** Error code 2
1 error
*** Error code 2

Stop in /usr/src.

I don't care about the if_zyd module, to be true, but it still
keeps me from finishing the build.

Funny, though. The situation is even WORSE without -j3:
..
cc -c -O2 -pipe -fno-strict-aliasing  -std=c99  -Wall -Wredundant-decls -Wnested
-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wca
st-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src
/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include
 opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --p
aram large-function-growth=1000  -mno-align-long-strings -mpreferred-stack-bound
ary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror
/usr/src/sys/dev/ath/if_ath.c -I/usr/src/sys/dev/ath
/usr/src/sys/dev/ath/if_ath.c: In function 'ath_rx_tap':
/usr/src/sys/dev/ath/if_ath.c:3414: error: 'const struct ath_rx_status' has no m
ember named 'rs_flags'
/usr/src/sys/dev/ath/if_ath.c:3416: error: 'const struct ath_rx_status' has no m
ember named 'rs_flags'
*** Error code 1

Stop in /usr/obj/VECTRA-7/i386/usr/src/sys/VECTRA-7.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.


As you can see it breaks early during kernel build.

I just recsupped and there've been no changes, so I didn't get
my sources in the middle of an update.

I rebuilt the amd64 system first, that worked fine.
>How-To-Repeat:
Set MAKEOBJDIRPREFIX and TARGET=i386 on an amd64 machine and try to build kernel.
>Fix:


>Release-Note:
>Audit-Trail:

From: Dominic Fandrey <kamikaze@bsdforen.de>
To: bug-followup@FreeBSD.org, kamikaze@bsdforen.de
Cc:  
Subject: Re: kern/133994: kernel crosscompile on amd64 for i386 fails
Date: Sat, 25 Apr 2009 14:23:20 +0200

 Can be closed, caused by ath stuff in the kernel config.
 
 I did read UPDATING, but I did not understand that changing
 the config is necessary.
State-Changed-From-To: open->closed 
State-Changed-By: gavin 
State-Changed-When: Sat Apr 25 20:43:23 UTC 2009 
State-Changed-Why:  
Local problem.  Submitter is happy for this to be closed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133994 
>Unformatted:
