ml-explore / mlx

MLX: An array framework for Apple silicon
https://ml-explore.github.io/mlx/
MIT License
16.68k stars 957 forks source link

[BUG] Undefined symbols for architecture arm64 during mlx installation #1435

Closed huang06 closed 2 weeks ago

huang06 commented 2 weeks ago

Describe the bug

I’m encountering a build failure when trying to install the mlx package on Mac M1. The error occurs during the CMake build process when linking libmlx.dylib:

Building wheels for collected packages: mlx
  Building wheel for mlx (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for mlx (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [283 lines of output]
      running bdist_wheel
      running build
      running build_py
      copying python/mlx/_os_warning.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx
      copying python/mlx/utils.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx
      copying python/mlx/extension.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx
      copying python/mlx/_reprlib_fix.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx
      copying python/mlx/nn/__init__.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn
      copying python/mlx/nn/utils.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn
      copying python/mlx/nn/losses.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn
      copying python/mlx/nn/init.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn
      copying python/mlx/optimizers/__init__.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/optimizers
      copying python/mlx/optimizers/optimizers.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/optimizers
      copying python/mlx/optimizers/schedulers.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/optimizers
      copying python/mlx/nn/layers/convolution.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/quantized.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/embedding.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/recurrent.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/activations.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/containers.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/linear.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/pooling.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/__init__.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/upsample.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/transformer.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/dropout.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/positional_encoding.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/normalization.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/convolution_transpose.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      copying python/mlx/nn/layers/base.py -> build/lib.macosx-15.0-arm64-cpython-312/mlx/nn/layers
      running egg_info
      writing python/mlx.egg-info/PKG-INFO
      writing dependency_links to python/mlx.egg-info/dependency_links.txt
      writing requirements to python/mlx.egg-info/requires.txt
      writing top-level names to python/mlx.egg-info/top_level.txt
      reading manifest file 'python/mlx.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'python/mlx.egg-info/SOURCES.txt'
      copying python/mlx/py.typed -> build/lib.macosx-15.0-arm64-cpython-312/mlx
      warning: build_py: byte-compiling is disabled, skipping.

      running build_ext
      -- Building MLX for arm64 processor on Darwin
      -- Building METAL sources
      -- Building with SDK for macOS version 15.0

      -- Accelerate found /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/Accelerate.framework
      -- Checking for module 'mpi-c'
      --   No package 'mpi-c' found
      -- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS)
      -- Checking for module 'mpi-cxx'
      --   No package 'mpi-cxx' found
      -- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS)
      -- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)
      -- Downloading json
      -- Using the multi-header code from /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/json-src/include/
      -- Downloading gguflib
      -- Version: 10.2.1
      -- Build type: Release
      -- Building Python bindings.
      -- Configuring done (27.1s)
      -- Generating done (0.1s)
      -- Build files have been written to: /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core
      [  0%] Built target reduce_utils
      [  0%] Built target ternary_ops
      [  1%] Built target cpu_compiled_preamble
      [  1%] Built target binary_ops
      [  2%] Building C object mlx/io/CMakeFiles/gguflib.dir/__/__/_deps/gguflib-src/gguflib.c.o
      [ 18%] Built target mlx-metallib
      [ 19%] Built target scatter
      [ 20%] Built target unary_ops
      [ 21%] Building C object mlx/io/CMakeFiles/gguflib.dir/__/__/_deps/gguflib-src/fp16.c.o
      [ 21%] Built target gather
      [ 22%] Built target utils
      [ 23%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/nb_internals.cpp.o
      [ 23%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/nb_func.cpp.o
      [ 24%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/nb_type.cpp.o
      [ 25%] Built target hadamard
      [ 26%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/nb_static_property.cpp.o
      [ 26%] Linking C static library libgguflib.a
      [ 26%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/common.cpp.o
      [ 26%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/nb_enum.cpp.o
      [ 27%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/nb_ndarray.cpp.o
      [ 27%] Built target gguflib
      [ 28%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/error.cpp.o
      [ 28%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/trampoline.cpp.o
      [ 29%] Building CXX object python/src/CMakeFiles/nanobind-static.dir/private/var/folders/n9/q2wygx295hb47h6wdjjqgb3r0000gn/T/pip-build-env-_a41mazl/overlay/lib/python3.12/site-packages/nanobind/src/implicit.cpp.o
      [ 30%] Linking CXX static library libnanobind-static.a
      [ 31%] Building CXX object CMakeFiles/mlx.dir/mlx/io/safetensors.cpp.o
      [ 31%] Building CXX object CMakeFiles/mlx.dir/mlx/io/gguf.cpp.o
      [ 32%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/compiled.cpp.o
      [ 33%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/nojit_kernels.cpp.o
      [ 33%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/binary.cpp.o
      [ 34%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/allocator.cpp.o
      [ 35%] Building CXX object CMakeFiles/mlx.dir/mlx/io/gguf_quants.cpp.o
      In file included from /Users/tom/work/mlx/mlx/backend/metal/nojit_kernels.cpp:2:
      In file included from /Users/tom/work/mlx/mlx/backend/metal/kernels.h:3:
      In file included from /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/format.h:43:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/system_error:150:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/__system_error/error_category.h:15:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/string:625:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/string_view:213:
      /opt/homebrew/opt/llvm/bin/../include/c++/v1/__fwd/string_view.h:22:41: warning: 'char_traits<fmt::detail::char8_type>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 19, so please migrate off of it. [-Wdeprecated-declarations]
         22 | template <class _CharT, class _Traits = char_traits<_CharT> >
            |                                         ^
      /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/core.h:361:26: note: in instantiation of default argument for 'basic_string_view<fmt::detail::char8_type>' required here
        361 | template <typename Char> using std_string_view = std::basic_string_view<Char>;
            |                          ^~~~~
      /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/core.h:452:50: note: in instantiation of template type alias 'std_string_view' requested here
        452 |                                       S, detail::std_string_view<Char>>::value)>
            |                                                  ^
      /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/format.h:737:57: note: in instantiation of template class 'fmt::basic_string_view<fmt::detail::char8_type>' requested here
        737 | inline auto compute_width(basic_string_view<char8_type> s) -> size_t {
            |                                                         ^
      /opt/homebrew/opt/llvm/bin/../include/c++/v1/__string/char_traits.h:81:8: note: 'char_traits<fmt::detail::char8_type>' has been explicitly marked deprecated here
         81 | struct _LIBCPP_DEPRECATED_(
            |        ^
      /opt/homebrew/opt/llvm/bin/../include/c++/v1/__config:975:53: note: expanded from macro '_LIBCPP_DEPRECATED_'
        975 | #      define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
            |                                                     ^
      [ 35%] Built target nanobind-static
      [ 35%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/conv.cpp.o
      1 warning generated.
      [ 36%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/copy.cpp.o
      [ 37%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/custom_kernel.cpp.o
      [ 37%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/distributed.cpp.o
      [ 38%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/device.cpp.o
      [ 38%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/event.cpp.o
      [ 39%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/fft.cpp.o
      [ 40%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/hadamard.cpp.o
      In file included from /Users/tom/work/mlx/mlx/backend/metal/fft.cpp:3:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/complex:240:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/sstream:278:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/istream:170:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/ostream:181:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/__system_error/error_code.h:18:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/__system_error/error_category.h:15:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/string:625:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/string_view:213:
      /opt/homebrew/opt/llvm/bin/../include/c++/v1/__fwd/string_view.h:22:41: warning: 'char_traits<fmt::detail::char8_type>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 19, so please migrate off of it. [-Wdeprecated-declarations]
         22 | template <class _CharT, class _Traits = char_traits<_CharT> >
            |                                         ^
      /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/core.h:361:26: note: in instantiation of default argument for 'basic_string_view<fmt::detail::char8_type>' required here
        361 | template <typename Char> using std_string_view = std::basic_string_view<Char>;
            |                          ^~~~~
      /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/core.h:452:50: note: in instantiation of template type alias 'std_string_view' requested here
        452 |                                       S, detail::std_string_view<Char>>::value)>
            |                                                  ^
      /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/format.h:737:57: note: in instantiation of template class 'fmt::basic_string_view<fmt::detail::char8_type>' requested here
        737 | inline auto compute_width(basic_string_view<char8_type> s) -> size_t {
            |                                                         ^
      /opt/homebrew/opt/llvm/bin/../include/c++/v1/__string/char_traits.h:81:8: note: 'char_traits<fmt::detail::char8_type>' has been explicitly marked deprecated here
         81 | struct _LIBCPP_DEPRECATED_(
            |        ^
      /opt/homebrew/opt/llvm/bin/../include/c++/v1/__config:975:53: note: expanded from macro '_LIBCPP_DEPRECATED_'
        975 | #      define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
            |                                                     ^
      [ 40%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/indexing.cpp.o
      [ 41%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/matmul.cpp.o
      [ 41%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/scaled_dot_product_attention.cpp.o
      [ 42%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/metal.cpp.o
      [ 43%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/primitives.cpp.o
      In file included from /Users/tom/work/mlx/mlx/backend/metal/indexing.cpp:2:
      In file included from /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/format.h:43:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/system_error:150:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/__system_error/error_category.h:15:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/string:625:
      In file included from /opt/homebrew/opt/llvm/bin/../include/c++/v1/string_view:213:
      /opt/homebrew/opt/llvm/bin/../include/c++/v1/__fwd/string_view.h:22:41: warning: 'char_traits<fmt::detail::char8_type>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 19, so please migrate off of it. [-Wdeprecated-declarations]
         22 | template <class _CharT, class _Traits = char_traits<_CharT> >
            |                                         ^
      /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/core.h:361:26: note: in instantiation of default argument for 'basic_string_view<fmt::detail::char8_type>' required here
        361 | template <typename Char> using std_string_view = std::basic_string_view<Char>;
            |                          ^~~~~
      /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/core.h:452:50: note: in instantiation of template type alias 'std_string_view' requested here
        452 |                                       S, detail::std_string_view<Char>>::value)>
            |                                                  ^
      /Users/tom/work/mlx/build/temp.macosx-15.0-arm64-cpython-312/mlx.core/_deps/fmt-src/include/fmt/format.h:737:57: note: in instantiation of template class 'fmt::basic_string_view<fmt::detail::char8_type>' requested here
        737 | inline auto compute_width(basic_string_view<char8_type> s) -> size_t {
            |                                                         ^
      /opt/homebrew/opt/llvm/bin/../include/c++/v1/__string/char_traits.h:81:8: note: 'char_traits<fmt::detail::char8_type>' has been explicitly marked deprecated here
         81 | struct _LIBCPP_DEPRECATED_(
            |        ^
      /opt/homebrew/opt/llvm/bin/../include/c++/v1/__config:975:53: note: expanded from macro '_LIBCPP_DEPRECATED_'
        975 | #      define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
            |                                                     ^
      [ 43%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/quantized.cpp.o
      [ 44%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/normalization.cpp.o
      [ 44%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/rope.cpp.o
      [ 45%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/scan.cpp.o
      [ 46%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/slicing.cpp.o
      1 warning generated.
      [ 46%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/softmax.cpp.o
      [ 47%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/sort.cpp.o
      [ 47%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/reduce.cpp.o
      [ 48%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/ternary.cpp.o
      [ 50%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/unary.cpp.o
      [ 50%] Building CXX object CMakeFiles/mlx.dir/mlx/backend/metal/utils.cpp.o
      1 warning generated.
      [ 51%] Linking CXX shared library libmlx.dylib
      Undefined symbols for architecture arm64:
        "_NSDeviceCertificationiPhonePerformanceGaming", referenced from:
            __GLOBAL__sub_I_device.cpp in device.cpp.o
            __GLOBAL__sub_I_device.cpp in device.cpp.o
        "_NSProcessInfoPerformanceProfileDidChangeNotification", referenced from:
            __GLOBAL__sub_I_device.cpp in device.cpp.o
            __GLOBAL__sub_I_device.cpp in device.cpp.o
        "_NSProcessPerformanceProfileDefault", referenced from:
            __GLOBAL__sub_I_device.cpp in device.cpp.o
            __GLOBAL__sub_I_device.cpp in device.cpp.o
        "_NSProcessPerformanceProfileSustained", referenced from:
            __GLOBAL__sub_I_device.cpp in device.cpp.o
            __GLOBAL__sub_I_device.cpp in device.cpp.o
        "std::exception_ptr::__from_native_exception_pointer(void*)", referenced from:
            std::__1::promise<bool>::~promise() in load.cpp.o
        "___cxa_init_primary_exception", referenced from:
            std::__1::promise<bool>::~promise() in load.cpp.o
      ld: symbol(s) not found for architecture arm64
      clang++: error: linker command failed with exit code 1 (use -v to see invocation)
      make[2]: *** [libmlx.dylib] Error 1
      make[1]: *** [CMakeFiles/mlx.dir/all] Error 2
      make: *** [all] Error 2

To Reproduce

Include code snippet

python3 -m venv .venv
source .venv/bin/activate
CMAKE_BUILD_PARALLEL_LEVEL=8 pip install .

Expected behavior

The package should build and install successfully without any linker errors.

Desktop (please complete the following information):

awni commented 2 weeks ago

Clang 18.1.8 is a very recent release of Clang. Did you install that intentionally?

I would use the default Apple clang for your xcode version (should be 16.0.0) unless you have a reason not to. That is the latest we've tested.

Probably the easiest thing to do is uninstall the latest clang you have. Alternatively you can hard code the compiler path for CMake, see e.g. https://stackoverflow.com/a/17275650/3897655

huang06 commented 2 weeks ago

Clang 18.1.8 is a very recent release of Clang. Did you install that intentionally?

I would use the default Apple clang for your xcode version (should be 16.0.0) unless you have a reason not to. That is the latest we've tested.

Probably the easiest thing to do is uninstall the latest clang you have. Alternatively you can hard code the compiler path for CMake, see e.g. https://stackoverflow.com/a/17275650/3897655

Thanks for the tip! I actually didn’t realize I was using Clang 18. After your suggestion, I unset the CC environment variable (CC=/opt/homebrew/opt/llvm/bin/clang) to revert to the default Apple Clang, and it worked!

Really appreciate the help! 😄