Fix OSX Homebrew build issues and made build script more consistent #90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a while now, we've had issues with OSX builds breaking, sometimes even resulting in a segfault:
It's likely that these issues have different root causes, but at least one of them has to do with the way Homebrew.jl handles the translation from
homebrew/core
tostaticfloat/juliadeps
.In some cases, the ImageMagick.jl build script would ask for the Homebrew prefix to the homebrew/core/imagemagick@6 library, but the Julia homebrew library would still have the staticfloat/juliadeps version installed. Rebuilding the library would not replace the installed version (despite calling for "homebrew/core/imagemagick@6"), but it would update
deps.jl
to point to the new version—resulting in errors. After testing and merging of the PR, we should probably tag a new version of the package to fix this for the users that filed issues.This PR includes three sets of changes:
deps.jl
.success('brew list imagemagick@6'
) isn't consistent. After loading the Homebrew package in Julia, the detect call would call the Julia Homebrew, rather than the system-wide Homebrew—which in rare cases would lead to further inconsistencies. The PR now uses theMAGICK_HOME
environment variable to allow users to specify their own installation of ImageMagick—similar to the Unix version of the package.Note that some users that have tried to fix the issue manually in the past by taking control of Julia's Homebrew might have to manually remove the library installed by Homebrew.jl, prune the remaining symlinks, and rebuild the ImageMagick package: