[Openswan Users] Compiling

Bernd Weber bwinfo at gwk-gmbh.de
Fri Oct 8 17:37:36 CEST 2004


Hi Paul,

thanks for your answer, I ran your suggestion, with the following result.

This is the command sequence - I tried to make it as clean as possible:
---
set -x
rpm -e --nodeps kernel-source-2.6.5-7.108
rm -rf /usr/src/linux-2.6.5-7.108*
rpm -U
/home/mirror/ftp.suse.com/suse/i386/update/9.1/rpm/i586/kernel-source-2.6.5-7.108.i586.rpm
zcat /proc/config.gz >/usr/src/linux/.config
ls -la /usr/src
rm -rf openswan-2.3.0dr2
tar xzf openswan-2.3.0dr2.tar.gz
cd openswan-2.3.0dr2
export KERNELSRC=/usr/src/linux-2.6.5-7.108
make module26

Result: ---
++ rpm -e --nodeps kernel-source-2.6.5-7.108
++ rm -rf /usr/src/linux-2.6.5-7.108
++ rpm -U
/home/mirror/ftp.suse.com/suse/i386/update/9.1/rpm/i586/kernel-source-2.6.5-7.108.i586.rpm
++ zcat /proc/config.gz
++ ls -la /usr/src
insgesamt 24
drwxr-xr-x   6 root root 4096 2004-10-08 11:36 .
drwxr-xr-x  13 root root 4096 2004-10-05 14:05 ..
drwxr-xr-x  22 root root 4096 2004-09-23 17:23 kernel-modules
lrwxrwxrwx   1 root root   17 2004-10-08 11:36 linux -> linux-2.6.5-7.108
drwxr-xr-x  20 root root 4096 2004-10-08 11:36 linux-2.6.5-7.108
drwxr-xr-x   3 root root 4096 2004-10-08 11:35 linux-2.6.5-7.108-obj
lrwxrwxrwx   1 root root   21 2004-10-08 11:36 linux-obj ->
linux-2.6.5-7.108-obj
drwxr-xr-x   7 root root 4096 2004-09-23 17:48 packages
++ rm -rf openswan-2.3.0dr2
++ tar xzf openswan-2.3.0dr2.tar.gz
++ cd openswan-2.3.0dr2
++ export KERNELSRC=/usr/src/linux-2.6.5-7.108
++ KERNELSRC=/usr/src/linux-2.6.5-7.108
++ make module26
mkdir -p /home/bw/openswan-2.3.0dr2/modobj26
echo ln -s -f /home/bw/openswan-2.3.0dr2/linux/net/ipsec/des/*.S
/home/bw/openswan-2.3.0dr2/modobj26
ln -s -f /home/bw/openswan-2.3.0dr2/linux/net/ipsec/des/dx86unix.S
/home/bw/openswan-2.3.0dr2/modobj26
(rm -f /home/bw/openswan-2.3.0dr2/modobj26/des; mkdir -p
/home/bw/openswan-2.3.0dr2/modobj26/des && cd
/home/bw/openswan-2.3.0dr2/modobj26/des && ln -s -f
/home/bw/openswan-2.3.0dr2/linux/net/ipsec/des/* . && ln -s -f
Makefile.fs2_6 Makefile)
(rm -f /home/bw/openswan-2.3.0dr2/modobj26/aes; mkdir -p
/home/bw/openswan-2.3.0dr2/modobj26/aes && cd
/home/bw/openswan-2.3.0dr2/modobj26/aes && ln -s -f
/home/bw/openswan-2.3.0dr2/linux/net/ipsec/aes/* . && ln -s -f
Makefile.fs2_6 Makefile)
mkdir -p /home/bw/openswan-2.3.0dr2/modobj26/aes
cp /home/bw/openswan-2.3.0dr2/packaging/makefiles/module26.make
/home/bw/openswan-2.3.0dr2/modobj26/Makefile
echo "# "                        >>
/home/bw/openswan-2.3.0dr2/modobj26/Makefile
echo "# Local Variables: "       >>
/home/bw/openswan-2.3.0dr2/modobj26/Makefile
echo "# compile-command: \"make -C /home/bw/openswan-2.3.0dr2 ARCH=i386
KERNELSRC=/usr/src/linux-2.6.5-7.108
MOD26BUILDDIR=/home/bw/openswan-2.3.0dr2/modobj26 module26\""         >>
/home/bw/openswan-2.3.0dr2/modobj26/Makefile
echo "# End: "       >> /home/bw/openswan-2.3.0dr2/modobj26/Makefile
make -C /usr/src/linux-2.6.5-7.108
BUILDDIR=/home/bw/openswan-2.3.0dr2/modobj26
SUBDIRS=/home/bw/openswan-2.3.0dr2/modobj26
MODULE_DEF_INCLUDE=/home/bw/openswan-2.3.0dr2/packaging/linus/config-all.h
ARCH=i386 modules
make[1]: Entering directory `/usr/src/linux-2.6.5-7.108'

WARNING: Symbol version dump /usr/src/linux-2.6.5-7.108/Module.symvers
is  missing, modules will have CONFIG_MODVERSIONS disabled.

ln -s -f /home/bw/openswan-2.3.0dr2/linux/net/ipsec/ipsec_init.c
/home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c
  CC [M]  /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.s
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:39:1: warning:
"SADB_X_NAT_T_NEW_MAPPING" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:243:1: warning: this is the location of the
previous definition
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:40:1: warning:
"SADB_MAX" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:244:1: warning: this is the location of the
previous definition
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:42: error:
redefinition of `struct sadb_msg'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:53: error:
redefinition of `struct sadb_ext'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:58: error:
redefinition of `struct sadb_sa'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:82: error:
redefinition of `struct sadb_lifetime'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:93: error:
redefinition of `struct sadb_address'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:101: error:
redefinition of `struct sadb_key'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:108: error:
redefinition of `struct sadb_ident'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:116: error:
redefinition of `struct sadb_sens'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:127: error:
redefinition of `struct sadb_prop'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:134: error:
redefinition of `struct sadb_comb'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:155: error:
redefinition of `struct sadb_supported'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:161: error:
redefinition of `struct sadb_alg'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:169: error:
redefinition of `struct sadb_spirange'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:177: error:
redefinition of `struct sadb_x_kmprivate'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:190: error:
redefinition of `struct sadb_x_policy'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:218: error:
redefinition of `struct sadb_x_nat_t_type'
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:224: error:
redefinition of `struct sadb_x_nat_t_port'
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:276:1: warning:
"SADB_X_EXT_NAT_T_TYPE" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:322:1: warning: this is the location of the
previous definition
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:277:1: warning:
"SADB_X_EXT_NAT_T_SPORT" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:323:1: warning: this is the location of the
previous definition
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:278:1: warning:
"SADB_X_EXT_NAT_T_DPORT" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:324:1: warning: this is the location of the
previous definition
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:279:1: warning:
"SADB_X_EXT_NAT_T_OA" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:325:1: warning: this is the location of the
previous definition
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:280:1: warning:
"SADB_EXT_MAX" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:326:1: warning: this is the location of the
previous definition
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:302:1: warning:
"SADB_SATYPE_MAX" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:266:1: warning: this is the location of the
previous definition
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:340:1: warning:
"SADB_EALG_MAX" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:287:1: warning: this is the location of the
previous definition
In file included from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:97:
/home/bw/openswan-2.3.0dr2/linux/include/pfkeyv2.h:365:1: warning:
"SADB_IDENTTYPE_MAX" redefined
In file included from include/net/xfrm.h:10,
                 from include/linux/netfilter_ipv4.h:91,
                 from include/net/ip.h:34,
                 from /home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.c:63:
include/linux/pfkeyv2.h:333:1: warning: this is the location of the
previous definition
make[2]: *** [/home/bw/openswan-2.3.0dr2/modobj26/ipsec_init.s] Fehler 1
make[1]: *** [_module_/home/bw/openswan-2.3.0dr2/modobj26] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.5-7.108'
make: *** [module26] Fehler 2

_______________________________________
Bernd Weber
GWK Gesellschaft für Informationstechnologie mbH
Rathenaustraße 57
63263 Neu-Isenburg
Tel  +49 6102 786004
Fax +49 6102 786006
http://www.gwk-gmbh.de
http://www.rabox.de



Paul Wouters wrote:

> On Thu, 7 Oct 2004, Bernd Weber wrote:
>
>> So I have tried to compile OpenSwan 2.3.0dr2 on a SuSE 9.1 Machine - 
>> mostly standard runnning Kernel 2.6.5-7.108-default and using the 
>> source of this kernel. I have taken the kernel Konfiguration 
>> (.config) from a running SuSE Standard Kernel and run make menugo 
>> command.
>
>
> You should try:
>
> cd openswan
> export KERNELSRC=/usr/src/linux-2.6.5-7.108-default
> make module26
>
> You should have an unpatched kernel for this, so no klips code in 
> there already.
>
> KLIPS on 2.6 kernels is getting there, but we still are testing this. 
> It is not
> stable yet for production use.
>
> Paul




More information about the Users mailing list