error: version.h not found - Is the kernel headers

More
17 Mar 2014 02:09 #44887 by taffou
Hi, I am new here and this is my first post.

I tried to install linuxcnc on my debian wheezy (from debian 7.3.0). To do that I followed those two How-Tos:
1- wiki.linuxcnc.org/cgi-bin/wiki.pl?Debian_Lenny_Compile_RTAI
2- wiki.linuxcnc.org/cgi-bin/wiki.pl?Debian_Lenny_Compile_LinuxCNC

I was able to compile and install the linux-kernel 2.6.38.8 with rtai 3.9.1. I can run the rtai latency test ...
Now when I want to compile linuxcnc using this command:

./configure --enable-run-in-place

I get this error:

configure: error: version.h not found - Is the kernel headers package installed ?


Following is the complete outputs of the command:

taf@febe:~/linuxcnc_compiling/emc2-dev/src$ ./configure --enable-run-in-place
checking build toplevel... /home/taf/linuxcnc_compiling/emc2-dev
checking installation prefix... run in place
checking for grep... /bin/grep
checking for egrep... /bin/egrep
checking for RT dir... Using /usr/realtime/bin/rtai-config as the RT signature
checking for location of kernel headers... using value from RTS: /usr/src/linux-3.8.13
checking for cc version... found cc in rtai-config
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for usability of rdtscll from asm/msr.h... no
checking for usability of linux/hidraw.h... yes
checking for libmodbus3... yes - version 3.0.3
checking for libusb-1.0... yes
checking for grep that handles long lines and -e... (cached) /bin/grep
checking for egrep... (cached) /bin/egrep
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking /usr/src/linux-3.8.13/include/linux/version.h usability... no
checking /usr/src/linux-3.8.13/include/linux/version.h presence... no
checking for /usr/src/linux-3.8.13/include/linux/version.h... no
configure: error: version.h not found - Is the kernel headers package installed ?
taf@febe:~/linuxcnc_compiling/emc2-dev/src$


Looking at the line 7 of this ouput, I think the command tries to configure linuxcnc using linux-3.8.13-Kernel instead of the installed 2.6.38.8-Kernel. 3.8.13 isn't install on my system.

Please can somebody help me with a tip to resolve this issue?

Regards,
Taffou

Please Log in or Create an account to join the conversation.

More
17 Mar 2014 03:01 #44889 by ArcEye
Hi,

I think you are correct as to the source of the problem.

The easiest way around would probably be to create a symlink in /usr/src called linux and point it to your compiled sources dir.

There are a lot of problems with paths once you start compiling inside user dirs, this being one

regards
The following user(s) said Thank You: taffou

Please Log in or Create an account to join the conversation.

More
17 Mar 2014 03:27 #44891 by taffou
Thanks for the fast answer.

The easiest way around would probably be to create a symlink in /usr/src called linux and point it to your compiled sources dir.


I already have a symlink named linux to the kernel source into /usr/src/ . See:

taf@febe:/usr/src$ ls -la
insgesamt 111696
drwxrwxr-x 6 root developers 4096 Jan 12 12:58 .
drwxr-xr-x 12 root root 4096 Jan 11 03:01 ..
drwxr-xr-x 3 root root 4096 Jan 11 00:17 kernel-patches
lrwxrwxrwx 1 root root 15 Jan 12 12:58 linux -> linux-2.6.38.8/
drwxr-xr-x 25 taf developers 4096 Mär 16 13:17 linux-2.6.38.8
drwxr-xr-x 24 root root 4096 Jan 12 12:51 linux-headers-2.6.38.8-rtai
-rw-r--r-- 1 taf developers 7249464 Jan 11 01:48 linux-headers-2.6.38.8-rtai_2.6.38.8-rtai-10.00.Custom_i386.deb
-rw-r--r-- 1 taf developers 26268942 Jan 11 01:46 linux-image-2.6.38.8-rtai_2.6.38.8-rtai-10.00.Custom_i386.deb
-rw-r--r-- 1 taf developers 76336292 Jan 11 02:00 linux-source-2.6.38.8-rtai_2.6.38.8-rtai-10.00.Custom_all.deb
drwxr-xr-x 3 root root 4096 Jan 12 23:58 modules
-rw-r--r-- 1 root root 4486739 Jan 11 00:14 rtai-source.tar.bz2
taf@febe:/usr/src$

There are a lot of problems with paths once you start compiling inside user dirs, this being one

Instead of inside user dirs, where can I start compiling otherwise?

Taffou

Please Log in or Create an account to join the conversation.

More
17 Mar 2014 16:17 - 17 Mar 2014 20:04 #44913 by ArcEye
Hi

When I looked more carefully at your output I saw this

checking for RT dir... Using /usr/realtime/bin/rtai-config as the RT signature
checking for location of kernel headers... using value from RTS: /usr/src/linux-3.8.13


I think this means your realtime build is screwed because it refers to the 3.8.13 headers

Instead of inside user dirs, where can I start compiling otherwise?


After similar problems building on machines with multiple kernels, I use a new /usr/srcX directory for each kernel and have a symlink called /usr/src which is pointed to the current one
(I have 5 different /usr/src directories on this machine)

In this directory you should just have the kernel sources, with a symlink to them called linux, the realtime sources and linuxcnc sources.

I would start again with the kernel build in that dir and go from there.

The instructions you are using are quite old, and the kernel you are using is very old.
So long as it supports your hardware that is fine, but 3.5.7 builds very well, that is what I have been running for 9 months, you may want to try it later.

regards
Last edit: 17 Mar 2014 20:04 by ArcEye.

Please Log in or Create an account to join the conversation.

More
18 Mar 2014 03:12 #44933 by taffou
Hi,

I going now to build 3.5.7, but please I have another questions:

1- Which version of RTAI works with linux-kernel 3.5.7?
2- And where can I find the patch of this version of RTAI for debian?

I have seen this post from you:
www.linuxcnc.org/index.php/english/forum...ing-on-debian-wheezy
Is there a magma rtai in tar-file via ftp/http available? Or I most install cvs on my system to get the files?

Thanks,
Taffou

Please Log in or Create an account to join the conversation.

More
18 Mar 2014 04:45 #44938 by taffou
Hi,

I have downloaded linux-3.5.7 and the magna rtai from cvs.gna.org. My question now is, can I use the old instrution( 1 , 2 ) as a basis of the installation? I mean:

1- cd to-the-rtai-directory (the new from magna)
1- apply the path with:
path -p1 < xxxx/base/arch/x86/patches/hal-linux-3.5.7-x86-3.patch
path -p1 < xxxx/base/arch/x86/patches/hal-linux-3.5.7-x86-4.patch

2- Building the RTAI packages:
dpkg-buildpackage -rfakeroot -uc

3- Installing the RTAI packages:
cd ..
su
dpkg -i librtai1_x.x.x-x_i386.deb
dpkg -i librtai-dev_x.x.x-x_i386.deb
dpkg -i rtai-source_x.x.x-x_i386.deb
exit

4- Building the kernel packages

5- Configuring the kernel

6- Installing the kernel packages

7-Building the RTAI kernel modules package

8- Configuring the RTAI kernel modules

9- Installing the RTAI kernel modules package

etc ...

Thanks,
Taffou

Please Log in or Create an account to join the conversation.

More
18 Mar 2014 15:55 #44946 by ArcEye
Hi

I going now to build 3.5.7, but please I have another questions:


My fault for getting your interest up, should have learnt.

My question now is, can I use the old instrution(1, 2) as a basis of the installation?


No they are all wrong, you don't use debian patches or debian build tools, there are no debian packages, you certainly don't install v4 patch on top of v3.
The build needs to be done from sources, by hand.

I assume you want a modern rtai kernel that runs on debian 7?

In which case take the same solution as birchy and install 3.4.55 from debs
highlab.com/~seb/linuxcnc/rtai-for-3.4-prerelease/

I help test these in early stages, they work on Ubuntu 12.04 and Debian 7.x

When you come to compile Linuxcnc if you get errors regards missing includes in bits/xxx and asm/xxx
Go into /usr/include/i386-linux-gnu and symlink all the 4 folders and the files in it back to /usr/include (or just copy them if symlinking is too difficult)

regards

Please Log in or Create an account to join the conversation.

More
19 Mar 2014 05:07 #44963 by taffou
Hi,

thank for your post.

I assume you want a modern rtai kernel that runs on debian 7?


Yes. I trying now a birchy-approach, namly the instruction in this post: #42430

I will give you tomorrow a feeback.

Regards,
Taffou

Please Log in or Create an account to join the conversation.

More
19 Mar 2014 14:24 - 19 Mar 2014 15:40 #44971 by ArcEye
OK

Obviously the process is as important as the result, I can appreciate that

I don't think the RTAI link is still live, I will check it later

regards

EDIT

Link fixed
Last edit: 19 Mar 2014 15:40 by ArcEye.
The following user(s) said Thank You: taffou

Please Log in or Create an account to join the conversation.

More
21 Mar 2014 22:04 - 21 Mar 2014 22:07 #45031 by taffou
Hi,

the installation was succesful, see the screenshot:



Thank you very much for your tip and for your time.

Please look at the result of my latency test.

File Attachment:

File Name: latency_test.txt
File Size:20 KB

What do you think about? This does not look good, right?

Regards,
Taffou
Attachments:
Last edit: 21 Mar 2014 22:07 by taffou.

Please Log in or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum