aws-adfs: PyKerberos on MacOS - failure to install

There is an issue with pip installing PyKerberos on MacOS. The ARCH has to be set during the install or it fails. MacOS is no longer just “x86_64” and this is showing up in some libraries as the M1 processor is coming into play. I hacked around it for my installation with the following command after brew installing the base OS libraries.

% ARCHFLAGS="-arch x86_64" pip3 install aws-adfs --user

Just in case someone hits this I figured I throw it out there. It would be nice to have an option to not have krb used on Mac.

If someone has a better solution, please pile on.

About this issue

Most upvoted comments

Both my colleague and I are on Intel-based MacBook Pro 2019 machines. I assumed the arch issue was related to the non-Intel processor coming but we don’t have them. That was why I mentioned the M1.

The Python 3.8.2 from brew fixed the requests-gssapi install using the /usr/local/bin/pip3 install method. Did not resolve the pykerberos 1.2.1 but did allow the kerberos 1.3.1 package to install.

So there is something going on with python versions along with pip.

Here is the logs for trying the install without ARCHFLAGS:

mcgarrah@MACC02C36N5MD6T ~ % pip3 install requests-gssapi
Defaulting to user installation because normal site-packages is not writeable
Collecting requests-gssapi
  Downloading requests-gssapi-1.2.3.tar.gz (19 kB)
Requirement already satisfied: requests>=1.1.0 in /Library/Python/3.8/site-packages (from requests-gssapi) (2.26.0)
Collecting gssapi
  Downloading gssapi-1.7.0.tar.gz (1.2 MB)
     |████████████████████████████████| 1.2 MB 648 kB/s
Requirement already satisfied: charset-normalizer~=2.0.0 in /Library/Python/3.8/site-packages (from requests>=1.1.0->requests-gssapi) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in /Library/Python/3.8/site-packages (from requests>=1.1.0->requests-gssapi) (3.2)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/3.8/site-packages (from requests>=1.1.0->requests-gssapi) (2021.5.30)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Library/Python/3.8/site-packages (from requests>=1.1.0->requests-gssapi) (1.26.6)
Collecting decorator
  Downloading decorator-5.1.0-py3-none-any.whl (9.1 kB)
Building wheels for collected packages: requests-gssapi, gssapi
  Building wheel for requests-gssapi (setup.py) ... done
  Created wheel for requests-gssapi: filename=requests_gssapi-1.2.3-py2.py3-none-any.whl size=12530 sha256=2e8a9b2828b030057ce82d948ef91869e3dde07c74906db50779f829e35a0598
  Stored in directory: /Users/mcgarrah/Library/Caches/pip/wheels/89/22/fb/3d16544746a9ccf1fab046d8ce8f29481f31a01fcb9e6d3e9c
  Building wheel for gssapi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-36285tdk/gssapi_95856fb94f6b4423a48e1c1fcb85ba7d/setup.py'"'"'; __file__='"'"'/private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-36285tdk/gssapi_95856fb94f6b4423a48e1c1fcb85ba7d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-wheel-hk2qfqny
       cwd: /private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-36285tdk/gssapi_95856fb94f6b4423a48e1c1fcb85ba7d/
  Complete output (138 lines):
  In distributed package, building from C files...
  Skipping the s4u extension because it is not supported by your GSSAPI implementation...
  Skipping the cred_store extension because it is not supported by your GSSAPI implementation...
  Skipping the rfc4178 extension because it is not supported by your GSSAPI implementation...
  Skipping the rfc5588 extension because it is not supported by your GSSAPI implementation...
  Skipping the dce_aead extension because it is not supported by your GSSAPI implementation...
  Skipping the iov_mic extension because it is not supported by your GSSAPI implementation...
  Skipping the rfc6680 extension because it is not supported by your GSSAPI implementation...
  Skipping the rfc6680_comp_oid extension because it is not supported by your GSSAPI implementation...
  Skipping the password_add extension because it is not supported by your GSSAPI implementation...
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14.6-x86_64-3.8
  creating build/lib.macosx-10.14.6-x86_64-3.8/gssapi
  copying gssapi/sec_contexts.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
  copying gssapi/mechs.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
  copying gssapi/creds.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
  copying gssapi/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
  copying gssapi/names.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
  copying gssapi/exceptions.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
  copying gssapi/_win_config.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
  copying gssapi/_utils.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
  creating build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw
  copying gssapi/raw/named_tuples.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw
  copying gssapi/raw/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw
  creating build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw/_enum_extensions
  copying gssapi/raw/_enum_extensions/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw/_enum_extensions
  creating build/lib.macosx-10.14.6-x86_64-3.8/gssapi/tests
  copying gssapi/tests/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/tests
  copying gssapi/tests/test_raw.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/tests
  copying gssapi/tests/test_high_level.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/tests
  running build_ext
  building 'gssapi.raw.misc' extension
  creating build/temp.macosx-10.14.6-x86_64-3.8
  creating build/temp.macosx-10.14.6-x86_64-3.8/gssapi
  creating build/temp.macosx-10.14.6-x86_64-3.8/gssapi/raw
  xcrun -sdk macosx clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c gssapi/raw/misc.c -o build/temp.macosx-10.14.6-x86_64-3.8/gssapi/raw/misc.o -DOSX_HAS_GSS_FRAMEWORK
  In file included from gssapi/raw/misc.c:39:
  In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
  In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/limits.h:21:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:63:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
  #error Unsupported architecture
   ^
  In file included from gssapi/raw/misc.c:39:
  In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
  In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/limits.h:21:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:64:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/limits.h:8:2: error: architecture not supported
  #error architecture not supported
   ^
  In file included from gssapi/raw/misc.c:39:
  In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
  #error architecture not supported
   ^
  In file included from gssapi/raw/misc.c:39:
  In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
  typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_dev_t;         /* dev_t */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
  typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
  typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
  typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
  typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
          ^
  note: '__uint128_t' declared here
  In file included from gssapi/raw/misc.c:39:
  In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_wctype_t;
          ^
  note: '__uint128_t' declared here
  In file included from gssapi/raw/misc.c:39:
  In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:75:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h:31:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
  #error architecture not supported
   ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  error: command 'xcrun' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for gssapi
  Running setup.py clean for gssapi
Successfully built requests-gssapi
Failed to build gssapi
Installing collected packages: decorator, gssapi, requests-gssapi
    Running setup.py install for gssapi ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-36285tdk/gssapi_95856fb94f6b4423a48e1c1fcb85ba7d/setup.py'"'"'; __file__='"'"'/private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-36285tdk/gssapi_95856fb94f6b4423a48e1c1fcb85ba7d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-record-ymj8z4ii/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/mcgarrah/Library/Python/3.8/include/python3.8/gssapi
         cwd: /private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-36285tdk/gssapi_95856fb94f6b4423a48e1c1fcb85ba7d/
    Complete output (138 lines):
    In distributed package, building from C files...
    Skipping the s4u extension because it is not supported by your GSSAPI implementation...
    Skipping the cred_store extension because it is not supported by your GSSAPI implementation...
    Skipping the rfc4178 extension because it is not supported by your GSSAPI implementation...
    Skipping the rfc5588 extension because it is not supported by your GSSAPI implementation...
    Skipping the dce_aead extension because it is not supported by your GSSAPI implementation...
    Skipping the iov_mic extension because it is not supported by your GSSAPI implementation...
    Skipping the rfc6680 extension because it is not supported by your GSSAPI implementation...
    Skipping the rfc6680_comp_oid extension because it is not supported by your GSSAPI implementation...
    Skipping the password_add extension because it is not supported by your GSSAPI implementation...
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14.6-x86_64-3.8
    creating build/lib.macosx-10.14.6-x86_64-3.8/gssapi
    copying gssapi/sec_contexts.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
    copying gssapi/mechs.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
    copying gssapi/creds.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
    copying gssapi/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
    copying gssapi/names.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
    copying gssapi/exceptions.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
    copying gssapi/_win_config.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
    copying gssapi/_utils.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi
    creating build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw
    copying gssapi/raw/named_tuples.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw
    copying gssapi/raw/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw
    creating build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw/_enum_extensions
    copying gssapi/raw/_enum_extensions/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/raw/_enum_extensions
    creating build/lib.macosx-10.14.6-x86_64-3.8/gssapi/tests
    copying gssapi/tests/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/tests
    copying gssapi/tests/test_raw.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/tests
    copying gssapi/tests/test_high_level.py -> build/lib.macosx-10.14.6-x86_64-3.8/gssapi/tests
    running build_ext
    building 'gssapi.raw.misc' extension
    creating build/temp.macosx-10.14.6-x86_64-3.8
    creating build/temp.macosx-10.14.6-x86_64-3.8/gssapi
    creating build/temp.macosx-10.14.6-x86_64-3.8/gssapi/raw
    xcrun -sdk macosx clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c gssapi/raw/misc.c -o build/temp.macosx-10.14.6-x86_64-3.8/gssapi/raw/misc.o -DOSX_HAS_GSS_FRAMEWORK
    In file included from gssapi/raw/misc.c:39:
    In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
    In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/limits.h:21:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:63:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
    #error Unsupported architecture
     ^
    In file included from gssapi/raw/misc.c:39:
    In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
    In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/limits.h:21:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:64:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/limits.h:8:2: error: architecture not supported
    #error architecture not supported
     ^
    In file included from gssapi/raw/misc.c:39:
    In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
    #error architecture not supported
     ^
    In file included from gssapi/raw/misc.c:39:
    In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
    typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
            ^
    note: '__int128_t' declared here
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_dev_t;         /* dev_t */
            ^
    note: '__int128_t' declared here
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
            ^
    note: '__uint128_t' declared here
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
            ^
    note: '__uint128_t' declared here
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
    typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
    typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
    typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
            ^
    note: '__uint128_t' declared here
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
    typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
            ^
    note: '__int128_t' declared here
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
            ^
    note: '__uint128_t' declared here
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
            ^
    note: '__int128_t' declared here
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
            ^
    note: '__uint128_t' declared here
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
            ^
    note: '__uint128_t' declared here
    In file included from gssapi/raw/misc.c:39:
    In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_wctype_t;
            ^
    note: '__uint128_t' declared here
    In file included from gssapi/raw/misc.c:39:
    In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:75:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h:31:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
    #error architecture not supported
     ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    error: command 'xcrun' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-36285tdk/gssapi_95856fb94f6b4423a48e1c1fcb85ba7d/setup.py'"'"'; __file__='"'"'/private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-36285tdk/gssapi_95856fb94f6b4423a48e1c1fcb85ba7d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-record-ymj8z4ii/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/mcgarrah/Library/Python/3.8/include/python3.8/gssapi Check the logs for full command output.

We have also got another failure that I cannot personally reproduce but my colleague can consistently get to fail. His has to do with memcpy() and mempcpy() in glib vs stdlib I think. No idea why exactly he gets this error and I don’t but guessing it has to do with our build environments being slightly different someplace.

Building wheels for collected packages: aws-adfs, fido2, pykerberos
  Building wheel for aws-adfs (setup.py) ... done
  Created wheel for aws-adfs: filename=aws_adfs-1.24.5-py3-none-any.whl size=31334 sha256=a6f9a848ea03f8df962c4aeb9994673e11faee212f6165b0ac9f7c070039337b
  Stored in directory: /Users/u111054/Library/Caches/pip/wheels/1e/3f/a2/a1169981a94292fcf7f5712f2bdcab2b65ec2dd2e16e1d9d66
  Building wheel for fido2 (setup.py) ... done
  Created wheel for fido2: filename=fido2-0.8.1-py2.py3-none-any.whl size=160390 sha256=7ab67843f1759475c2818602b2c1fdc3fbea729468da4b18c76993795f063e80
  Stored in directory: /Users/u111054/Library/Caches/pip/wheels/39/2e/1e/aab5f8596e1ab179d0403c787321291bdbd9d8e9cee9b8ddbe
  Building wheel for pykerberos (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-install-j8_vzr7g/pykerberos_2262025e864b49e6891db228e6ea3a98/setup.py'"'"'; __file__='"'"'/private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-install-j8_vzr7g/pykerberos_2262025e864b49e6891db228e6ea3a98/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-wheel-h_wq30ch
       cwd: /private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-install-j8_vzr7g/pykerberos_2262025e864b49e6891db228e6ea3a98/
  Complete output (19 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'kerberos' extension
  creating build
  creating build/temp.macosx-10.15-x86_64-3.9
  creating build/temp.macosx-10.15-x86_64-3.9/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/opt/krb5/include -arch x86_64 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/base64.c -o build/temp.macosx-10.15-x86_64-3.9/src/base64.o -I/usr/local/Cellar/krb5/1.19.1/include -DGSSAPI_EXT
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/opt/krb5/include -arch x86_64 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/kerberos.c -o build/temp.macosx-10.15-x86_64-3.9/src/kerberos.o -I/usr/local/Cellar/krb5/1.19.1/include -DGSSAPI_EXT
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/opt/krb5/include -arch x86_64 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/kerberosbasic.c -o build/temp.macosx-10.15-x86_64-3.9/src/kerberosbasic.o -I/usr/local/Cellar/krb5/1.19.1/include -DGSSAPI_EXT
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/opt/krb5/include -arch x86_64 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/kerberosgss.c -o build/temp.macosx-10.15-x86_64-3.9/src/kerberosgss.o -I/usr/local/Cellar/krb5/1.19.1/include -DGSSAPI_EXT
  src/kerberosgss.c:876:14: error: implicit declaration of function 'mempcpy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      outloc = mempcpy(outloc, iov[1].buffer.value, iov[1].buffer.length);
               ^
  src/kerberosgss.c:876:12: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
      outloc = mempcpy(outloc, iov[1].buffer.value, iov[1].buffer.length);
             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning and 1 error generated.
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pykerberos
  Running setup.py clean for pykerberos
Successfully built aws-adfs fido2
Failed to build pykerberos
Installing collected packages: pycparser, urllib3, six, idna, charset-normalizer, cffi, certifi, requests, python-dateutil, pykerberos, jmespath, cryptography, requests-kerberos, lxml, fido2, configparser, click, botocore, aws-adfs
  WARNING: The script normalizer is installed in '/Users/u111054/Library/Python/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
    Running setup.py install for pykerberos ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-install-j8_vzr7g/pykerberos_2262025e864b49e6891db228e6ea3a98/setup.py'"'"'; __file__='"'"'/private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-install-j8_vzr7g/pykerberos_2262025e864b49e6891db228e6ea3a98/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-record-rbgl6isr/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/u111054/Library/Python/3.9/include/python3.9/pykerberos
         cwd: /private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-install-j8_vzr7g/pykerberos_2262025e864b49e6891db228e6ea3a98/
    Complete output (19 lines):
    running install
    running build
    running build_ext
    building 'kerberos' extension
    creating build
    creating build/temp.macosx-10.15-x86_64-3.9
    creating build/temp.macosx-10.15-x86_64-3.9/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/opt/krb5/include -arch x86_64 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/base64.c -o build/temp.macosx-10.15-x86_64-3.9/src/base64.o -I/usr/local/Cellar/krb5/1.19.1/include -DGSSAPI_EXT
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/opt/krb5/include -arch x86_64 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/kerberos.c -o build/temp.macosx-10.15-x86_64-3.9/src/kerberos.o -I/usr/local/Cellar/krb5/1.19.1/include -DGSSAPI_EXT
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/opt/krb5/include -arch x86_64 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/kerberosbasic.c -o build/temp.macosx-10.15-x86_64-3.9/src/kerberosbasic.o -I/usr/local/Cellar/krb5/1.19.1/include -DGSSAPI_EXT
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/opt/krb5/include -arch x86_64 -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/kerberosgss.c -o build/temp.macosx-10.15-x86_64-3.9/src/kerberosgss.o -I/usr/local/Cellar/krb5/1.19.1/include -DGSSAPI_EXT
    src/kerberosgss.c:876:14: error: implicit declaration of function 'mempcpy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        outloc = mempcpy(outloc, iov[1].buffer.value, iov[1].buffer.length);
                 ^
    src/kerberosgss.c:876:12: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
        outloc = mempcpy(outloc, iov[1].buffer.value, iov[1].buffer.length);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 warning and 1 error generated.
    error: command '/usr/bin/clang' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-install-j8_vzr7g/pykerberos_2262025e864b49e6891db228e6ea3a98/setup.py'"'"'; __file__='"'"'/private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-install-j8_vzr7g/pykerberos_2262025e864b49e6891db228e6ea3a98/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/26/9ny2rths27d5j09hnbqg2n_w8s6qrb/T/pip-record-rbgl6isr/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/u111054/Library/Python/3.9/include/python3.9/pykerberos Check the logs for full command output.
WARNING: You are using pip version 21.1.3; however, version 21.2.4 is available.
You should consider upgrading via the '/usr/local/opt/python@3.9/bin/python3.9 -m pip install --upgrade pip' command.
u111054@MACC02CV84UMD6T full [09:51:28]:
u111054@MACC02CV84UMD6T full [09:55:27]:
u111054@MACC02CV84UMD6T full [09:55:27]:
u111054@MACC02CV84UMD6T full [09:55:27]:xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
u111054@MACC02CV84UMD6T full [09:56:16]:clang --version
Apple clang version 12.0.0 (clang-1200.0.32.27)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I have no workaround for this one.

Here is a build with the failure on PyKerberos:

mcgarrah@MACC02C36N5MD6T ~ % pip3 install pykerberos
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Collecting pykerberos
  Using cached pykerberos-1.2.1.tar.gz (24 kB)
Building wheels for collected packages: pykerberos
  Building wheel for pykerberos (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-8th9y4af/pykerberos_c9163697a3c04eb283ce29a4b0ffe0ad/setup.py'"'"'; __file__='"'"'/private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-8th9y4af/pykerberos_c9163697a3c04eb283ce29a4b0ffe0ad/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-wheel-rldkgnha
       cwd: /private/var/folders/w9/v3tqgg197s5bwyqf7htl3jnw0000gn/T/pip-install-8th9y4af/pykerberos_c9163697a3c04eb283ce29a4b0ffe0ad/
  Complete output (107 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'kerberos' extension
  creating build
  creating build/temp.macosx-10.14.6-x86_64-3.8
  creating build/temp.macosx-10.14.6-x86_64-3.8/src
  xcrun -sdk macosx clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c src/kerberos.c -o build/temp.macosx-10.14.6-x86_64-3.8/src/kerberos.o
  In file included from src/kerberos.c:17:
  In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
  In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/limits.h:21:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:63:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
  #error Unsupported architecture
   ^
  In file included from src/kerberos.c:17:
  In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
  In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/limits.h:21:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:64:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/limits.h:8:2: error: architecture not supported
  #error architecture not supported
   ^

Here is the install with the ARCHFLAGS set:

mcgarrah@MACC02C36N5MD6T ~ % ARCHFLAGS="-arch x86_64" pip3 install pykerberos
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Collecting pykerberos
  Using cached pykerberos-1.2.1.tar.gz (24 kB)
Building wheels for collected packages: pykerberos
  Building wheel for pykerberos (setup.py) ... done
  Created wheel for pykerberos: filename=pykerberos-1.2.1-cp38-cp38-macosx_10_14_6_x86_64.whl size=17326 sha256=c26e047d90b78daefff8498bfb5a73c3b7fd37ae71a655ff0431eefb4b4cedc1
  Stored in directory: /Users/mcgarrah/Library/Caches/pip/wheels/cb/8e/02/fc155d536f1cca0f12f81648d6060d63a7212b5ca3e178c424
Successfully built pykerberos
Installing collected packages: pykerberos
Successfully installed pykerberos-1.2.1