I run into the same scenario with miniforge, Apple Silicon (M1) when performing the following:
# Exclude external factors in my environment
$> mv ~/.zshrc ~/.not_zshrc
<close/open terminal>
$> curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
$> sh Miniforge3-MacOSX-arm64.sh -b -p ~/miniforge3
$> export PATH=~/miniforge3/bin:$PATH
$> conda init zsh
<close/open terminal>
$> conda create -n test clang_osx-64
$> conda activate test
The activate script involved is being built as thus:
if [ "@CONDA_BUILD_CROSS_COMPILATION@" = "1" ]; then
_CMAKE_ARGS="${_CMAKE_ARGS} -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=@UNAME_MACHINE@ -DCMAKE_SYSTEM_VERSION=@UNAME_KERNEL_RELEASE@"
_MESON_ARGS="${_MESON_ARGS} --cross-file $BUILD_PREFIX/meson_cross_file.txt"
echo "[host_machine]" > $BUILD_PREFIX/meson_cross_file.txt
echo "system = 'darwin'" >> $BUILD_PREFIX/meson_cross_file.txt
echo "cpu = '@UNAME_MACHINE@'" >> $BUILD_PREFIX/meson_cross_file.txt
echo "cpu_family = '@MESON_CPU_FAMILY@'" >> $BUILD_PREFIX/meson_cross_file.txt
echo "endian = 'little'" >> $BUILD_PREFIX/meson_cross_file.txt
fi
I believe this is due to Conda-Forge's feedstock continuous integration not having access to Apple Silicon as they build the lovely binaries we all use (they are using Intel/AMD arches to build Arm64; i.e. cross compiling). Which then is set and propagates to those actually using said hardware.
Unfortunately, this creates an always true activation:
if [ "1" = "1" ]; then
_CMAKE_ARGS="${_CMAKE_ARGS} -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_SYSTEM_VERSION=13.4.0"
_MESON_ARGS="${_MESON_ARGS} --cross-file $BUILD_PREFIX/meson_cross_file.txt"
echo "[host_machine]" > $BUILD_PREFIX/meson_cross_file.txt
echo "system = 'darwin'" >> $BUILD_PREFIX/meson_cross_file.txt
echo "cpu = 'x86_64'" >> $BUILD_PREFIX/meson_cross_file.txt
echo "cpu_family = 'x86_64'" >> $BUILD_PREFIX/meson_cross_file.txt
echo "endian = 'little'" >> $BUILD_PREFIX/meson_cross_file.txt
fi
While not a fix, you can set BUILD_PREFIX to some writable area just before the activation event:
BUILD_PREFIX="/some/writable/dir"
conda activate test
But, I would sooner just ignore this message. BUILD_PREFIX is really only used during conda build
operations (as far as I know).