LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 11-17-2011, 08:34 AM   #1
s.joseph
LQ Newbie
 
Registered: Jul 2011
Posts: 3

Rep: Reputation: Disabled
Missing kernel headers


Hi,
I am trying to cross compile the kernel 2.6.29 to a mips platform. I was able to do that without any problem. I now want to cross compile an application also. The application include a lot of kernel headers like aio.h which in turn calls others like kmalloc.h These kernel headers are not part of my toolchain. I tried "make ARCH=mips install_headerss" to get them but still they are not part of the exported headers. I tried cross compiling with both uClibc as well as glibc. Can any one suggest how to resolve this issue.

Thanks
 
Old 11-17-2011, 01:31 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 1,773

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Applications should not usually be including kernel headers. kernel headers are only for the kernel and kernel modules. If you are missing aio.h it most likely means that you have your includes done wrong in the make. There is both a user-space aio.h (/usr/include/aio.h) and a kernel aio.h (/usr/src/kernels/${KERNEL}/include/config/aio.h) which are different.

When you looking for a fix to an error, you are a lot more likely to get a helpful response if you copy and paste the exact command that failed and the error message that was printed.
 
Old 11-18-2011, 12:48 AM   #3
s.joseph
LQ Newbie
 
Registered: Jul 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Error log / Command

Commands used to compile:

root@ubuntu10:/mnt/acelinux# source Variables.sh
root@ubuntu10:/mnt/acelinux# cd acelinux
root@ubuntu10:/mnt/acelinux/acelinux# make > output.log 2>&1

Contents of Variables.sh

export ACE_ROOT=/mnt/acelinux
export MIPS=/home/ubuntu/sibin/new_timesys/wds3/toolchain/bin
export ESW_SOURCECODE_ROOT=/mnt/acelinux
export ESW_DEBUG_SYMBOLS=-g

The error log is attached.

I exported the headers using "make headers_install ARCH=mips"

The following directories were exported.
asm asm-generic drm linux mtd rdma sound video

I assume the kernel headers should be in "linux/". I am attaching the list of file in linux/
Attached Files
File Type: log output.log (19.2 KB, 2 views)
File Type: txt ls.txt (3.5 KB, 2 views)
 
Old 11-18-2011, 12:58 PM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 1,773

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Command that failed is:

home/ubuntu/sibin/new_timesys/wds3/toolchain/bin/mipsisa32r2-timesys-linux-uclibc-g++ -W -Wall -Wpointer-arith -pipe -O3 -g -Wno-uninitialized -D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT -DACE_HAS_AIO_CALLS -I/mnt/acelinux -DACE_HAS_EXCEPTIONS -DACE_BUILD_DLL -DACE_OS_BUILD_DLL -c -fPIC -o .shobj/Basic_Types.o Basic_Types.cpp

and the failed include is:
/mnt/acelinux/acelinux/OS.h:3377:33: error: linux/aio.h: No such file or directory

No idea what ACE is all about, but the directory has the same files as /usr/include/linux on a normal install. There is no aio.h in that directory, which makes me think that this must be something special related to ACE.
 
Old 11-19-2011, 05:09 AM   #5
s.joseph
LQ Newbie
 
Registered: Jul 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi,
The aio.h file is not part of ACE (http://www.cs.wustl.edu/~schmidt/ACE.html). aio.h is a kernel header which is normally at usr/include/aio.h on your PC. I am able to compile ACE on the PC without any problem. Problem occurs when I am cross compiling for MIPS. The toolchain does not contain the header file. I am not able to get it even after exporting using headers_install. So my question was how do I get those missing headers.
 
Old 11-19-2011, 12:41 PM   #6
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 1,773

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by s.joseph View Post
Hi,
The aio.h file is not part of ACE (http://www.cs.wustl.edu/~schmidt/ACE.html). aio.h is a kernel header which is normally at usr/include/aio.h on your PC. I am able to compile ACE on the PC without any problem. Problem occurs when I am cross compiling for MIPS. The toolchain does not contain the header file. I am not able to get it even after exporting using headers_install. So my question was how do I get those missing headers.
The files in /usr/include are not kernel headers; they are headers for user-space programs. The files in /usr/include/linux are kernel headers which most user space programs should not be including. If you want the one in /usr/include, then there is something wrong with your make.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Missing kernel headers for Backtrack 3 frank81 Linux - Software 7 03-28-2014 09:29 AM
Slackware64-current missing kernel headers? UpAndUp Slackware 2 08-26-2009 08:08 PM
RHEL4 Kernel -devel/headers packages ...missing directories max_cherry Red Hat 4 01-15-2009 10:53 PM
Am I missing some stuff in /build/ ? Kernel Headers?!?!? yttrium88 Linux - Newbie 1 10-28-2006 09:40 PM
Missing Kernel Headers utku Debian 16 02-09-2005 03:20 AM


All times are GMT -5. The time now is 02:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration