Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43233 - linux-headers-2.4.21-r1 fails to compile
Summary: linux-headers-2.4.21-r1 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: Sparc Linux
: High major (vote)
Assignee: Sparc Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-28 16:09 UTC by Hardave Riar (RETIRED)
Modified: 2004-03-09 19:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch from 2.4.23 to 2.4.21 for check_asm.sh (sparc-2.4.23-fix-check_asm.patch,791 bytes, patch)
2004-02-28 16:32 UTC, Joshua Kinard
Details | Diff
check_asm.sh patch for linux-headers-2.4.21-r1 sparc64 (check_asm.sh.diff,635 bytes, patch)
2004-02-28 17:19 UTC, Hardave Riar (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hardave Riar (RETIRED) gentoo-dev 2004-02-28 16:09:13 UTC
While upgrading an existing sparc64 linux-headers-2.4.21-r1 fails to compile check_asm.c during 'make dep'.

Reproducible: Always
Steps to Reproduce:
1. emerge linux-headers
2.
3.

Actual Results:  
>>> make oldconfig complete
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/mkdep
scripts/mkdep.c
make -C arch/sparc64/kernel check_asm
make[1]: Entering directory
`/tmp/portage/linux-headers-2.4.21-r1/work/linux-2.4.21/arch/sparc64/kernel'
sparc64-linux-gcc -E -D__KERNEL__
-I/tmp/portage/linux-headers-2.4.21-r1/work/linux-2.4.21/include -P tmp.c -o tmp.i
/bin/sh ./check_asm.sh -data task tmp.i check_asm_data.c
/bin/sh ./check_asm.sh -data mm tmp.i check_asm_data.c
/bin/sh ./check_asm.sh -data thread tmp.i check_asm_data.c
sparc64-linux-gcc -D__KERNEL__
-I/tmp/portage/linux-headers-2.4.21-r1/work/linux-2.4.21/include -m64
-mcmodel=medlow -ffixed-g4 -S -o check_asm_data.s check_asm_data.c
/bin/sh ./check_asm.sh -ints check_asm_data.s check_asm.c
/bin/sh ./check_asm.sh -printf task tmp.i check_asm.c
/bin/sh ./check_asm.sh -printf mm tmp.i check_asm.c
/bin/sh ./check_asm.sh -printf thread tmp.i check_asm.c
gcc -o check_asm check_asm.c
check_asm.c:312: field name not in record or union initializer
check_asm.c:312: (near initialization for `check_asm_data')
check_asm.c:313: warning: initialization makes integer from pointer without a cast
make[1]: *** [check_asm] Error 1
make[1]: Leaving directory
`/tmp/portage/linux-headers-2.4.21-r1/work/linux-2.4.21/arch/sparc64/kernel'
make: *** [check_asm] Error 2

!!! ERROR: sys-kernel/linux-headers-2.4.21-r1 failed.
!!! Function src_compile, Line 76, Exitcode 2
!!! Failed to run 'make dep'



gcc --version
gcc (GCC) 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice)

sparc64-linux-gcc --version
sparc64-linux-gcc (GCC) 3.3.3 20040217 (Gentoo Linux 3.3.3)

Portage 2.0.49-r15 (default-sparc64-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.22-sparc)
=================================================================
System uname: 2.4.22-sparc sparc64 sun4u
Gentoo Base System version 1.4.3.10
distcc 2.11.1 sparc-unknown-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ACCEPT_KEYWORDS="sparc ~sparc"
AUTOCLEAN="yes"
CFLAGS="-mcpu=ultrasparc -O3 -pipe"
CHOST="sparc-unknown-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=ultrasparc -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache"
GENTOO_MIRRORS="ftp://sunsite.ualberta.ca/pub/Mirror/Linux/gentoo
http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j10"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync4.ca.gentoo.org/gentoo-portage"
USE="sparc arts avi crypt encode esd fbcon foomaticdb gif gnome imlib jpeg kde
libwww mad mikmod mpeg ncurses nls oggvorbis oss png pdflib qt sdl spell
truetype xv xml2 xmms zlib gdbm berkdb slang readline mysql X tcpd pam ssl perl
python gtk motif opengl java mbox mozcalendar mozilla mozsvg tiff Xaw3d -cups"
Comment 1 Joshua Kinard gentoo-dev 2004-02-28 16:30:13 UTC
This isn't totally a gcc-porting issue, more a sparc one.  It's a bug in the kernel that breaks with gcc-3.2.3.  I believe it was fixed in 2.4.23.  I looked in 2.4.23, and found a patch that tweaks check_asm.sh, which looks to generate check_asm.c.  I've attached it here, give it a run with linux-headers-2.4.21-r1 and see if it resolves the issue.

Comment 2 Joshua Kinard gentoo-dev 2004-02-28 16:32:16 UTC
Created attachment 26543 [details, diff]
Patch from 2.4.23 to 2.4.21 for check_asm.sh
Comment 3 Hardave Riar (RETIRED) gentoo-dev 2004-02-28 17:19:07 UTC
Created attachment 26548 [details, diff]
check_asm.sh patch for linux-headers-2.4.21-r1 sparc64

Allows 'make dep' completion for linux-headers-2.4.21-r1 on sparc64 with
gcc-3.2.3
Comment 4 Joshua Kinard gentoo-dev 2004-02-28 18:37:39 UTC
The patch you attached looks very similar to the one I attached.  Can you try the one I attached to see if it works (or if it applies)?  It's what wound up being in the 2.4.23 kernel.
Comment 5 Hardave Riar (RETIRED) gentoo-dev 2004-02-28 22:18:36 UTC
The patch you supplied failed to apply against 2.4.21. My patch is an edit of your patch to successfully apply against 2.4.21. All I changed was the original line and duplicated the changed line. Mine also applies against the sparc64 side, where as yours was sparc only. It probablly does need to be applied against sparc as well, but I don't currently have a sparc32 box to test against. Your patch appears to be a diff between 2.4.22 and 2.4.23.
Comment 6 Jason Wever (RETIRED) gentoo-dev 2004-03-08 16:13:47 UTC
Just made linux-headers-2.4.23 available on sparc.  Give it a couple hours to reach the mirrors and then try building this.  Let us know how you make out.
Comment 7 Hardave Riar (RETIRED) gentoo-dev 2004-03-08 21:12:44 UTC
Thank you. linux-headers-2.4.23 installed successfully.

Also 2.4.22 failed to install same as 2.4.21.
Comment 8 Jason Wever (RETIRED) gentoo-dev 2004-03-09 19:28:25 UTC
Glad to hear it :)  If you have any problems related to linux-headers-2.4.23, feel free open a new bug.