LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Compiling openss7 on Kubuntu Karmic: Can't find the kernel files (https://www.linuxquestions.org/questions/programming-9/compiling-openss7-on-kubuntu-karmic-cant-find-the-kernel-files-762425/)

eantoranz 10-16-2009 12:44 PM

Compiling openss7 on Kubuntu Karmic: Can't find the kernel files
 
Hi!

I'm, trying to compile openss7 on a kubuntu karmic box.

When i do the configure, the process always says it can't find the kernel headers. I've tried to pass them with --with-k-source both pointing to the kernel headers and to the source as well. It simply fails to do it. It doesn't break the configure process, however when compiling I get problems because of missing header files.

I even took the task of changing the Makefile to pass CPPFLAGS but that took me to other problems.

Coming back to the basics, when running ./configure --enable-autotest, I see this (this is on streams... the configure of the whole project took too long to run so I'm working on the directory that first reports problems):

It does find the source:
Code:

checking for kernel source directory... /usr/src/linux-source-2.6.31... yes
checking for kernel source directory... /usr/src/linux-source-2.6.31

Then, it finds a certain .config in the headers directory:
Code:

checking for kernel config file... searching...
checking for kernel config file... /usr/src/linux-source-2.6.31/configs/kernel-2.6.31-i686.config... no
checking for kernel config file... /usr/src/kernels/2.6.31-14-generic-i686/.config... no
checking for kernel config file... /usr/src/kernels/2.6.31-14-generic/.config... no
checking for kernel config file... /usr/src/kernel-headers-2.6.31-14-generic/.config... no
checking for kernel config file... /usr/src/linux-headers-2.6.31-14-generic/.config... yes
checking for kernel config file... /usr/src/linux-headers-2.6.31-14-generic/.config

Then all the headers/symbols/everything-else fail miserably:
Code:

checking for kernel header linux/namespace.h... no
checking for kernel header linux/kdev_t.h... no
checking for kernel header linux/statfs.h... no
checking for kernel header linux/namei.h... no
checking for kernel header linux/locks.h... no
checking for kernel header asm/softirq.h... no
checking for kernel header linux/slab.h... no
checking for kernel header linux/cdev.h... no
checking for kernel header linux/hardirq.h... no
checking for kernel header linux/cpumask.h... no
checking for kernel header linux/kref.h... no
checking for kernel header linux/security.h... no
checking for kernel header asm/uaccess.h... no
checking for kernel header linux/kthread.h... no
checking for kernel header linux/compat.h... no
checking for kernel header linux/ioctl32.h... no
checking for kernel header asm/ioctl32.h... no
checking for kernel header linux/syscalls.h... no
checking for kernel header linux/rwsem.h... no
checking for kernel header linux/smp_lock.h... no
checking for kernel header linux/devfs_fs_kernel.h... no
checking for kernel header linux/compile.h... no
checking for kernel header linux/utsrelease.h... no
checking for kernel header linux/fdtable.h... no
checking for kernel symbol kthread_create export... yes (/proc/kallsyms)
checking for kernel symbol kthread_should_stop export... yes (/proc/kallsyms)
checking for kernel symbol kthread_stop export... yes (/proc/kallsyms)
checking for kernel symbol kthread_bind export... yes (/proc/kallsyms)
checking for kernel symbol cd_forget export... no
checking for kernel symbol cd_forget address... 0xc01ea2b0
checking for kernel symbol tasklist_lock export... no
.
.
.
and so on

And then, of course, when I try to make it:
Code:

gcc -DHAVE_CONFIG_H  -I. -I. -I. -DLFS=1 -imacros ./config.h -imacros ./include/sys/config.h -I. -I./include -I./include -nostdinc -iwithprefix include -DLINUX -D__KERNEL__ -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 '-DKBUILD_STR(s)=#s' '-DKBUILD_BASENAME=KBUILD_STR('`echo libLfS_specfs_a-specfs.o | sed -e 's,lib.*_a-,,;s,\.o,,;s,-,_,g'`')' -DMODULE  -D__NO_VERSION__ -DEXPORT_SYMTAB  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -Wa,-mtune=generic32 -fstack-protector -fstack-protector-all -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -ffreestanding  -c -o libLfS_specfs_a-specfs.o `test -f 'src/kernel/specfs.c' || echo './'`src/kernel/specfs.c
src/kernel/specfs.c:90:2: warning: #ident is a deprecated GCC extension
In file included from src/kernel/specfs.c:123:
src/kernel/strspecfs.c:71:2: warning: #ident is a deprecated GCC extension
src/kernel/strspecfs.c:78:26: error: linux/module.h: No such file or directory
src/kernel/strspecfs.c:79:24: error: linux/init.h: No such file or directory
src/kernel/strspecfs.c:81:28: error: linux/compiler.h: No such file or directory
src/kernel/strspecfs.c:82:24: error: linux/slab.h: No such file or directory
src/kernel/strspecfs.c:83:29: error: linux/interrupt.h: No such file or directory
src/kernel/strspecfs.c:87:25: error: linux/delay.h: No such file or directory
src/kernel/strspecfs.c:88:26: error: linux/sysctl.h: No such file or directory
src/kernel/strspecfs.c:89:24: error: linux/file.h: No such file or directory
src/kernel/strspecfs.c:90:24: error: linux/poll.h: No such file or directory
src/kernel/strspecfs.c:91:22: error: linux/fs.h: No such file or directory
src/kernel/strspecfs.c:93:27: error: linux/proc_fs.h: No such file or directory
src/kernel/strspecfs.c:98:25: error: linux/major.h: No such file or directory
src/kernel/strspecfs.c:99:24: error: asm/atomic.h: No such file or directory
src/kernel/strspecfs.c:101:73: error: linux/kernel.h: No such file or directory
src/kernel/strspecfs.c:102:53: error: linux/pagemap.h: No such file or directory
.
.
.
.
and on and on

So.... what do I have to do?

Thanks in advance.

knudfl 10-16-2009 04:02 PM

The headers in e.g. /usr/src/linux-source-2.6.31
can be used this way :

Code:

./configure CC="gcc -I/usr/src/linux-source-2.6.31/include/ -I/usr/include/"
and / or
Code:

make CC="gcc -I/usr/src/linux-source-2.6.31/include/ -I/usr/include/"

eantoranz 10-16-2009 05:35 PM

I'll try that back at home. In the meantime I'm on a jaunty box and the kernel detection is completely different though I only have the headers in this box. Compilation here fails nevertheless:

Again, from streams:
Code:

$ LANG=en make
make  all-recursive                                           
make[1]: Entering directory `/home/antoranz/openss7/openss7-0.9.2.G/streams-0.9.2.4'
Making all in include                                                             
make[2]: Entering directory `/home/antoranz/openss7/openss7-0.9.2.G/streams-0.9.2.4/include'
make  all-am                                                                               
make[3]: Entering directory `/home/antoranz/openss7/openss7-0.9.2.G/streams-0.9.2.4/include'
make[3]: Nothing to be done for `all-am'.                                                 
make[3]: Leaving directory `/home/antoranz/openss7/openss7-0.9.2.G/streams-0.9.2.4/include'
make[2]: Leaving directory `/home/antoranz/openss7/openss7-0.9.2.G/streams-0.9.2.4/include'
Making all in .                                                                           
make[2]: Entering directory `/home/antoranz/openss7/openss7-0.9.2.G/streams-0.9.2.4'       
gcc -DHAVE_CONFIG_H  -I. -I. -I. -DLFS=1 -imacros ./config.h -imacros ./include/sys/config.h -I. -I./include -I./include -nostdinc -iwithprefix include -DLINUX -D__KERNEL__ -I/usr/src/linux-headers-lbm-2.6.28-15-generic -I/lib/modules/2.6.28-15-generic/build/include -Iinclude2 -I/lib/modules/2.6.28-15-generic/build/include -I/lib/modules/2.6.28-15-generic/build/arch/x86/include -include /lib/modules/2.6.28-15-generic/build/include/linux/autoconf.h -Iubuntu/include -I/lib/modules/2.6.28-15-generic/build/ubuntu/include -I/lib/modules/2.6.28-15-generic/build/arch/x86/include/asm/mach-default '-DKBUILD_STR(s)=#s' '-DKBUILD_BASENAME=KBUILD_STR('`echo libLfS_specfs_a-specfs.o | sed -e 's,lib.*_a-,,;s,\.o,,;s,-,_,g'`')' -DMODULE  -D__NO_VERSION__ -DEXPORT_SYMTAB  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -Wa,-mtune=generic32 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fwrapv -ffreestanding  -c -o libLfS_specfs_a-specfs.o `test -f 'src/kernel/specfs.c' || echo './'`src/kernel/specfs.c                                           
In file included from src/kernel/specfs.c:123:                                                                                               
src/kernel/strspecfs.c: In function 'specfs_init_cache':                                                                                     
src/kernel/strspecfs.c:1406: warning: passing argument 5 of 'kmem_cache_create' from incompatible pointer type                               
src/kernel/strspecfs.c:1406: error: too many arguments to function 'kmem_cache_create'                                                       
In file included from src/kernel/specfs.c:126:                                                                                               
src/kernel/strlookup.c: In function 'cdev_lookup':                                                                                           
src/kernel/strlookup.c:508: warning: format not a string literal and no format arguments                                                     
src/kernel/strlookup.c:514: warning: format not a string literal and no format arguments                                                     
src/kernel/strlookup.c:521: warning: format not a string literal and no format arguments                                                     
src/kernel/strlookup.c: In function 'cdrv_lookup':                                                                                           
src/kernel/strlookup.c:562: warning: format not a string literal and no format arguments                                                     
src/kernel/strlookup.c: In function 'fmod_lookup':
src/kernel/strlookup.c:604: warning: format not a string literal and no format arguments
src/kernel/strlookup.c: In function 'cdev_search':
src/kernel/strlookup.c:709: warning: format not a string literal and no format arguments
src/kernel/strlookup.c:716: warning: format not a string literal and no format arguments
src/kernel/strlookup.c: In function 'fmod_search':
src/kernel/strlookup.c:768: warning: format not a string literal and no format arguments
src/kernel/strlookup.c: In function 'cmin_search':
src/kernel/strlookup.c:823: warning: format not a string literal and no format arguments
src/kernel/strlookup.c:830: warning: format not a string literal and no format arguments
src/kernel/strlookup.c:840: warning: format not a string literal and no format arguments
src/kernel/strlookup.c:848: warning: format not a string literal and no format arguments
In file included from src/kernel/specfs.c:129:
src/kernel/strattach.c: In function 'check_mnt':
src/kernel/strattach.c:131: error: 'struct vfsmount' has no member named 'mnt_namespace'
src/kernel/strattach.c:131: error: 'struct task_struct' has no member named 'namespace'
src/kernel/strattach.c: In function 'do_fattach':
src/kernel/strattach.c:200: error: 'struct nameidata' has no member named 'dentry'
src/kernel/strattach.c:200: error: 'struct nameidata' has no member named 'mnt'
src/kernel/strattach.c:200: error: 'struct nameidata' has no member named 'dentry'
src/kernel/strattach.c:203: error: 'struct nameidata' has no member named 'mnt'
src/kernel/strattach.c:208: error: 'struct nameidata' has no member named 'mnt'
src/kernel/strattach.c:208: error: 'struct nameidata' has no member named 'mnt'
src/kernel/strattach.c:208: error: 'struct nameidata' has no member named 'dentry'
src/kernel/strattach.c:226: error: implicit declaration of function 'path_release'
src/kernel/strattach.c: In function 'do_fdetach':
src/kernel/strattach.c:253: error: 'struct nameidata' has no member named 'dentry'
src/kernel/strattach.c:253: error: 'struct nameidata' has no member named 'mnt'
src/kernel/strattach.c:255: error: 'struct nameidata' has no member named 'mnt'
src/kernel/strattach.c:257: error: 'struct nameidata' has no member named 'dentry'
src/kernel/strattach.c:262: error: 'struct nameidata' has no member named 'mnt'
src/kernel/strattach.c:265: error: 'struct nameidata' has no member named 'mnt'
In file included from src/kernel/specfs.c:132:
src/kernel/strpipe.c: In function 'do_spipe':
src/kernel/strpipe.c:372: warning: assignment discards qualifiers from pointer target type
make[2]: *** [libLfS_specfs_a-specfs.o] Error 1
make[2]: Leaving directory `/home/antoranz/openss7/openss7-0.9.2.G/streams-0.9.2.4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/antoranz/openss7/openss7-0.9.2.G/streams-0.9.2.4'
make: *** [all] Error 2


knudfl 10-17-2009 04:26 AM

http://www.openss7.org/download.html
OK, I remember those files. Not easy to compile.
Most easy on older Linux's.
... Quote from the text :
" Modifications to build under Fedora 2.6.22.5-49 kernel.
These changes also support 2.6.22.9-91.fc7 kernel. Modifications
to build under Fedora 2.6.25-45.fc9 and 2.6.26.5-45.fc9 kernels.
Documented lib32gcc1 problem on Ubuntu. "
.....

'streams-0.9.x' and most of the other files ( but not all )
can be compiled with kernel 2.6.18.x , gcc-4.1 .
I did that about a year ago. ( PCLinuxOS 2007.)
And not for use, just to find out, if possible to compile it.

May be more luck with the latest streams ?
http://www.openss7.org/repos/tarball....9.2.4.tar.bz2
.....
EDIT EDIT : Seems to be no problem, as long as it is a supported
kernel. Made a test compile on Scientific SL 5.3 ( = Redhat EL 5.3
= CentOS 5.3 ), kernel 2.6.18-128.1.14.el5 → no errors, openSS7.
.....
Some of the files are available for / in Ubuntu ?
( You didn't tell, which functions, you intended to use.)

sudo apt-get install libss7-1

Googling .. lis ubuntu ..
http://www.google.com/search?hl=en&s...earch&aq=f&oq=
QUOTE : " Ubuntu - LIS
Ubuntu has a built in remote desktop client. The client uses VNC to more
or less transmit a video of your computers screen to the remote machine. ..."
.....

Frank85 10-20-2009 09:10 AM

I have had the same problem like eantoranz.
I solved it by changing the operating system from ubuntu 9.04 to debian 5.0.

Then I can do successful configure, make and make install.

But after this I can execute only the netperf-Tool and not additional the iperf-Tool, which should be installed too.

I don't use any special options by configure, so that the tool normally are in /usr/bin but there isn't it.

Have anybody an idea, what's going wrong?

Regards
Frank

knudfl 10-20-2009 02:04 PM

@ Frank85 ... welcome to LQ.

'iperf' seems not to be made by default.
cd iperf , ./configure && make , # make install
provides /usr/bin/iperf

.....

Frank85 10-21-2009 05:56 AM

Thank you knudfl.

Now netperf and iperf are installed but I have a little problem:

If I execute: netperf_sctp_stream -H SERVER_IP_ADDRESS
I get an error shown below:
Code:

/usr/bin/netperf    -i 10,2 -I 99,5 -P 1 -l 60 -t SCTP_STREAM -H SERVER_IP_ADDRESS  -- -m 64 -s 16M -S 16M 
The test you requested is unknown to this netperf.
Please verify that you have the correct test name,
and that test family has been compiled into this netperf.

How or why is it possible that the SCTP_STREAM test fails. I tried than tcp and this works, it is only a problem with the SCTP_STREAM.

Regards

essafi 03-12-2010 05:13 AM

have you finiched the configuration of openSS7 layers?
because i do a succesful installation (configure, make and make install) ,i don't know now what'is the second step?
Have anybody an idea and is there some manuals to help me?
thanks for help!!

knudfl 03-12-2010 05:51 AM

I have no idea how to use it, but I have never seen
any other software installing that many manuals :
man pages. Did you read some of those ?
There is about a thousand ' man <command> ' for ss7.


Some online manuals : http://www.openss7.org/manuals.html

.....

essafi 03-12-2010 07:01 AM

the problem i don't now how to start sigtran service?
thanks frunk.

essafi 03-12-2010 07:16 AM

all the packatge are installed and now i must start streams ,sigtran.. because i want to configure a sigtran stack,how can i do??
thanks for help!!

knudfl 03-12-2010 07:38 AM

@essafi
The only way to get answers, is to study all that documentation.

Google .. man sigtran ..
http://www.openss7.net/m3ua_man.html
""OpenSS7: Documentation: Man Pages: SIGTRAN Stack: M3UA
OpenSS7 Project Manual Pages SIGTRAN Stack.""

Google .. streams sigtran ..
http://www.openss7.org/manuals/sigtran.pdf > >
OpenSS7 STREAMS SIGTRAN Installation and Reference Manual
.....

essafi 03-12-2010 07:50 AM

i have readen it but there isn't information about starting sigtran service

essafi 03-24-2010 05:55 AM

i have now an sctp association betwen two host client and server,so i can send message like 'hello world',I want now send a sigtran message ,how can I do it?
thanks for your help.


All times are GMT -5. The time now is 11:29 AM.