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

Reenabling MacOS tests that had an issue with libgdiplus #4500

Merged
merged 3 commits into from
Nov 25, 2019

Conversation

antoniovs1029
Copy link
Member

@antoniovs1029 antoniovs1029 commented Nov 23, 2019

Edited First Post:

PR #4492 disabled some tests that threw a System.DllNotFoundException : Unable to load DLL 'libgdiplus', when trying to run them on our MacOS CI Pipeline.

As explained below in this thread, the problem was on homebrew's side, and this PR was meant to give a provitional solution for the problem. Nonetheless, this problem has just been fixed on homebrew's side, so now this PR simply reenables those tests.


Original First Post:

Solves the problem with MacOS Pipeline where certain tests threw a
System.DllNotFoundException : Unable to load DLL 'libgdiplus': The specified module could not be found

The issue was caused somewhere in homebrew's installation, and one way to solve this issue is to actually make homebrew to build the libgdiplus library after downloading it (instead of downloading a prebuilt version from https://homebrew.bintray.com/bottles/mono-libgdiplus-6.0.4.high_sierra.bottle.tar.gz which is where it gets libgdiplus if homebrew doesn't build it). For some reason that's still unknown to me, this prebuilt version isn't working as expected, and the above exception is thrown.

@antoniovs1029 antoniovs1029 changed the title Solve issue with MacOS Pipeline Solve issue with MacOS Pipeline and libgdiplus Nov 23, 2019
@safern
Copy link
Member

safern commented Nov 25, 2019

Cc @directhex as it seems pretty odd to me that libgdiplus is not found when installed from the latest stable package but it does when it’s built from source.

@antoniovs1029
Copy link
Member Author

Cc @directhex as it seems pretty odd to me that libgdiplus is not found when installed from the latest stable package but it does when it’s built from source.

@safern It seems this problem is not only affecting us.

For instance, I created a simple Hello World app on a MacBook with High Sierra, where I made use of System.Drawing's Bitmap, and it threw the same DllNotFoundException if I installed mono-libgdiplus with

brew install mono-libgdiplus

... but it got fixed after I reinstalled mono-libgdiplus with
brew install --build-from-source mono-libgdiplus

In fact, it seems that other homewbrew's contributors have become aware that there's an issue with mono-libgdiplus bottle, as pointed here in this thread on homebrew's repo. And it seems they are working on this, although I am not sure if it would be a good idea to open there an issue for this problem.

@antoniovs1029 antoniovs1029 marked this pull request as ready for review November 25, 2019 18:05
@antoniovs1029 antoniovs1029 requested a review from a team as a code owner November 25, 2019 18:05
@directhex
Copy link
Contributor

We have ~no involvement with Mono on Homebrew

@antoniovs1029 antoniovs1029 changed the title Solve issue with MacOS Pipeline and libgdiplus Renabling MacOS tests that had an issue with libgdiplus Nov 25, 2019
@antoniovs1029 antoniovs1029 changed the title Renabling MacOS tests that had an issue with libgdiplus Reenabling MacOS tests that had an issue with libgdiplus Nov 25, 2019
@antoniovs1029
Copy link
Member Author

As kindly explained by @Bo98 on this comment on the homebrew-core repo, there were some problems with the libgdiplus prebuilt library that was downloaded when using brew install mono-libgdiplus. In that PR, Bo98 has fixed the problem by adding a new revision to the homebrew formula, so that now it downloads the new, fixed, prebuilt version of the library from:

https://homebrew.bintray.com/bottles/mono-libgdiplus-6.0.4_1.high_sierra.bottle.tar.gz

(notice the 6.0.4_1 which is used now, against the previous, problematic 6.0.4)

With those changes, it is no longer necessary to use the --build-from-source flag that I proposed as a solution for this issue.

That is, the problem was solved by Bo98 contributions on hombrew-core, and now this PR would simply reenable the tests that were failing on MacOS pipeline.

@antoniovs1029 antoniovs1029 merged commit 9af92a4 into dotnet:master Nov 25, 2019
@Bo98
Copy link

Bo98 commented Nov 25, 2019

Apologies for the disruption everyone. We know Homebrew is important for many people's workflows.

Although the precise cause was a rather unusual one, I will try improve the tests of mono-libgdiplus to avoid this happening again.

@antoniovs1029
Copy link
Member Author

No worries, @Bo98 . Thank you very much for your contributions that solved this problem.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 20, 2022
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.

5 participants