Re: kernel headers from vanilla kernel compilation
- From: Tom Forsmo <spam@xxxxxxxxxx>
- Date: Sat, 20 Jan 2007 02:18:35 +0100
John-Paul Stewart wrote:
Tom Forsmo wrote:....When using kernels from linux distributions there are usually a kernel package and a kernel-headers package which are be installed.
But when compiling the a vanilla kernel, there are no instructions in the readme file on how to install the headers. How can this be done
Which "kernel headers" are you referring to? On most distros there are two types of of "kernel header" packages available.
Then (on Debian, at least) there is also a linux-kernel-headers package that contains the headers from /usr/include/linux and /usr/include/asm. You need these headers (and hence this package) to build user space programs. Those directories used to be symlinks to the live kernel headers under /usr/src/linux but this no longer recommended. You need your distro's package for these "kernel headers" regardless of what kernel version you're currently running.
It makes sense now. I was not aware that the headers were from different packages. So that means the headers in /usr/include must be compatible with the glibc version and package.
I would assume that truecrypt is a user space program (not a kernel module), so you need the second type of "kernel headers". Install your distribution's packaged headers. (Note that the package name may not be "kernel headers" at all. Those might be in a glibc-devel package or something.)
its both a kernel module and a userspace program. But I have managed to make the kernel module compile without problems, so the problem now lies with the userspace program
The BYTE_ORDER macro you mention is defined in /usr/include/endian.h which should be in the same package as the other basic glibc headers, not the "kernel headers" of any sort.
The program seems to include its own endian.h file, which might override the /usr/include/endian.h. I am not sure whats going on here, but there seems to be either some conflict or that the truecrypt local endian.h file are missing something it expects from the system version.
Maybe this problem is distribution dependant, because different distributions contains different glibc version and mine just does not contain the version of glibc headers truecrypt needs. So the remedy might seem to be finding out why the local endian.h does not define BYTE_ORDER and what else might be missing compared to the system/glibc version of endian.h Would that be a correct analysis?
Below is the output from the compilation:
[root@duplo Linux]# ./build.sh
Building truecrypt... Compiling Aescrypt.c
cc -w -I../../Crypto -I../../Common -I../Kernel -I/usr/include -D_cdecl="" -DBOOL=int -DTRUE=1 -DFALSE=0 -DMAX_PATH=260 -D__int8="char" -D__int16="short" -D__int32="int" -D__int64="long long" -O2 -fno-strict-aliasing -MMD -o ../../Crypto/Aescrypt.o -c .../../Crypto/Aescrypt.c
In file included from ../../Crypto/Aesopt.h:144,
from ../../Crypto/Aescrypt.c:33:
.../../Common/Endian.h:43:5: error: #error Byte order cannot be determined (BYTE_ORDER undefined)
make: *** [../../Crypto/Aescrypt.o] Error 1
Error: Failed to build truecrypt
regards
tom
.
- Follow-Ups:
- Re: kernel headers from vanilla kernel compilation
- From: John-Paul Stewart
- Re: kernel headers from vanilla kernel compilation
- References:
- kernel headers from vanilla kernel compilation
- From: Tom Forsmo
- Re: kernel headers from vanilla kernel compilation
- From: John-Paul Stewart
- kernel headers from vanilla kernel compilation
- Prev by Date: Serial port configuration
- Next by Date: Capitalization
- Previous by thread: Re: kernel headers from vanilla kernel compilation
- Next by thread: Re: kernel headers from vanilla kernel compilation
- Index(es):
Relevant Pages
|