leenjewel / openssl_for_ios_and_android

OpenSSL Library for iOS and Android
920 stars 317 forks source link

Inhibit versioning of generated .so files as #68

Closed andybrucenet closed 2 years ago

andybrucenet commented 2 years ago

Xamarin refuses to load .so files with a version if these files are listed as NEEDED in dependent .so files.

Example: Had to adapt https://github.com/herumi/msoffice to be consumable by Android Xamarin app. When building msoffice, it depends on libcrypto.so so used "-L[path] -lcrypto" using stock openssl_for_ios_and_android Android build. However, this failed to load at runtime because NEEDED section in the created msoffice.so file referenced "libcrypto.so.1.1" (versioned) due to setting SONAME in the generated libcrypto.so output. "Fixed" by inhibiting version...

Note: because native libs are sandboxed on iOS and Android there should not be a need for versioning unless there existed situation where different native libs actually required different versions of dependent .so. (Example: If one native lib requires v1.0c of libcrypto while another native lib requires v1.1.) However, this should be the rarest edge condition and I don't think the openssl_for_ios_and_android out-of-the-box build should account for it.

jiek233 commented 2 years ago

这是来自QQ邮箱的自动回复邮件。   您发送的邮件我已收到,我会在看到后尽快回复您。

leenjewel commented 2 years ago

Thanks for your contribution

jiek233 commented 1 year ago

这是来自QQ邮箱的自动回复邮件。   您发送的邮件我已收到,我会在看到后尽快回复您。