Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32707 - [ 2.6 HEADERS ] lilo 22.5.8 fails to compile
Summary: [ 2.6 HEADERS ] lilo 22.5.8 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
: 39564 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-04 05:55 UTC by James
Modified: 2004-02-01 11:59 UTC (History)
3 users (show)

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


Attachments
Patch (lilo-22.5.8.lvm.2-6headers.patch,470 bytes, patch)
2004-01-28 11:27 UTC, Tim Yamin (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James 2003-11-04 05:55:29 UTC
emerge lilo
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/lilo-22.5.8 to /
>>> md5 src_uri ;-) lilo-22.5.8.tar.gz
>>> Unpacking source...
>>> Unpacking lilo-22.5.8.tar.gz to /var/tmp/portage/lilo-22.5.8/work
 * Applying lilo-22.5.6-glibc233.patch...                                                                              [ ok ]>>> Source unpacked.
cc -O2 -Wall -g -DLILO=0x16c2d41b `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DONE_SHOT -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL; fi ) | sed 's/-D/-DLCF_/g'` -DSHS_MAIN -o version common.c
cc -c -O2 -Wall -g -DLILO=0x16c2d41b `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DONE_SHOT -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL; fi ) | sed 's/-D/-DLCF_/g'` raid.c
cc -c -O2 -Wall -g -DLILO=0x16c2d41b `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DONE_SHOT -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL; fi ) | sed 's/-D/-DLCF_/g'` map.c
cc -c -O2 -Wall -g -DLILO=0x16c2d41b `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DONE_SHOT -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL; fi ) | sed 's/-D/-DLCF_/g'` geometry.c
geometry.c: In function `lvm_bmap':
geometry.c:438: error: subscripted value is neither array nor pointer
geometry.c:450: error: subscripted value is neither array nor pointer
make: *** [geometry.o] Error 1
make: *** Waiting for unfinished jobs....
 
!!! ERROR: sys-apps/lilo-22.5.8 failed.
!!! Function src_compile, Line 54, Exitcode 2
!!! (no error message)
Comment 1 SpanKY gentoo-dev 2003-11-04 06:05:07 UTC
this is a known gcc-3.x bug
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-04 12:52:18 UTC
emerge info please.
Comment 3 James 2003-11-04 15:52:59 UTC
 emerge info
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.6.0-test9)
=================================================================
System uname: 2.6.0-test9 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.4.3.11
distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -mcpu=pentium4 -O3 -pipe -g -ggdb"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config
/var/bind /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs nostrip"
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt encode gif jpeg libg++ mad mikmod mpeg nls pdflib
png quicktime spell truetype xmms gdbm berkdb slang readline arts svga tcltk
java sdl gpm tcpd libwww python esd imlib oggvorbis qt motif opengl debug
X gtk gtk2 gnome kde alsa apache2 samba acpi cdr cups dvd foomaticdb ncurses
pam perl sasl threads usb xv xml xml2 zlib ssl"
 
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-06 12:35:37 UTC
Seems to work ok this side with the same CFLAGS.  Are you using gcc-3.3.2-r2
?
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-06 13:20:40 UTC
I do not think it will make a difference, but please try lilo-22.5.8-r1.
Comment 6 SpanKY gentoo-dev 2003-11-06 20:40:32 UTC
since lilo doesnt respect CFLAGS/CXXFLAGS i dont think those matter

and -r1 still fails
Comment 7 Brandy Westcott (RETIRED) gentoo-dev 2003-11-07 04:58:18 UTC
This error looks to be caused by using 2.6 kernel headers. The pertinent
parts of geometry.c are:


	70:	#define LV_BMAP			_IOWR(0xfe, 0x30, 1)
	73:	#define LVM_GET_IOP_VERSION	_IOR(0xfe, 0x98, 1)

	438:	if (ioctl(lvmfd, LVM_GET_IOP_VERSION, &iop) < 0)
	450:	if (ioctl(lvmfd, LV_BMAP, lbm) < 0) {


Both _IOWR and _IOR have changed how they determine the size of their
third argument in the move from 2.4 -> 2.6. From /usr/include/asm/ioctl.h
(kernel 2.4):


	#define _IOR(type,nr,size)	_IOC(_IOC_READ,(type),(nr),sizeof(size))
	#define _IOWR(type,nr,size)	_IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))


and from /usr/include/asm/ioctl.h (kernel 2.6):


	/* provoke compile error for invalid uses of size argument */
	extern int __invalid_size_argument_for_IOC;
	#define _IOC_TYPECHECK(t) \
		((sizeof(t) == sizeof(t[1]) && \	<-- ouch
		  sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
		  sizeof(t) : __invalid_size_argument_for_IOC)

	#define _IOR(type,nr,size)	_IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
	#define _IOWR(type,nr,size)	_IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
Comment 8 SpanKY gentoo-dev 2003-11-07 07:12:54 UTC
man, i always feel bad about filing bugs about 2.6.x headers :)

didnt realize that was the bug, but she's right ... when i switch to 2.4.22,
it compiles just fine ...
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-07 09:54:39 UTC
The CFLAGS is on perpose - I think there was issues at an stage with random
failings loading at boot.
Comment 10 Petter 2004-01-22 00:40:45 UTC
Same problem here with:
lilo-22.5.8-r1
gcc-3.2.3-r3
linux-headers-2.6.0
gentoo-dev-sources-2.6.1

Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.6.1-gentoo)
=================================================================
System uname: 2.6.1-gentoo i686 Intel(R) Pentium(R) 4 CPU 2.53GHz
Gentoo Base System version 1.4.3.10
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer -mfpmath=sse,387 -msse -mmmx -fprefetch-loop-arrays -funroll-loops -falign-functions=4 -falign-jumps=4"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer -mfpmath=sse,387 -msse -mmmx -fprefetch-loop-arrays -funroll-loops -falign-functions=4 -falign-jumps=4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/ http://ftp6.uni-erlangen.de/pub/mirrors/gentoo http://ds.thn.htu.se/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/src/ebuilds"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage/"
USE="3ds X aalib acpi acpi4linux alsa altcolors amd apache2 apm arts artswrappersuid avi berkdb bonobo cdr clamav crypt cscope cups curl dga dnd doc dvb dvd dvdr encode esd evo exiscan-acl faad flash foomaticdb foreign-package foreign-sysvinit gamma gb gd gd-external gdbm ggi gif gnome gnomedb gphoto2 gps gtk gtk2 gtkhtml guile hbci i8x0 imagemagick imap imlib ipv6 jack java jikes jpeg justify kde krb4 lcms libdsk libg++ libgda libwww mad maildir matroska mbox md5sum mikmod mmx motif mozilla mozinterfaceinfo moznocompose moznoirc mozp3p mozsvg mpeg music mysql nas ncurses nls nocardbus nocd nowin oav offensive ofx oggvorbis openal opengl oss pam parse-clocks pda pdflib perl pic png ppds python qt quicktime readline rplay ruby ruby18 samba sasl sdl slang slp snmp sox spell src sse ssl tcltk tcpd tetex tiff transcode truetype type1 usb videos vim-with-x wmf x86 xface xine xinerama xml xml2 xmms xosd xv xvid zlib"
Comment 11 Andrew Poland 2004-01-27 08:01:32 UTC
*** Bug 39564 has been marked as a duplicate of this bug. ***
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2004-01-28 11:05:03 UTC
Yep, sorry should have seen its lvm2 causing issues.  Tim, seen this before?
Comment 13 Tim Yamin (RETIRED) gentoo-dev 2004-01-28 11:27:36 UTC
Created attachment 24551 [details, diff]
Patch

Tested on linux-headers-2.6.0 and compiles fine. If somebody could just confirm
that functionality works and it compiles on 2.4 headers I'd be happy to commit
this in...
Comment 14 Tim Yamin (RETIRED) gentoo-dev 2004-02-01 03:57:26 UTC
Fixed in CVS; thanks!
Comment 15 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-01 11:59:36 UTC
Seems fine here at least with 2.6, thanks!