From 4b85866746e6d8a4974201c5f0ee02c6910fa19a Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 15 Feb 2022 21:32:21 +0000 Subject: [PATCH] Documentation: Add Rosetta/Homebrew macOS note This should prevent a build issue caused by a potential conflicting zstd installation on M1 Mac. This was manifested in a linker error when building the GNU toolchain: ``` Undefined symbols for architecture arm64: [gcc/build] "_ZSTD_compress", referenced from: ``` --- Documentation/BuildInstructionsMacOS.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/BuildInstructionsMacOS.md b/Documentation/BuildInstructionsMacOS.md index 86309fe220..fc380bcfd7 100644 --- a/Documentation/BuildInstructionsMacOS.md +++ b/Documentation/BuildInstructionsMacOS.md @@ -13,7 +13,7 @@ Make sure you also have all the following dependencies installed: ```console # core -brew install coreutils e2fsprogs qemu bash gcc@11 imagemagick ninja cmake ccache rsync +brew install coreutils e2fsprogs qemu bash gcc@11 imagemagick ninja cmake ccache rsync zstd # (option 1) fuse + ext2 brew install m4 autoconf automake libtool @@ -24,6 +24,12 @@ Toolchain/BuildFuseExt2.sh brew install genext2fs ``` +If you're building on M1 Mac and have Homebrew installed in both Rosetta and native environments, +you have to make sure that required packages are installed only in one of the environments. Otherwise, +these installations can conflict during the build process, which is manifested in hard to diagnose issues. +Building on M1 natively without Rosetta is recommended, as the build process should be faster without Rosetta +overhead. + Notes: - Installing macfuse for the first time requires enabling its system extension in System Preferences and then restarting