Skip to contentSkip to conversation

Read Hat 7.3 and 8.0 compilation problems

DISCUSSION chandrasekhar.nagaraj 7 participants 7 messages Mar 17, 2003 – Mar 18, 2003 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 11 lines · chandrasekhar.nagaraj

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 ?

Quoted 3 lines

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.

#2 lore raw
Quoted 5 lines · Arjan van de Ven
Quoted 2 lines

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

Signature · 1 line
USB is for mice, FireWire is for men!
#3 lore raw
In reply to chandrasekhar.nagaraj
Quoted 5 lines · chandrasekhar.nagaraj

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

Signature · 2 lines
Heinz Ulrich Stille / Tel.: +49-541-9400463 / Fax: +49-541-9400450
design_d gmbh / Lortzingstr. 2 / 49074 Osnabrück / www.design-d.de
#4 lore raw
Quoted 5 lines · Heinz Ulrich Stille

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

#5 lore raw
Quoted 10 lines
Quoted 5 lines

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.

Quoted 2 lines

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.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 7 lines

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