Way to fix ImageMagick on Mac?

I keep getting the following error message from trying to use imagemagick:

julia> Pkg.build("ImageMagick")
INFO: Building Homebrew
Already up-to-date.
INFO: Building FFTW
INFO: Building SpecialFunctions
INFO: Building ImageMagick
Error: Your Xcode (1) is too outdated.
Please update to Xcode 9.2 (or delete it).
Xcode can be updated from the App Store.

Error: Your Command Line Tools are too outdated.
Update them from Software Update in the App Store.
=============================[ ERROR: ImageMagick ]=============================

LoadError: failed process: Process(`/Users/dan/.julia/v0.6/Homebrew/deps/usr/bin/brew install --ignore-dependencies xz`, ProcessExited(1)) [1]
while loading /Users/dan/.julia/v0.6/ImageMagick/deps/build.jl, in expression starting on line 122

================================================================================

================================[ BUILD ERRORS ]================================

WARNING: ImageMagick had build errors.

 - packages with build errors remain installed in /Users/dan/.julia/v0.6
 - build the package(s) and all dependencies with `Pkg.build("ImageMagick")`
 - build a single package by running its `deps/build.jl` script

================================================================================

Anyone have any luck solving it before?


edit: i have the newest command line tools. deleting xcode 9.2 isn’t explained anywhere on the internet… :confused:

For what it’s worth, I’ve just installed ImageMagick with julia 1.0.1 on a fresh Mojave setup with the following steps and no errors:

  1. brew install imagemagick (outside of julia)
  2. ] add ImageMagick and ] build ImageMagick with
(v1.0) pkg> add ImageMagick
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
 Installed Conda ────────── v1.1.1
 Installed BinaryProvider ─ v0.5.2
 Installed Compat ───────── v1.3.0
 Installed PlotUtils ────── v0.5.5
  Updating `~/.julia/environments/v1.0/Project.toml`
  [6218d12a] + ImageMagick v0.7.1
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [b99e7846] ↑ BinaryProvider v0.5.1 ⇒ v0.5.2
  [34da2185] ↑ Compat v1.2.0 ⇒ v1.3.0
  [8f4d0f93] ↑ Conda v1.0.2 ⇒ v1.1.1
  [995b91a9] ↑ PlotUtils v0.5.4 ⇒ v0.5.5
  Building Conda → `~/.julia/packages/Conda/uQitS/deps/build.log`

(v1.0) pkg> build ImageMagick
  Building Conda ──────→ `~/.julia/packages/Conda/uQitS/deps/build.log`
  Building FFTW ───────→ `~/.julia/packages/FFTW/p7sLQ/deps/build.log`
  Building ImageMagick → `~/.julia/packages/ImageMagick/d5KBL/deps/build.log`

Xcode installed earlier through xcode-select --install