Skip to content

Commit a04a131

Browse files
committed
fix: build openssl static libs first to avoid android engines link race
1 parent c63d350 commit a04a131

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

recipes/openssl/conanfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,13 @@ def _make(self):
560560
replace_in_file(self, mkinstallvars_pl, "$values{$k} = $v;", """$v->[0] =~ s|\\\\|/|g; $values{$k} = $v;""")
561561
else:
562562
replace_in_file(self, mkinstallvars_pl, "$ENV{$k} = $v;", """$v =~ s|\\\\|/|g; $ENV{$k} = $v;""")
563+
if self.settings.os == "Android":
564+
# Android shared libs are named libcrypto_3.so/libssl_3.so (no
565+
# libcrypto.so symlink), so the `-lcrypto` in engine link lines
566+
# resolves to the static archive; build the archives first,
567+
# otherwise a parallel make can link engines against a
568+
# half-assembled libcrypto.a (undefined ossl_* symbols).
569+
self._run_make(targets=["libcrypto.a", "libssl.a"])
563570
self._run_make()
564571

565572
def _make_install(self):

0 commit comments

Comments
 (0)