* kobject.h makes lilo compile break
@ 2003-01-04 13:39 Simon Scheiwiller
2003-01-08 5:32 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Simon Scheiwiller @ 2003-01-04 13:39 UTC (permalink / raw)
To: linux-kernel
Hello
When I'm compiling lilo on a machine with kernel 2.5.54, I get the following
error:
gcc -c -O2 -Wall -g `( if [ -r $ROOT/etc/lilo.defines ]; then cat
$ROOT/etc/lilo.defines; else
echo -DBDATA -DBUILTIN -DDSECS=3 -DIGNORECASE -DLBA32 -DLVM -DEVMS -DM386 -D
ONE_SHOT -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVARSETUP -DVERS
ION -DUNIFY; fi ) | sed 's/-D/-DLFC_/g'` `[ -r /usr/include/asm/boot.h ] &&
echo -DHAS_BOOT_H` `cat mylilo.h` lilo.c
In file included from /usr/include/linux/kobject.h:10,
from /usr/include/linux/device.h:28,
from /usr/include/linux/genhd.h:15,
from common.h:20,
from lilo.c:25:
/usr/include/linux/list.h:323:2: warning: #warning "don't include kernel
headers in userspace"
In file included from /usr/include/linux/device.h:28,
from /usr/include/linux/genhd.h:15,
from common.h:20,
from lilo.c:25:
/usr/include/linux/kobject.h:20: field `entry` has incomplete type
/usr/include/linux/kobject.h:24: confused by earlier errors, bailing out
make: *** [lilo.o] Error 1
rm temp2.img
As far as I got it, it's the kobject.h which causes the error as it includes
list.h which can't be included in userspace, but in the end the genhd.h
should work so can compile lilo.
Can someone help me how to solve that?
TIA
Cheers, Simon
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: kobject.h makes lilo compile break
2003-01-04 13:39 kobject.h makes lilo compile break Simon Scheiwiller
@ 2003-01-08 5:32 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-01-08 5:32 UTC (permalink / raw)
To: Simon Scheiwiller; +Cc: linux-kernel
On Sat, Jan 04, 2003 at 02:39:31PM +0100, Simon Scheiwiller wrote:
> Hello
>
> When I'm compiling lilo on a machine with kernel 2.5.54, I get the following
> error:
>
>
> gcc -c -O2 -Wall -g `( if [ -r $ROOT/etc/lilo.defines ]; then cat
> $ROOT/etc/lilo.defines; else
> echo -DBDATA -DBUILTIN -DDSECS=3 -DIGNORECASE -DLBA32 -DLVM -DEVMS -DM386 -D
> ONE_SHOT -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVARSETUP -DVERS
> ION -DUNIFY; fi ) | sed 's/-D/-DLFC_/g'` `[ -r /usr/include/asm/boot.h ] &&
> echo -DHAS_BOOT_H` `cat mylilo.h` lilo.c
> In file included from /usr/include/linux/kobject.h:10,
> from /usr/include/linux/device.h:28,
> from /usr/include/linux/genhd.h:15,
> from common.h:20,
> from lilo.c:25:
> /usr/include/linux/list.h:323:2: warning: #warning "don't include kernel
> headers in userspace"
Um, why not heed this warning? :)
And yes, it looks like Pat got a change in to prevent kobject.h from
being included if __KERNEL__ is not set, but this is not the proper fix.
See the archives for the many discussions about not including kernel
header files in userspace programs.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-08 5:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-04 13:39 kobject.h makes lilo compile break Simon Scheiwiller
2003-01-08 5:32 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox