erlang: fix to build with openssl10
erlang R18B03 is not compatibel with openssl 1.1.x, previously the ssl reladted features were disabled, but it's required by rabbitmq-server 3.6.5 which is used by stx 3.0. To align with stx 3.0, we need to build erlang with compatible openssl version so that we can upgrade rabbitmq-server to 3.6.5. The commit includes the following changes to that goal: - Add dependency on openssl10 1.0.2 instead of openssl 1.1.1d - Add bbappend for openssl10 1.0.2 to handle sysroot conflicts with openssl 1.1.1d. - Handle the openssl10 lib and herders in do_configure_prepend so erlang builds successfaully with ssl enabled. - Fix two QA warnings. fix #250 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
This commit is contained in:
parent
4a190fab4a
commit
453569c1c2
15
recipes-connectivity/openssl/openssl10_1.0.2r.bbappend
Normal file
15
recipes-connectivity/openssl/openssl10_1.0.2r.bbappend
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
SYSROOT_PREPROCESS_FUNCS += "openssl10_avoid_conflict"
|
||||||
|
|
||||||
|
openssl10_avoid_conflict () {
|
||||||
|
# For libaries
|
||||||
|
mkdir -p ${SYSROOT_DESTDIR}${libdir}/openssl10
|
||||||
|
mv ${SYSROOT_DESTDIR}${libdir}/lib* ${SYSROOT_DESTDIR}${libdir}/engines \
|
||||||
|
${SYSROOT_DESTDIR}${libdir}/ssl ${SYSROOT_DESTDIR}${libdir}/pkgconfig \
|
||||||
|
${SYSROOT_DESTDIR}${libdir}/openssl10
|
||||||
|
|
||||||
|
# For headers
|
||||||
|
mv ${SYSROOT_DESTDIR}${includedir}/openssl ${SYSROOT_DESTDIR}${includedir}/openssl10
|
||||||
|
|
||||||
|
rm -rf ${SYSROOT_DESTDIR}${bindir} ${SYSROOT_DESTDIR}${sysconfdir}
|
||||||
|
}
|
19
recipes-devtools/erlang/erlang-native_R16B03-1.bbappend
Normal file
19
recipes-devtools/erlang/erlang-native_R16B03-1.bbappend
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||||
|
|
||||||
|
# erlang < 20.0 is not compatibel with OpenSSL 1.1.x
|
||||||
|
DEPENDS += "openssl10-native"
|
||||||
|
DEPENDS_remove += "openssl-native"
|
||||||
|
|
||||||
|
SRC_URI += "file://erts-configure.in-avoid-RPATH-warning.patch"
|
||||||
|
|
||||||
|
EXTRA_OECONF = '--with-ssl'
|
||||||
|
|
||||||
|
do_configure_prepend () {
|
||||||
|
if [ -d ${STAGING_INCDIR}/openssl10 ]; then
|
||||||
|
rm -rf ${STAGING_INCDIR}/openssl
|
||||||
|
ln -sf ${STAGING_INCDIR}/openssl10 ${STAGING_INCDIR}/openssl
|
||||||
|
fi
|
||||||
|
if [ -d ${STAGING_LIBDIR}/openssl10 ]; then
|
||||||
|
cp -rf ${STAGING_LIBDIR}/openssl10/* ${STAGING_LIBDIR}
|
||||||
|
fi
|
||||||
|
}
|
@ -1,5 +1,29 @@
|
|||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||||
|
|
||||||
|
# erlang < 20.0 is not compatibel with OpenSSL 1.1.x
|
||||||
|
DEPENDS += "openssl10"
|
||||||
|
DEPENDS_remove += "openssl"
|
||||||
|
|
||||||
SRC_URI += " \
|
SRC_URI += " \
|
||||||
file://fix-install-ownership.patch \
|
file://fix-install-ownership.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
do_configure_prepend () {
|
||||||
|
export erl_xcomp_sysroot=${STAGING_DIR_HOST}
|
||||||
|
|
||||||
|
if [ -d ${STAGING_INCDIR}/openssl10 ]; then
|
||||||
|
rm -rf ${STAGING_INCDIR}/openssl
|
||||||
|
ln -sf ${STAGING_INCDIR}/openssl10 ${STAGING_INCDIR}/openssl
|
||||||
|
fi
|
||||||
|
if [ -d ${STAGING_LIBDIR}/openssl10 ]; then
|
||||||
|
cp -rf ${STAGING_LIBDIR}/openssl10/* ${STAGING_LIBDIR}
|
||||||
|
fi
|
||||||
|
sed -i -e 's/opensslconf.h/opensslconf-64.h/' \
|
||||||
|
${STAGING_INCDIR}/openssl/rc4.h \
|
||||||
|
${STAGING_INCDIR}/openssl/rc2.h
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install_append () {
|
||||||
|
# Fix the do_package_qa issue
|
||||||
|
chown -R root:root ${D}
|
||||||
|
}
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
From fe07e40ed72021225fce05dc1557fd83200d4506 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jackie Huang <jackie.huang@windriver.com>
|
||||||
|
Date: Mon, 23 Mar 2020 13:00:10 +0800
|
||||||
|
Subject: [PATCH] erts/configure.in: avoid RPATH warning
|
||||||
|
|
||||||
|
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
|
||||||
|
---
|
||||||
|
erts/configure | 2 +-
|
||||||
|
erts/configure.in | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/erts/configure b/erts/configure
|
||||||
|
index 6940143..a70d5a3 100755
|
||||||
|
--- a/erts/configure
|
||||||
|
+++ b/erts/configure
|
||||||
|
@@ -37534,7 +37534,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-std_ssl_locations="/usr/local /usr/sfw /usr /opt/local /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl"
|
||||||
|
+std_ssl_locations="/usr/local /usr/sfw /opt/local /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl"
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-ssl-zlib or --without-ssl-zlib was given.
|
||||||
|
diff --git a/erts/configure.in b/erts/configure.in
|
||||||
|
index da4bf65..82e7d54 100644
|
||||||
|
--- a/erts/configure.in
|
||||||
|
+++ b/erts/configure.in
|
||||||
|
@@ -3843,7 +3843,7 @@ AC_SUBST(STATIC_KERBEROS_LIBS)
|
||||||
|
AC_SUBST(SSL_LINK_WITH_ZLIB)
|
||||||
|
AC_SUBST(STATIC_ZLIB_LIBS)
|
||||||
|
|
||||||
|
-std_ssl_locations="/usr/local /usr/sfw /usr /opt/local /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl"
|
||||||
|
+std_ssl_locations="/usr/local /usr/sfw /opt/local /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl"
|
||||||
|
|
||||||
|
AC_ARG_WITH(ssl-zlib,
|
||||||
|
AS_HELP_STRING([--with-ssl-zlib=PATH],
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user