summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy MacLeod <Randy.MacLeod@windriver.com>2017-10-16 11:00:45 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-04 17:23:55 +0000
commite303b3cadc495d02ccdd4cf25f24ee8512dc729b (patch)
treea50cea0148928b7202873feeae5d46810e33fa93
parent500ce8d139d343f3b6c18147af4652438f153f8b (diff)
downloadpoky-e303b3cadc495d02ccdd4cf25f24ee8512dc729b.tar.gz
openssl: force soft link to avoid rare race
This patch works around a rare parallel build race condition using the force option when soft linking. The error seen is: ln: failed to create symbolic link 'libssl.so': File exists make[4]: *** [Makefile.shared:171: link_a.gnu] Error 1 make[4]: Leaving directory '/.../build/tmp-glibc/work/x86_64-linux/openssl-native/1.0.2k-r0/openssl-1.0.2k' Just add the -f flag to the platform independent soft link code to avoid the collision. This is reasonable since this Makefile removes the link target before creating a new soft link. The Makefile was written this way to support platforms that don't allow forcing a softlink to overwrite an existing link. Only builds on Linux are supported so that's not a requirement for oe-core recipes. The openssl team is rewriting their build files so it's not appropriate for openssl upstream and fixing the root cause of the race condition was also not pursued. (From OE-Core rev: f6be81b1dddc7adc2e97fefb2bd6c296d4dce8c6) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit c60288aba70635238094c6b813228b31e0715db9) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-connectivity/openssl/openssl-1.0.2l/0001-openssl-force-soft-link-to-avoid-rare-race.patch46
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.0.2l.bb1
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.2l/0001-openssl-force-soft-link-to-avoid-rare-race.patch b/meta/recipes-connectivity/openssl/openssl-1.0.2l/0001-openssl-force-soft-link-to-avoid-rare-race.patch
new file mode 100644
index 0000000000..dd1a9b1dd2
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-1.0.2l/0001-openssl-force-soft-link-to-avoid-rare-race.patch
@@ -0,0 +1,46 @@
1From 3d9199423d48766649a2b2ebb3924e892ed16fa4 Mon Sep 17 00:00:00 2001
2From: Randy MacLeod <Randy.MacLeod@windriver.com>
3Date: Tue, 20 Jun 2017 15:32:08 -0400
4Subject: [PATCH] openssl: Force soft link to avoid rare race
5
6This patch works around a rare parallel build race condition.
7The error seen is:
8
9ln: failed to create symbolic link 'libssl.so': File exists
10make[4]: *** [Makefile.shared:171: link_a.gnu] Error 1
11make[4]: Leaving directory
12'/.../build/tmp-glibc/work/x86_64-linux/openssl-native/1.0.2k-r0/openssl-1.0.2k'
13
14The openssl team is rewriting their build files so it's not
15appropriate for openssl upstream and fixing the root cause of
16the Makefile race condition was also not pursued.
17
18Upstream-Status: Inappropriate [build rules rewrite in progress]
19Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
20---
21 Makefile.shared | 4 ++--
22 1 file changed, 2 insertions(+), 2 deletions(-)
23
24diff --git a/Makefile.shared b/Makefile.shared
25index e8d222a..1bff92f 100644
26--- a/Makefile.shared
27+++ b/Makefile.shared
28@@ -118,14 +118,14 @@
29 if [ -n "$$SHLIB_COMPAT" ]; then \
30 for x in $$SHLIB_COMPAT; do \
31 ( $(SET_X); rm -f $$SHLIB$$x$$SHLIB_SUFFIX; \
32- ln -s $$prev $$SHLIB$$x$$SHLIB_SUFFIX ); \
33+ ln -sf $$prev $$SHLIB$$x$$SHLIB_SUFFIX ); \
34 prev=$$SHLIB$$x$$SHLIB_SUFFIX; \
35 done; \
36 fi; \
37 if [ -n "$$SHLIB_SOVER" ]; then \
38 [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
39 ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
40- ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
41+ ln -sf $$prev $$SHLIB$$SHLIB_SUFFIX ); \
42 fi; \
43 fi
44
45--
462.9.3
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2l.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2l.bb
index 8c34ea60e5..c537aa4cd0 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.2l.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.2l.bb
@@ -41,6 +41,7 @@ SRC_URI += "file://find.pl;subdir=openssl-${PV}/util/ \
41 file://openssl-util-perlpath.pl-cwd.patch \ 41 file://openssl-util-perlpath.pl-cwd.patch \
42 file://Use-SHA256-not-MD5-as-default-digest.patch \ 42 file://Use-SHA256-not-MD5-as-default-digest.patch \
43 file://0001-Fix-build-with-clang-using-external-assembler.patch \ 43 file://0001-Fix-build-with-clang-using-external-assembler.patch \
44 file://0001-openssl-force-soft-link-to-avoid-rare-race.patch \
44 " 45 "
45SRC_URI[md5sum] = "f85123cd390e864dfbe517e7616e6566" 46SRC_URI[md5sum] = "f85123cd390e864dfbe517e7616e6566"
46SRC_URI[sha256sum] = "ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c" 47SRC_URI[sha256sum] = "ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c"