LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-05-2008, 02:09 PM   #1
whirler
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Rep: Reputation: 0
Error compiling CIPE 1.6.0 in Slackware 12.1


I'm working on compiling version 1.6.0 of the CIPE module on my Slackware 12.1 machine with kernel version 2.6.24.5-smp.

I did have an issue with the configure script not recognizing my kernel version but after doing some research online found a solution. I had to edit the KVERS variable to manually set my kernel version. Now the configure script runs without any errors (I mention this just in case it could have ramifications on what I'm trying to do).

However, I'm now getting an error when I run "make". Here is the ouput I receive:

Code:
gmake -C lib all
gmake[1]: Entering directory `/usr/src/cipe-1.6.0/lib'
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c cipe_syslog.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c debug.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c dsprintf.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c getaddr.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c gethex.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c hex.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c hexdump.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c hexstr.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c parseopt.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c retstatus.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c setsig.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c secchk.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c sighand.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c socks_errlist.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c socks5_open.c
socks5_open.c: In function 'socks5_open':
socks5_open.c:58: warning: pointer targets in passing argument 2 of 'writen' differ in signedness
socks5_open.c:60: warning: pointer targets in passing argument 2 of 'writen' differ in signedness
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c socks5_cmd.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c xread.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c xwrite.c
gcc  -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -Wmissing-prototypes -DHAVE_CONFIG_H -DLIBRARY   -MD -c xwritev.c
ar rcs libcipe.a cipe_syslog.o debug.o dsprintf.o getaddr.o gethex.o hex.o hexdump.o hexstr.o parseopt.o retstatus.o setsig.o secchk.o sighand.o socks_errlist.o socks5_open.o socks5_cmd.o xread.o xwrite.o xwritev.o
gmake[1]: Leaving directory `/usr/src/cipe-1.6.0/lib'
gmake -C 2.6.24.5-smp-i386-SMP-cb all
gmake[1]: Entering directory `/usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb'
ln -sf ../cipe/*.[chS] .
ln -sf crc32.c ucrc32.c
gcc -Wp,-MD,.crcgen.o.d  -I/usr/src/linux-2.6.24.5/include -I. -include ./config.h -I/usr/src/linux-2.6.24.5/include  -I../lib -pipe -O3 -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -o crcgen.o -c crcgen.c
crcgen.c: In function 'main':
crcgen.c:37: warning: pointer targets in passing argument 2 of 'crc32' differ in signedness
crcgen.c:41: warning: pointer targets in passing argument 2 of 'crc32' differ in signedness
gcc -Wp,-MD,.ucrc32.o.d  -I/usr/src/linux-2.6.24.5/include -I. -include ./config.h -I/usr/src/linux-2.6.24.5/include  -I../lib -pipe -O3 -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -o ucrc32.o -c ucrc32.c
gcc  -o crcgen crcgen.o ucrc32.o 
sed -n '/@api/{n;s,[/*#],,g;s,^,   ,p;}' config.h | ./crcgen - >version.h
gcc -Wp,-MD,.ciped.o.d  -I/usr/src/linux-2.6.24.5/include -I. -include ./config.h -I/usr/src/linux-2.6.24.5/include  -I../lib -pipe -O3 -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -o ciped.o -c ciped.c
ciped.c: In function 'opendev':
ciped.c:345: warning: pointer targets in passing argument 3 of 'getsockname' differ in signedness
ciped.c:401: warning: pointer targets in initialization differ in signedness
ciped.c:416: warning: pointer targets in passing argument 1 of 'gethex' differ in signedness
ciped.c:417: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
ciped.c: In function 'kxchg':
ciped.c:752: warning: pointer targets in passing argument 2 of 'ctrl' differ in signedness
gcc -Wp,-MD,.options.o.d  -I/usr/src/linux-2.6.24.5/include -I. -include ./config.h -I/usr/src/linux-2.6.24.5/include  -I../lib -pipe -O3 -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -o options.o -c options.c
gcc -Wp,-MD,.ioctl.o.d  -I/usr/src/linux-2.6.24.5/include -I. -include ./config.h -I/usr/src/linux-2.6.24.5/include  -I../lib -pipe -O3 -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strength-reduce -g  -o ioctl.o -c ioctl.c
gcc  -o ciped-cb ciped.o options.o ioctl.o ucrc32.o  -L../lib -lcipe
gmake -C /usr/src/linux-2.6.24.5 SUBDIRS=/usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb modules
gmake[2]: Entering directory `/usr/src/linux-2.6.24.5'
  CC [M]  /usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb/module.o
In file included from /usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb/../cipe/cipe.h:161,
                 from /usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb/../cipe/module.c:15:
/usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb/../cipe/cryptoapi.h:94: error: redefinition of 'crypto_tfm_ctx'
include/linux/crypto.h:509: error: previous definition of 'crypto_tfm_ctx' was here
In file included from /usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb/../cipe/module.c:15:
/usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb/../cipe/cipe.h:274:1: warning: "CURRENT_TIME_SEC" redefined
In file included from include/linux/skbuff.h:19,
                 from include/linux/if_ether.h:113,
                 from include/linux/netdevice.h:29,
                 from /usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb/../cipe/cipe.h:152,
                 from /usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb/../cipe/module.c:15:
include/linux/time.h:106:1: warning: this is the location of the previous definition
gmake[3]: *** [/usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb/module.o] Error 1
gmake[2]: *** [_module_/usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb] Error 2
gmake[2]: Leaving directory `/usr/src/linux-2.6.24.5'
gmake[1]: *** [all25] Error 2
gmake[1]: Leaving directory `/usr/src/cipe-1.6.0/2.6.24.5-smp-i386-SMP-cb'
make: *** [all] Error 2
Note the errors at the bottom of the output. Has anyone encountered this problem before or know of a potential solution?

Here is the site for the CIPE project just in case:
http://sites.inka.de/~bigred/devel/cipe.html
 
Old 11-05-2008, 03:14 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105
The linux-cipe project has been dead for 4 years. The code will not compile against the 2.6.x kernel for several years now.

Eric
 
Old 11-05-2008, 03:35 PM   #3
rhermsen
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 41

Rep: Reputation: 16
Maybe this link will help:
http://sites.inka.de/~W1011/archive/.../msg00002.html

or this one
http://www.nabble.com/Compile-error-...td4592562.html

Hopefully you get one step further.
 
Old 11-05-2008, 03:41 PM   #4
whirler
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the links. I'll give those a try and see if that helps.
 
Old 11-05-2008, 05:31 PM   #5
whirler
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Maybe this link will help:
http://sites.inka.de/~W1011/archive/.../msg00002.html

or this one
http://www.nabble.com/Compile-error-...td4592562.html

Hopefully you get one step further.
I was able to download the patch and make some of the the suggested changes to one of the source code files. However, I'm not sure what to do to install the patch. I tried running it as a regular shell script (./cipe-2.6.14.patch) but it doesn't seem to work. Here is the contents of the patch file:

Code:
Index: cipe/cipe.h
===================================================================
RCS file: /cvsroot/cipe-linux/cipe-linux/cipe/cipe.h,v
retrieving revision 1.61
diff -u -r1.61 cipe.h
--- cipe/cipe.h 10 May 2005 19:17:37 -0000      1.61
+++ cipe/cipe.h 6 Nov 2005 17:40:31 -0000
@@ -250,8 +250,10 @@
 #endif
 
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,17)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 #define get_fast_time do_gettimeofday
 #endif
+#endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71)
 #define sk_shutdown shutdown
Index: cipe/cryptoapi.h
===================================================================
RCS file: /cvsroot/cipe-linux/cipe-linux/cipe/cryptoapi.h,v
retrieving revision 1.6
diff -u -r1.6 cryptoapi.h
--- cipe/cryptoapi.h    3 Aug 2004 08:21:17 -0000       1.6
+++ cipe/cryptoapi.h    6 Nov 2005 17:40:31 -0000
@@ -90,10 +90,12 @@
 
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
 static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm)
 {
     return (void *)&tfm[1];
 }
+#endif
 
 static inline void crypto_cipher_encrypt_blk(struct crypto_tfm *tfm,
                                              u8 *dst,
Index: cipe/device.c
===================================================================
RCS file: /cvsroot/cipe-linux/cipe-linux/cipe/device.c,v
retrieving revision 1.56
diff -u -r1.56 device.c
--- cipe/device.c	3 Aug 2004 08:21:17 -0000	1.56
+++ cipe/device.c	6 Nov 2005 17:40:31 -0000
@@ -441,7 +441,7 @@
 	dprintk(DEB_CALL, (KERN_INFO "%s: closing\n", c->dev->name));
 	/* Tell the attached socket we're going down */
 	SOCK(c)->sk_shutdown=SHUTDOWN_MASK;
-	SOCK(c)->sk_zapped=1;
+	sock_set_flag(SOCK(c), SOCK_ZAPPED);
 	SOCK(c)->sk_err=ENXIO;
 	SOCK(c)->sk_error_report(SOCK(c));
 #ifdef LINUX_21
Index: cipe/output.c
===================================================================
RCS file: /cvsroot/cipe-linux/cipe-linux/cipe/output.c,v
retrieving revision 1.52
diff -u -r1.52 output.c
--- cipe/output.c	6 Mar 2004 22:16:41 -0000	1.52
+++ cipe/output.c	6 Nov 2005 17:40:32 -0000
@@ -210,7 +210,7 @@
 	if (tunnel->flags&CIPF_FORCE_MTU) {
 		mtu = dev->mtu;
 	} else {
-        	mtu = dst_pmtu(&rt->u.dst) - (cipehdrlen+cipefootlen);
+        	mtu = dst_mtu(&rt->u.dst) - (cipehdrlen+cipefootlen);
         	if (tunnel->sockshost)
             		mtu -= sizeof(struct sockshdr);
         }
Index: cipe/sock.c
===================================================================
RCS file: /cvsroot/cipe-linux/cipe-linux/cipe/sock.c,v
retrieving revision 1.47
diff -u -r1.47 sock.c
--- cipe/sock.c	6 Mar 2004 22:16:41 -0000	1.47
+++ cipe/sock.c	6 Nov 2005 17:40:32 -0000
@@ -49,6 +49,17 @@
     BUG_ON((!c) || (c->magic!=CIPE_MAGIC)); \
     dprintk(DEB_CALL, (KERN_INFO "%s: " nam "\n", c->dev->name));
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
+/* since kernel 2.6.14 the sk_buff structure doesn't use struct timeval anymore
+ * so we have to copy that stuff on our own */
+static inline void get_fast_time(struct skb_timeval *skbtv)
+{
+    struct timeval tv;
+    do_gettimeofday(&tv);
+    skbtv->off_sec = tv.tv_sec;
+    skbtv->off_usec= tv.tv_usec;
+}
+#endif
 
 /* Close the socket */
 void cipe_sock_close(struct sock *sock, timeout_t timeout)
@@ -318,8 +329,12 @@
         }
 
 #ifdef LINUX_21
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
+	get_fast_time(&n->tstamp);
+#else
 	get_fast_time(&n->stamp);
 #endif
+#endif
 	/* No checkpeer() here because not authenticated! */
 	n->h.uh->check=0;
 	return n;
@@ -347,8 +362,12 @@
 	    dprintk(DEB_INP, (KERN_DEBUG "TW_NEWKEY data=%p len=" FLEN
                               " length=%d\n", n->data, n->len, length));
 #ifdef LINUX_21
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
+	    get_fast_time(&n->tstamp);
+#else
 	    get_fast_time(&n->stamp);
 #endif
+#endif
 	    skb_trim(n, length);
 	    checkpeer(c, rsaddr, rsport);
 #if 0
@@ -509,7 +528,11 @@
 #else
 	memcpy_toiovec(msg->msg_iov, skb->data, copied);
 #endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
+	skb_get_timestamp(skb, &sk->sk_stamp);
+#else
 	sk->sk_stamp=skb->stamp;
+#endif
 
 	/* Copy the address. */
 	if (sin
@@ -554,7 +577,7 @@
     if (!(file=fget(parm->fd)))
         return(-EBADF);
     inode = file->f_dentry->d_inode;
-    if (!inode || !inode->i_sock || !(sock=SOCKET_I(inode))) {
+    if (!inode || !S_ISSOCK(inode->i_mode) || !(sock=SOCKET_I(inode))) {
         fput(file);
         return(-ENOTSOCK);
     }
Does this have to be included in the compilation process somehow so that the patch is compiled as part of the module? I suspect this should work with some tinkering since I have another linux machine with the 2.6.x kernel that is using CIPE (I didn't set it up though).
 
Old 11-05-2008, 07:27 PM   #6
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Patch the source by executing the following command in the build directory:
Code:
$ patch -p0 < /path/to/cipe-2.6.14.patch
Then just compile as usual. The patch just edits a few files, adding (or removing) lines from the listed .c files. When they are patched, it should compile properly.
 
  


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
Slackware 11:0: Error in Compiling 2.6 kernel Cire_08 Slackware 6 07-16-2008 10:49 PM
Error while compiling PrBoom Slackware. jaakkop Linux - Games 13 02-16-2007 06:49 AM
error compiling gnofract4d on slackware Axion Linux - Software 1 05-29-2006 11:54 PM
Slackware 10 error compiling kernel 2.6.7 nirvanix Slackware 3 05-29-2006 11:52 PM
error compiling alsa driver 1.0.9b on slackware 10.2 salviadud Slackware 9 11-14-2005 04:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:48 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
Open Source Consulting | Domain Registration