Skip to content

Conversation

@dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Jan 20, 2020

Fixes #4100

The version of libzip.so we shipped for linux in
1.0.6 had a dependency on libcrypto.so.1.1. Some
linux based systems only ship with libcrypto.so.1.0.
As a result Xamarin.Android would not build and we give
the following error.

error MSB4018: System.DllNotFoundException: lib64/libzip.so assembly

Verison 1.0.7 if Xamarin.LibZipSharp fixes this issue by
statically linking libcrypto (and other dependencies) into the
dynamic library. This should allow Xamarin.Android to build and
run on those systems which does not include libcrypto or have
an older version.

This PR reworks the source a bit so we define the LibZipSharp version in ONE place.
Both the all the csproj and targets files include Configuration.props in them. So it
makes sense to place the version there as an MSBuild Property. We then need to update
the Third Party Notices code to pick up that MSBuild property rather than hard coding the
version into the C# code. This way we only need to update the version in one place going
forward.

Fixes dotnet#4100

The version of libzip.so we shipped for linux in
1.0.6 had a dependency on libcrypto.so.1.1. Some
linux based systems only ship with libcrypto.so.1.0.
As a result Xamarin.Android would not build and we give
the following error.

	error MSB4018: System.DllNotFoundException: lib64/libzip.so assembly

Verison 1.0.7 if Xamarin.LibZipSharp fixes this issue by
statically linking libcrypto (and other dependencies) into the
dynamic library. This should allow Xamarin.Android to build and
run on those systems which does not include libcrypto or have
an older version.
@janusw
Copy link
Contributor

janusw commented Jan 20, 2020

I just tried the branch on Ubuntu 16.04 and can confirm that it removes the DllNotFoundException. Thanks for the fix!

Note that the build runs into other errors later on. I'll report that in a separate issue ...

@dellis1972 dellis1972 merged commit 3ae6f25 into dotnet:master Jan 21, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

building xamarin-android fails on Ubuntu 16.04 (System.DllNotFoundException: lib64/libzip.so)

4 participants