]> code.ossystems Code Review - openembedded-core.git/commitdiff
openssl: sanity check that the bignum module is present
authorRoss Burton <ross.burton@intel.com>
Wed, 11 Nov 2015 14:50:27 +0000 (14:50 +0000)
committerRobert Yang <liezhi.yang@windriver.com>
Mon, 28 Dec 2015 07:03:14 +0000 (23:03 -0800)
The crypto_use_bigint_in_x86-64_perl patch uses the "bigint" module to
transparently support 64-bit integers on 32-bit hosts.  Whilst bigint (part of
bignum) is a core Perl module not all distributions install it (notable Fedora
23).

As the error message when bignum isn't installed is obscure, add a task to check
that it is available and alert the user if it isn't.

[ YOCTO #8562 ]

(From OE-Core master rev: 2f9a2fbc46aa435a0a7f7662bb62029ac714f25a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/recipes-connectivity/openssl/openssl_1.0.2d.bb

index fd568414faafa3249bfafa2580de23594e2ecb8b..659e0bd49e2b72a2b1f1eac813ee3b2b1d391678 100644 (file)
@@ -56,3 +56,13 @@ PARALLEL_MAKEINST = ""
 do_configure_prepend() {
   cp ${WORKDIR}/find.pl ${S}/util/find.pl
 }
+
+# The crypto_use_bigint patch means that perl's bignum module needs to be
+# installed, but some distributions (for example Fedora 23) don't ship it by
+# default.  As the resulting error is very misleading check for bignum before
+# building.
+do_configure_prepend() {
+       if ! perl -Mbigint -e true; then
+               bbfatal "The perl module 'bignum' was not found but this is required to build openssl.  Please install this module (often packaged as perl-bignum) and re-run bitbake."
+       fi
+}