Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch openssl-sys crate to v0.9.92 #709

Merged
merged 1 commit into from May 6, 2024
Merged

Conversation

zombieobject
Copy link
Contributor

@zombieobject zombieobject commented May 3, 2024

A regression in openssl-sys exists where libatomic is dynamically linked
for i686-linux-android targets. sfackler/rust-openssl#2163

The result is dynamically linked symbols are included in the binary header link table:

         U __atomic_fetch_or_8
         U __atomic_is_lock_free
         U __atomic_load

The presence of these symbols breaks Android CI tests for i686 targets with the following error:

java.lang.UnsatisfiedLinkError: Unable to load library 'uniffi_xmtpv3':
	dlopen failed: cannot locate symbol "__atomic_is_lock_free" referenced by "/data/app/org.xmtp.android.library.test-Cq_BL0nCyvMEKUk7x28gzw==/base.apk!/lib/x86/libuniffi_xmtpv3.so"...

This is fixed in the openssl-sys fork at https://github.com/xmtp/rust-openssl on the branch clone-v0.9.92, which is pinned
to that version. Version 0.9.92 statically links libatomic for i686 targets. Once this is addressed upstream we can remove the patch.

A patch is required as openssl-sys is a dependency crate. A fork is required because it is not possible to patch to an older version of the same source.

#
# This is fixed in the openssl-sys fork at
# https://github.com/xmtp/rust-openssl on the branch clone-v0.9.92, which is pinned
# to that version. Once this is addressed upstream we can remove the patch.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a PR to fix this upstream by any chance we could link here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nplasterer No, not at this time. But I am more than happy to work on one and then submit a new PR to update the note with a link.

@zombieobject zombieobject marked this pull request as ready for review May 6, 2024 16:41
@zombieobject zombieobject requested a review from a team as a code owner May 6, 2024 16:41
@zombieobject zombieobject merged commit 6520a44 into main May 6, 2024
6 checks passed
@zombieobject zombieobject deleted the em/openssl-sys-patch branch May 6, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants