2003-03-17 12:07:53

by Chandrasekhar

[permalink] [raw]
Subject: Read Hat 7.3 and 8.0 compilation problems

Hello,

We have a driver which was originally bulit on Red Hat 7.2 version.Now we
are compiling the same driver on Red Hat 7.3 and 8.0
While compiling we are facing the following problems.
Compilation output :-
The following files are missing
/usr/include/asm/msr.h
/usr/include/asm/fixmap.h
/usr/include/asm/uaccess.h
/usr/include/asm/hardirq.h

But if we compile the driver using the include souces
/usr/src/linux-2.4/include we do not get any compilation errors.
Also our driver when compiled on Red Hat 7.2 does not give any compilation
problems.

Pls help.

Thanks and Regards
Chandrasekhar


2003-03-17 12:19:19

by Arjan van de Ven

[permalink] [raw]
Subject: Re: Read Hat 7.3 and 8.0 compilation problems

On Mon, 2003-03-17 at 13:47, chandrasekhar.nagaraj wrote:
> Hello,
>
> We have a driver which was originally bulit on Red Hat 7.2 version.Now we
> are compiling the same driver on Red Hat 7.3 and 8.0
> While compiling we are facing the following problems.
> Compilation output :-
> The following files are missing
> /usr/include/asm/msr.h
> /usr/include/asm/fixmap.h
> /usr/include/asm/uaccess.h
> /usr/include/asm/hardirq.h

why are you using glibc headers to compile KERNEL modules ?

>
> But if we compile the driver using the include souces
> /usr/src/linux-2.4/include we do not get any compilation errors.

the "standardized between all distros and Linus" place to get headers is
/lib/modules/`uname -r`/build/include
I would suggest you use that.


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2003-03-17 12:21:51

by Heinz Ulrich Stille

[permalink] [raw]
Subject: Re: Read Hat 7.3 and 8.0 compilation problems

On Monday 17 March 2003 13:47, chandrasekhar.nagaraj wrote:
> are compiling the same driver on Red Hat 7.3 and 8.0
> While compiling we are facing the following problems.
> Compilation output :-
> The following files are missing
> /usr/include/asm/msr.h

Are you using the stock rh kernel sources? Did you install the
glibc-kernheaders RPM? This contains severe RedHat braindamage:
/usr/include/{asm,linux} aren't links into the kernel source tree,
but directly installed. Remove the rpm and create the soft links
to /usr/src/linux.

MfG, Ulrich

--
Heinz Ulrich Stille / Tel.: +49-541-9400463 / Fax: +49-541-9400450
design_d gmbh / Lortzingstr. 2 / 49074 Osnabr?ck / http://www.design-d.de

2003-03-17 12:38:21

by Dave Jones

[permalink] [raw]
Subject: Re: Read Hat 7.3 and 8.0 compilation problems

On Mon, Mar 17, 2003 at 01:32:33PM +0100, Heinz Ulrich Stille wrote:

> Are you using the stock rh kernel sources? Did you install the
> glibc-kernheaders RPM? This contains severe RedHat braindamage:
> /usr/include/{asm,linux} aren't links into the kernel source tree,
> but directly installed. Remove the rpm and create the soft links
> to /usr/src/linux.

You have this completely backwards. /usr/include/{asm,linux} are
the headers from the kernel that the glibc was compiled against.
They should NOT never ever be symlinks to anywhere, but glibc's
own copies of the headers.

This is not 'RedHat braindamage', it's the way things should be.
Making them symlinks is the only braindamage here.

Dave

2003-03-17 13:38:59

by John Bradford

[permalink] [raw]
Subject: Re: Read Hat 7.3 and 8.0 compilation problems

> > Are you using the stock rh kernel sources? Did you install the
> > glibc-kernheaders RPM? This contains severe RedHat braindamage:
> > /usr/include/{asm,linux} aren't links into the kernel source tree,
> > but directly installed. Remove the rpm and create the soft links
> > to /usr/src/linux.
>
> You have this completely backwards. /usr/include/{asm,linux} are
> the headers from the kernel that the glibc was compiled against.
> They should NOT never ever be symlinks to anywhere, but glibc's
> own copies of the headers.

Personally, I prefer:

/usr/local/-architecture-/include/sys-include/asm-architecture
/usr/local/-architecture-/include/sys-include/linux

If you install a lot of cross compilers, you might find that that
layout is the most logical.

> This is not 'RedHat braindamage', it's the way things should be.
> Making them symlinks is the only braindamage here.

Not sure if RedHat does this or not, but something that I would always
recommend is avoided, is assuming that /usr/src/linux is a symbolic
link to the current kernel source code.

John.

2003-03-17 19:49:55

by Pete Zaitcev

[permalink] [raw]
Subject: Re: Read Hat 7.3 and 8.0 compilation problems

> Are you using the stock rh kernel sources? Did you install the
> glibc-kernheaders RPM? This contains severe RedHat braindamage:
> /usr/include/{asm,linux} aren't links into the kernel source tree,
> but directly installed. Remove the rpm and create the soft links
> to /usr/src/linux.
>
> MfG, Ulrich

I resent this. It was explained 1000 times before
that /usr/include/{asm,linux} belong to glibc, not kernel.
Replacing these links with pointers to an updated kernel
will produce applications which mismatch the installed glibc,
and then mysteriously fail to work. Heinz-Ulrich can call names
all he wants, but the truth does not change.

-- Pete

2003-03-18 20:28:31

by Olaf Hering

[permalink] [raw]
Subject: Re: Read Hat 7.3 and 8.0 compilation problems

On Mon, Mar 17, Arjan van de Ven wrote:

> > But if we compile the driver using the include souces
> > /usr/src/linux-2.4/include we do not get any compilation errors.
>
> the "standardized between all distros and Linus" place to get headers is
> /lib/modules/`uname -r`/build/include

What moron declared that as 'standard'?
uname -r is as reliable as /etc/mtab


--
USB is for mice, FireWire is for men!