Project

General

Profile

Bug #292

Build failed in Centos 5.8

Added by Kris Jobs almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Category:
libstrongswan
Target version:
Start date:
19.02.2013
Due date:
Estimated time:
Affected version:
Resolution:
Fixed

Description

./autogen.sh always complains lot of:

Remember to add `AC_PROG_LIBTOOL' to `configure.in'.
You should update your `aclocal.m4' by running aclocal.
src/checksum/Makefile.am:2: Libtool library used but `LIBTOOL' is undefined
src/checksum/Makefile.am:2: 
src/checksum/Makefile.am:2: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/checksum/Makefile.am:2: to `configure.in' and run `aclocal' and `autoconf' again.
src/dumm/Makefile.am:4: Libtool library used but `LIBTOOL' is undefined
src/dumm/Makefile.am:4:

Download strongswan-5.0.3dr1.tar.bz2 from stongswan.org but error like below even with: --disable-pkcs7

/bin/sh ../../../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/libstrongswan   -rdynamic -g -O2 -Wall -Wno-format -Wno-pointer-sign -include /home/paveo/strongswan-5.0.3dr1/config.h -MT openssl_pkcs7.lo -MD -MP -MF .deps/openssl_pkcs7.Tpo -c -o openssl_pkcs7.lo openssl_pkcs7.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/libstrongswan -rdynamic -g -O2 -Wall -Wno-format -Wno-pointer-sign -include /home/paveo/strongswan-5.0.3dr1/config.h -MT openssl_pkcs7.lo -MD -MP -MF .deps/openssl_pkcs7.Tpo -c openssl_pkcs7.c  -fPIC -DPIC -o .libs/openssl_pkcs7.o
openssl_pkcs7.c:28:25: error: openssl/cms.h: No such file or directory
openssl_pkcs7.c:50: error: expected specifier-qualifier-list before 'CMS_ContentInfo'
openssl_pkcs7.c: In function 'cert_enumerate':
openssl_pkcs7.c:149: warning: implicit declaration of function 'i2d_X509'

Associated revisions

Revision 0d237763 (diff)
Added by Tobias Brunner almost 8 years ago

openssl: Disable PKCS#7/CMS when building against OpenSSL < 0.9.8g

Fixes #292.

History

#1 Updated by Martin Willi almost 8 years ago

./autogen.sh always complains lot of:

I can't reproduce this with my autotools. Have you installed libtool? Tried to update your autotools?

openssl_pkcs7.c:28:25: error: openssl/cms.h: No such file or directory

#include <openssl/opensslconf.h>
#ifndef OPENSSL_NO_CMS
#include <openssl/cms.h>

Our check seems to be correct here. Are you using an OpenSSL version < 0.9.8? Does the attached patch help?

Regards
Martin

#2 Updated by Tobias Brunner almost 8 years ago

  • Status changed from New to Feedback

./autogen.sh always complains lot of:
Remember to add `AC_PROG_LIBTOOL' to `configure.in'.

Your version of autotools (autoconf, automake etc.) is too old to rebuild the configure script properly (AC_PROG_LIBTOOL is deprecated we now use LT_INIT). So you can't run autogen.sh on this host, which shouldn't be necessary if you build from a tarball.

Download strongswan-5.0.3dr1.tar.bz2 from stongswan.org but error like below even with: --disable-pkcs7

--disable-pkcs7 disables our own PKCS#7 plugin, not the OpenSSL implementation in the openssl plugin. Regarding the include error, see Martin's response.

#3 Updated by Kris Jobs almost 8 years ago

OpenSSL seems 0.9.8e:

openssl-0.9.8e-22.el5_8.4
openssl-0.9.8e-22.el5_8.4
openssl-perl-0.9.8e-22.el5_8.4
openssl-devel-0.9.8e-22.el5_8.4
openssl-devel-0.9.8e-22.el5_8.4

with the patch, still error

openssl_pkcs7.c:28:25: error: openssl/cms.h: No such file or directory

#4 Updated by Tobias Brunner almost 8 years ago

It seems CMS was not added (i.e. backported) until 0.9.8g. You may try the attached patch instead.

#5 Updated by Kris Jobs almost 8 years ago

New patch fixed it. It comes a new build error, but seems not related with this issue.

tes.o pool_usage.o  ../../../../src/libstrongswan/.libs/libstrongswan.so -lpthread -ldl -lrt ../../../../src/libhydra/.libs/libhydra.so -Wl,-rpath -Wl,/usr/local/lib/ipsec
../../../../src/libstrongswan/.libs/libstrongswan.so: undefined reference to `proposal_get_token_static'
collect2: ld returned 1 exit status
make[4]: *** [pool] Error 1
make[4]: Leaving directory `/home/paveo/strongswan/src/libhydra/plugins/attr_sql'

#6 Updated by Tobias Brunner almost 8 years ago

  • Category set to libstrongswan
  • Status changed from Feedback to Resolved
  • Target version set to 5.0.3
  • Resolution set to Fixed

The required function (proposal_get_token_static) is created by gperf. If you build directly from the Git repository you need the packages listed in source:HACKING (but as we saw with autoconf, you might not have a recent enough version on your host).

This can be avoided by building from a tarball, which comes with these files already generated.

#7 Updated by Tobias Brunner over 7 years ago

  • Status changed from Resolved to Closed
  • Affected version deleted (5.0.3|master)

#8 Updated by Andreas Steffen over 7 years ago

  • Assignee set to Tobias Brunner

Also available in: Atom PDF