microsoft / dbt-fabric

MIT License
79 stars 28 forks source link

Unable to install dbt-fabric on Apple Silicon #237

Open arcticdba opened 3 weeks ago

arcticdba commented 3 weeks ago

pip install dbt-fabric involves a step where pyODBC is built, and it seems it is failing on Apple Silicon due to the lack of build wheels for that platform.

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

  × Building wheel for pyodbc (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [38 lines of output]
      WARNING: '' not a valid package name; please use only .-separated package names in setup.py
      running bdist_wheel
      running build
      running build_py
      creating build/lib.macosx-15.0-arm64-cpython-313
      copying src/pyodbc.pyi -> build/lib.macosx-15.0-arm64-cpython-313
      running build_ext
      building 'pyodbc' extension
      creating build/temp.macosx-15.0-arm64-cpython-313/src
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -DPYODBC_VERSION=5.1.0 -I/Users/alexanderarvidsson/DBT/fabric_epex/.venv/include -I/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/cnxninfo.cpp -o build/temp.macosx-15.0-arm64-cpython-313/src/cnxninfo.o -Wno-write-strings -Wno-deprecated-declarations -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/opt/homebrew/Cellar/unixodbc/2.3.12/include
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -DPYODBC_VERSION=5.1.0 -I/Users/alexanderarvidsson/DBT/fabric_epex/.venv/include -I/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/connection.cpp -o build/temp.macosx-15.0-arm64-cpython-313/src/connection.o -Wno-write-strings -Wno-deprecated-declarations -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/opt/homebrew/Cellar/unixodbc/2.3.12/include
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -DPYODBC_VERSION=5.1.0 -I/Users/alexanderarvidsson/DBT/fabric_epex/.venv/include -I/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/cursor.cpp -o build/temp.macosx-15.0-arm64-cpython-313/src/cursor.o -Wno-write-strings -Wno-deprecated-declarations -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/opt/homebrew/Cellar/unixodbc/2.3.12/include
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -DPYODBC_VERSION=5.1.0 -I/Users/alexanderarvidsson/DBT/fabric_epex/.venv/include -I/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/decimal.cpp -o build/temp.macosx-15.0-arm64-cpython-313/src/decimal.o -Wno-write-strings -Wno-deprecated-declarations -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/opt/homebrew/Cellar/unixodbc/2.3.12/include
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -DPYODBC_VERSION=5.1.0 -I/Users/alexanderarvidsson/DBT/fabric_epex/.venv/include -I/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/errors.cpp -o build/temp.macosx-15.0-arm64-cpython-313/src/errors.o -Wno-write-strings -Wno-deprecated-declarations -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/opt/homebrew/Cellar/unixodbc/2.3.12/include
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -DPYODBC_VERSION=5.1.0 -I/Users/alexanderarvidsson/DBT/fabric_epex/.venv/include -I/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/getdata.cpp -o build/temp.macosx-15.0-arm64-cpython-313/src/getdata.o -Wno-write-strings -Wno-deprecated-declarations -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/opt/homebrew/Cellar/unixodbc/2.3.12/include
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -DPYODBC_VERSION=5.1.0 -I/Users/alexanderarvidsson/DBT/fabric_epex/.venv/include -I/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/params.cpp -o build/temp.macosx-15.0-arm64-cpython-313/src/params.o -Wno-write-strings -Wno-deprecated-declarations -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -I/opt/homebrew/Cellar/unixodbc/2.3.12/include
      src/params.cpp:250:17: error: no matching function for call to '_PyLong_AsByteArray'
        250 |             if (_PyLong_AsByteArray((PyLongObject*)absVal, pNum->val, sizeof(pNum->val), 1, 0))
            |                 ^~~~~~~~~~~~~~~~~~~
      /opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13/cpython/longobject.h:111:17: note: candidate function not viable: requires 6 arguments, but 5 were provided
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^                   ~~~~~~~~~~~~~~~~
        112 |     unsigned char* bytes, size_t n,
            |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        113 |     int little_endian, int is_signed, int with_exceptions);
            |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/params.cpp:480:19: error: no matching function for call to '_PyLong_AsByteArray'
        480 |         int ret = _PyLong_AsByteArray((PyLongObject*)digitLong, pNum->val, sizeof(pNum->val), 1, 0);
            |                   ^~~~~~~~~~~~~~~~~~~
      /opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13/cpython/longobject.h:111:17: note: candidate function not viable: requires 6 arguments, but 5 were provided
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^                   ~~~~~~~~~~~~~~~~
        112 |     unsigned char* bytes, size_t n,
            |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        113 |     int little_endian, int is_signed, int with_exceptions);
            |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      2 errors generated.
      error: command '/usr/bin/clang++' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyodbc
Failed to build pyodbc

I am able to get PyODBC installed on its own by not building the binaries, but this does not seem to be taken into account by the dbt-fabric install.