Modify

Opened 4 years ago

Closed 3 years ago

#12813 closed defect (fixed)

ipsec-tools fails to compile with kernel 3.7.x

Reported by: Anton van Bohemen <avbohemen@…> Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

It complains about missing kernel headers:

make[3]: Entering directory `/home/anton/openwrt/trunk/feeds/packages/net/ipsec-tools'
(cd /home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/ipsec-tools-0.8.0; touch configure.ac aclocal.m4 Makefile.in config.h.in configure );
(cd /home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/ipsec-tools-0.8.0/./; if [ -x ./configure ]; then /usr/bin/find /home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/ipsec-tools-0.8.0/ -name config.guess | xargs -r chmod u+w; /usr/bin/find /home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/ipsec-tools-0.8.0/ -name config.guess | xargs -r -n1 cp /home/anton/openwrt/trunk/scripts/config.guess; /usr/bin/find /home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/ipsec-tools-0.8.0/ -name config.sub | xargs -r chmod u+w; /usr/bin/find /home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/ipsec-tools-0.8.0/ -name config.sub | xargs -r -n1 cp /home/anton/openwrt/trunk/scripts/config.sub; AR=mips-openwrt-linux-uclibc-ar AS="mips-openwrt-linux-uclibc-gcc -c -Os -pipe -march=24kc -mtune=24kc -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float" LD=mips-openwrt-linux-uclibc-ld NM=mips-openwrt-linux-uclibc-nm CC="mips-openwrt-linux-uclibc-gcc" GCC="mips-openwrt-linux-uclibc-gcc" CXX="mips-openwrt-linux-uclibc-g++" RANLIB=mips-openwrt-linux-uclibc-ranlib STRIP=mips-openwrt-linux-uclibc-strip OBJCOPY=mips-openwrt-linux-uclibc-objcopy OBJDUMP=mips-openwrt-linux-uclibc-objdump SIZE=mips-openwrt-linux-uclibc-size CFLAGS="-Os -pipe -march=24kc -mtune=24kc -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float " CXXFLAGS="-Os -pipe -march=24kc -mtune=24kc -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float " CPPFLAGS="-I/home/anton/openwrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/usr/include -I/home/anton/openwrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/include -I/home/anton/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.7-linaro_uClibc-0.9.33.2/usr/include -I/home/anton/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.7-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/home/anton/openwrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/usr/lib -L/home/anton/openwrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/lib -L/home/anton/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.7-linaro_uClibc-0.9.33.2/usr/lib -L/home/anton/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.7-linaro_uClibc-0.9.33.2/lib "   ./configure --target=mips-openwrt-linux --host=mips-openwrt-linux --build=i686-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls   --enable-shared --enable-static --with-kernel-headers="/home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.2/include" --without-readline --with-openssl="/home/anton/openwrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/usr" --without-libradius --without-libpam --enable-dpd --enable-hybrid --enable-security-context=no --enable-natt --enable-adminport --enable-frag --enable-ipv6 ; fi; )
configure: WARNING: unrecognized options: --disable-nls
configure: loading site script /home/anton/openwrt/trunk/include/site/mips-openwrt-linux-uclibc
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for mips-openwrt-linux-strip... mips-openwrt-linux-uclibc-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for mips-openwrt-linux-gcc... mips-openwrt-linux-uclibc-gcc
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... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mips-openwrt-linux-uclibc-gcc accepts -g... yes
checking for mips-openwrt-linux-uclibc-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of mips-openwrt-linux-uclibc-gcc... gcc3
checking for mips-openwrt-linux-gcc... (cached) mips-openwrt-linux-uclibc-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether mips-openwrt-linux-uclibc-gcc accepts -g... (cached) yes
checking for mips-openwrt-linux-uclibc-gcc option to accept ISO C89... (cached) none needed
checking dependency style of mips-openwrt-linux-uclibc-gcc... (cached) gcc3
checking how to run the C preprocessor... mips-openwrt-linux-uclibc-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking build system type... i686-pc-linux-gnu
checking host system type... mips-openwrt-linux-gnu
checking for a sed that does not truncate output... /home/anton/openwrt/trunk/staging_dir/host/bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by mips-openwrt-linux-uclibc-gcc... mips-openwrt-linux-uclibc-ld
checking if the linker (mips-openwrt-linux-uclibc-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... mips-openwrt-linux-uclibc-nm
checking the name lister (mips-openwrt-linux-uclibc-nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 805306365
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for mips-openwrt-linux-uclibc-ld option to reload object files... -r
checking for mips-openwrt-linux-objdump... mips-openwrt-linux-uclibc-objdump
checking how to recognize dependent libraries... pass_all
checking for mips-openwrt-linux-ar... mips-openwrt-linux-uclibc-ar
checking for mips-openwrt-linux-strip... (cached) mips-openwrt-linux-uclibc-strip
checking for mips-openwrt-linux-ranlib... mips-openwrt-linux-uclibc-ranlib
checking command to parse mips-openwrt-linux-uclibc-nm output from mips-openwrt-linux-uclibc-gcc object... ok
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 for dlfcn.h... yes
checking for objdir... .libs
checking if mips-openwrt-linux-uclibc-gcc supports -fno-rtti -fno-exceptions... no
checking for mips-openwrt-linux-uclibc-gcc option to produce PIC... -fPIC -DPIC
checking if mips-openwrt-linux-uclibc-gcc PIC flag -fPIC -DPIC works... yes
checking if mips-openwrt-linux-uclibc-gcc static flag -static works... yes
checking if mips-openwrt-linux-uclibc-gcc supports -c -o file.o... yes
checking if mips-openwrt-linux-uclibc-gcc supports -c -o file.o... (cached) yes
checking whether the mips-openwrt-linux-uclibc-gcc linker (mips-openwrt-linux-uclibc-ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for egrep... (cached) /bin/grep -E
checking net/pfkeyv2.h usability... no
checking net/pfkeyv2.h presence... no
checking for net/pfkeyv2.h... no
checking netinet/ipsec.h usability... no
checking netinet/ipsec.h presence... no
checking for netinet/ipsec.h... no
checking netinet6/ipsec.h usability... no
checking netinet6/ipsec.h presence... no
checking for netinet6/ipsec.h... no
checking netipsec/ipsec.h usability... no
checking netipsec/ipsec.h presence... no
checking for netipsec/ipsec.h... no
checking /home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.2/include/linux/pfkeyv2.h usability... no
checking /home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.2/include/linux/pfkeyv2.h presence... no
checking for /home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.7.2/include/linux/pfkeyv2.h... no
checking /usr/src/linux/include/linux/pfkeyv2.h usability... no
checking /usr/src/linux/include/linux/pfkeyv2.h presence... no
checking for /usr/src/linux/include/linux/pfkeyv2.h... no
configure: error: Unable to find linux-2.6 kernel headers. Aborting.
make[3]: *** [/home/anton/openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-ar71xx_generic/ipsec-tools-0.8.0/.configured_] Error 1
make[3]: Leaving directory `/home/anton/openwrt/trunk/feeds/packages/net/ipsec-tools'
make[2]: *** [package/feeds/packages/ipsec-tools/compile] Error 2
make[2]: Leaving directory `/home/anton/openwrt/trunk'
make[1]: *** [/home/anton/openwrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/anton/openwrt/trunk'
make: *** [world] Error 2

These headers are indeed not in the source of kernel 3.7.x, this is a change from 3.6.x

Attachments (1)

ipsec-tools-uapi.patch (409 bytes) - added by achim@… 4 years ago.
UAPI patch

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by anonymous

I have the same issue...looks like pfkeyv2.h moved to include/uapi/linux?

comment:2 Changed 4 years ago by anonymous

I'm investigating same issue, can confirm both posts.

comment:3 Changed 4 years ago by anonymous

Simple workaround is to reference your ${BUILD_DIR}/linux-3.7.2/user_headers/include from racoon/Makefile, libipsec/Makefile and setkey/Makefile (add it to DEFAULT_INCLUDES)

comment:4 Changed 4 years ago by anonymous

I still can't seem to build it with your workaround...could you maybe create a patch ?

Changed 4 years ago by achim@…

UAPI patch

comment:5 follow-up: Changed 4 years ago by anonymous

I added an patch that fixes the pfkey.h thing but then NAT-T detection fails because there is no include/uapi/linux/compiler.h. I copied the one from include/linux but i guess the header should be reworked like described here http://lwn.net/Articles/507794/

comment:6 in reply to: ↑ 5 Changed 4 years ago by ashi009@…

Replying to anonymous:

Tried to change every </linux/pfkeyv2.h> to <uapi/linux/pfkeyv2.h> while adding kernel includes in Makefile.in files, but still can't get it compiled, as compiler suggests there are many re-declarations. But I don't know exactly how the makefile interactive with each other yet, so didn't study further.

I guess to fix this may need reconstruct ipsec-tools package somehow.

comment:7 Changed 3 years ago by Anton van Bohemen <avbohemen@…>

comment:8 Changed 3 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed with r35312

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.