* [linux-lvm] Problem compiling LVM 1.0.5
@ 2002-07-31 6:25 Anders Widman
2002-07-31 6:33 ` Alasdair G Kergon
2002-07-31 6:34 ` Martin Mosny, PosTel a.s.
0 siblings, 2 replies; 5+ messages in thread
From: Anders Widman @ 2002-07-31 6:25 UTC (permalink / raw)
To: linux-lvm
I have a problem with compiling LVM 1.0.5.
Configure works fine. but when I run make I get this message:
[root@server 1.0.5]# make
make[1]: Entering directory `/usr/src/LVM/1.0.5/tools'
make[2]: Entering directory `/usr/src/LVM/1.0.5/tools/lib'
make[3]: Entering directory `/usr/src/LVM/1.0.5/tools/lib'
gcc -c -pipe -g -O0 -Wall -DDEBUG -I../../tools/lib -I../../tools -I/usr/src/LVM/1.0.5/tools/lib -o basename.o basename.c
In file included from ../../tools/lib/liblvm.h:59,
from basename.c:34:
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included in userspace
make[3]: *** [basename.o] Error 1
make[3]: Leaving directory `/usr/src/LVM/1.0.5/tools/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/LVM/1.0.5/tools/lib'
make[2]: Entering directory `/usr/src/LVM/1.0.5/tools/man8'
make[3]: Entering directory `/usr/src/LVM/1.0.5/tools/man8'
make[3]: Leaving directory `/usr/src/LVM/1.0.5/tools/man8'
make[2]: Leaving directory `/usr/src/LVM/1.0.5/tools/man8'
make[2]: Entering directory `/usr/src/LVM/1.0.5/tools'
gcc -c -pipe -g -O0 -Wall -DDEBUG -I../tools/lib -I../tools -I/usr/src/LVM/1.0.5/tools/lib -o e2fsadm.o e2fsadm.c
In file included from ../tools/lib/liblvm.h:59,
from ../tools/lvm_user.h:43,
from e2fsadm.c:55:
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included in userspace
make[2]: *** [e2fsadm.o] Error 1
make[2]: Leaving directory `/usr/src/LVM/1.0.5/tools'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/LVM/1.0.5/tools'
make[1]: Entering directory `/usr/src/LVM/1.0.5'
**********************************
There were errors in your compile.
**********************************
make[1]: *** [.touchbuilt] Error 1
make[1]: Leaving directory `/usr/src/LVM/1.0.5'
make: *** [all] Error 2
I am running Red Hat 7.3 with GCC 3.1.1 (and tried with the 2.96 that
came with Red Hat..)
Thanks for any help.
//Anders
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [linux-lvm] Problem compiling LVM 1.0.5
2002-07-31 6:25 [linux-lvm] Problem compiling LVM 1.0.5 Anders Widman
@ 2002-07-31 6:33 ` Alasdair G Kergon
2002-07-31 12:08 ` Luca Berra
2002-07-31 6:34 ` Martin Mosny, PosTel a.s.
1 sibling, 1 reply; 5+ messages in thread
From: Alasdair G Kergon @ 2002-07-31 6:33 UTC (permalink / raw)
To: linux-lvm
On Wed, Jul 31, 2002 at 01:26:06PM +0200, Anders Widman wrote:
> /usr/include/linux/autoconf.h:1:2: #error Invalid kernel header
> included in userspace
Try removing the line in tools/lib/liblvm.h that includes
<linux/autoconf.h>.
Alasdair
--
agk@uk.sistina.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Problem compiling LVM 1.0.5
2002-07-31 6:33 ` Alasdair G Kergon
@ 2002-07-31 12:08 ` Luca Berra
0 siblings, 0 replies; 5+ messages in thread
From: Luca Berra @ 2002-07-31 12:08 UTC (permalink / raw)
To: linux-lvm
On Wed, Jul 31, 2002 at 12:33:48PM +0100, Alasdair G Kergon wrote:
> On Wed, Jul 31, 2002 at 01:26:06PM +0200, Anders Widman wrote:
> > /usr/include/linux/autoconf.h:1:2: #error Invalid kernel header
> > included in userspace
>
> Try removing the line in tools/lib/liblvm.h that includes
> <linux/autoconf.h>.
>
why don't you just do this in CVS?
it has been discussed before, see the list archives.
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Problem compiling LVM 1.0.5
2002-07-31 6:25 [linux-lvm] Problem compiling LVM 1.0.5 Anders Widman
2002-07-31 6:33 ` Alasdair G Kergon
@ 2002-07-31 6:34 ` Martin Mosny, PosTel a.s.
2002-07-31 10:59 ` bscott
1 sibling, 1 reply; 5+ messages in thread
From: Martin Mosny, PosTel a.s. @ 2002-07-31 6:34 UTC (permalink / raw)
To: Anders Widman
Hello Anders,
it's a very simple solution.
in the new RH, glibc-devel and the INCLUDE policy/tactics is to DO NOT
INCLUDE kernel header files to user space program.
you get this error:
#error Invalid kernel header included in userspace
this is only preprocessor directive-it's only to break make.
you can simple use the files from kernel include tree.
change the include path or overwrite the old one.
[root@gis2 root]# more /usr/include/linux/autoconf.h
#error Invalid kernel header included in userspace
[root@gis2 root]#
[root@gis2 root]# more /usr/src/linux/include/linux/autoconf.h
.....
it's save??????
for now yes, all programers need to change INCLUDE files for
COMPATIBLE INCLUDE TACTICS. this same problem has a lot of software.
if you want know all about it read some articles on the web! :))
have a nice day!
Martin
Wednesday, July 31, 2002, 1:26:06 PM, you wrote:
AW> I have a problem with compiling LVM 1.0.5.
AW> Configure works fine. but when I run make I get this message:
AW> [root@server 1.0.5]# make
AW> make[1]: Entering directory `/usr/src/LVM/1.0.5/tools'
AW> make[2]: Entering directory `/usr/src/LVM/1.0.5/tools/lib'
AW> make[3]: Entering directory `/usr/src/LVM/1.0.5/tools/lib'
AW> gcc -c -pipe -g -O0 -Wall -DDEBUG -I../../tools/lib -I../../tools -I/usr/src/LVM/1.0.5/tools/lib -o basename.o basename.c
AW> In file included from ../../tools/lib/liblvm.h:59,
AW> from basename.c:34:
AW> /usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included in userspace
AW> make[3]: *** [basename.o] Error 1
AW> make[3]: Leaving directory `/usr/src/LVM/1.0.5/tools/lib'
AW> make[2]: *** [all] Error 2
AW> make[2]: Leaving directory `/usr/src/LVM/1.0.5/tools/lib'
AW> make[2]: Entering directory `/usr/src/LVM/1.0.5/tools/man8'
AW> make[3]: Entering directory `/usr/src/LVM/1.0.5/tools/man8'
AW> make[3]: Leaving directory `/usr/src/LVM/1.0.5/tools/man8'
AW> make[2]: Leaving directory `/usr/src/LVM/1.0.5/tools/man8'
AW> make[2]: Entering directory `/usr/src/LVM/1.0.5/tools'
AW> gcc -c -pipe -g -O0 -Wall -DDEBUG -I../tools/lib -I../tools -I/usr/src/LVM/1.0.5/tools/lib -o e2fsadm.o e2fsadm.c
AW> In file included from ../tools/lib/liblvm.h:59,
AW> from ../tools/lvm_user.h:43,
AW> from e2fsadm.c:55:
AW> /usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included in userspace
AW> make[2]: *** [e2fsadm.o] Error 1
AW> make[2]: Leaving directory `/usr/src/LVM/1.0.5/tools'
AW> make[1]: *** [all] Error 2
AW> make[1]: Leaving directory `/usr/src/LVM/1.0.5/tools'
AW> make[1]: Entering directory `/usr/src/LVM/1.0.5'
AW> **********************************
AW> There were errors in your compile.
AW> **********************************
AW> make[1]: *** [.touchbuilt] Error 1
AW> make[1]: Leaving directory `/usr/src/LVM/1.0.5'
AW> make: *** [all] Error 2
AW> I am running Red Hat 7.3 with GCC 3.1.1 (and tried with the 2.96 that
AW> came with Red Hat..)
AW> Thanks for any help.
AW> //Anders
AW> _______________________________________________
AW> linux-lvm mailing list
AW> linux-lvm@sistina.com
AW> http://lists.sistina.com/mailman/listinfo/linux-lvm
AW> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Problem compiling LVM 1.0.5
2002-07-31 6:34 ` Martin Mosny, PosTel a.s.
@ 2002-07-31 10:59 ` bscott
0 siblings, 0 replies; 5+ messages in thread
From: bscott @ 2002-07-31 10:59 UTC (permalink / raw)
To: Anders Widman
On Wed, 31 Jul 2002, at 1:34pm, Martin Mosny, PosTel a.s. wrote:
> in the new RH, glibc-devel and the INCLUDE policy/tactics is to DO NOT
> INCLUDE kernel header files to user space program.
Linus has been trying to get people to do this for years.
Basically, the Linus policy is that userland programs should *NEVER*
directly include kernel headers. That includes the C library itself.
Kernel headers are decreed to be Not For Userland Consumption. The kernel
provides a binary interface. If you want to use said binary interface, you
are supposed to write your own headers, either from scratch, or via
cut-and-paste from the kernel headers.
Whether or not this is the Right Thing to do is immaterial; this is what
the kernel hackers expect you to do.
--
Ben Scott <bscott@ntisys.com>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or |
| organization. All information is provided without warranty of any kind. |
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-07-31 12:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-31 6:25 [linux-lvm] Problem compiling LVM 1.0.5 Anders Widman
2002-07-31 6:33 ` Alasdair G Kergon
2002-07-31 12:08 ` Luca Berra
2002-07-31 6:34 ` Martin Mosny, PosTel a.s.
2002-07-31 10:59 ` bscott
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.