I follow the steps in the webpage, a problem came out when executing./setup/mac/install_prereqs.sh
drake % ./setup/mac/install_prereqs.sh
+ binary_distribution_args=()
+ source_distribution_args=()
+ '[' '' '!=' '' ']'
+ source ./setup/mac/binary_distribution/install_prereqs.sh ''
++ set -euxo pipefail
++ with_update=1
++ '[' '' '!=' '' ']'
++ [[ 501 -eq 0 ]]
++ command -v conda
++ command -v brew
++ [[ -z '' ]]
++ export HOMEBREW_NO_AUTO_UPDATE=1
++ HOMEBREW_NO_AUTO_UPDATE=1
++ export HOMEBREW_NO_INSTALL_CLEANUP=1
++ HOMEBREW_NO_INSTALL_CLEANUP=1
++ binary_distribution_called_update=0
++ [[ 1 -eq 1 ]]
++ brew update
Already up-to-date.
++ binary_distribution_called_update=1
++ brew tap robotlocomotion/director
+++ cat
++ brew uninstall --force robotlocomotion/director/scipy@1.5.4 robotlocomotion/director/numpy@1.19.4
++ brew bundle --file=./setup/mac/binary_distribution/Brewfile --no-lock
Using dreal-deps/ibex
Using robotlocomotion/director
Using adoptopenjdk
Using clp
Using cmake
Using double-conversion
==> Installing ibex@2.7.4 from dreal-deps/ibex
==> Downloading https://github.com/dreal-deps/ibex-lib/archive/ibex-2.7.4_10.tar.gz
Already downloaded: /Users/marui/Library/Caches/Homebrew/downloads/cf1b94f6783b4d23cc0bd34c10833f34cea5e7cff82ddfa24d7613f439a9d7f2--ibex-lib-ibex-2.7.4_10.tar.gz
==> ./waf configure --prefix=/opt/homebrew/Cellar/ibex@2.7.4/2.7.4_10 --enable-shared --with-optim --with-solver --with-affine-extended --interval-lib=filib --lp-lib=clp --clp-path=/opt/homebrew/opt/clp
Last 15 lines from /Users/marui/Library/Logs/Homebrew/ibex@2.7.4/01.waf:
Checking for program 'make' : /opt/homebrew/Library/Homebrew/shims/mac/super/make
Applying patch : filibsrc-3.0.2.2.all.all.patch
Calling configure : done
Calling make : done
Calling install : done
Checking for header interval/interval.hpp : yes
Checking for library prim : yes
Checking for compiler flags -frounding-math : yes
Checking for compiler flags -ffloat-store : yes
Checking for header interval/interval.hpp with -msse3 : yes
Configuration of the library for LP
Library for LP : clp
Checking for 'clp' : not found
The configuration failed
(complete log in /private/tmp/ibex-2.7.4-20210319-75719-hq0bkg/ibex-lib-ibex-2.7.4_10/__build__/config.log)
Do not report this issue to Homebrew/brew or Homebrew/core!
Installing dreal-deps/ibex/ibex@2.7.4 has failed!
Using eigen
Using gcc
Using fmt
Using gflags
Using glew
Using glib
Using graphviz
Using ipopt
Using libyaml
Using lz4
Using nlopt
Using numpy
Using openblas
Using pkg-config
Using python@3.9
Using scipy
Using spdlog
Using suite-sparse
Using tinyxml
Using tinyxml2
Using robotlocomotion/director/vtk@8.2.0
Using xz
Using yaml-cpp
Using zeromq
Homebrew Bundle failed! 1 Brewfile dependency failed to install.
How can i fix this? Thanks in advance.
The official answer: "On macOS, x86_64 is the only supported architecture and running Drake under Rosetta 2 emulation on arm64 is not supported." -- https://drake.mit.edu/developers.html#supported-configurations as of 2021-03-18.
You can subscribe to https://github.com/RobotLocomotion/drake/issues/14555 for any updates regarding M1 support.
However, if you want to try to hack through it locally, you could try commenting out homebrew dependencies that do not succeed (e.g., IBEX in this case).
With IBEX disabled, you'll also have to bazel build --define=NO_DREAL=ON
to disable dReal for the moment. Likely, other dependencies will also fail, but we have not tested on M1 yet so we don't know how close it is to working.
I've filed https://github.com/dreal/homebrew-dreal/issues/10 in case we can fix the IBEX problem easily.
The other option would be to spin up an Ubuntu VM (based on either 18.04 or 20.04).