Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on Mac OS Catalina 10.15.7 and Python 3.8.2 #113

Closed
sunshineinsandiego opened this issue Nov 7, 2020 · 13 comments
Closed

Comments

@sunshineinsandiego
Copy link

Hi - Tried to install ripser and building wheels failed with unsupported architecture possibly related to PEP 517

CL output below:

$ python3 --version
Python 3.8.2
$ python3 -m pip install ripser
Defaulting to user installation because normal site-packages is not writeable
Collecting ripser
  Using cached ripser-0.6.0.tar.gz (71 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting scipy
  Using cached scipy-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl (29.0 MB)
Requirement already satisfied: Cython in ./Library/Python/3.8/lib/python/site-packages (from ripser) (0.29.21)
Collecting scikit-learn
  Using cached scikit_learn-0.23.2-cp38-cp38-macosx_10_9_x86_64.whl (7.2 MB)
Requirement already satisfied: numpy in ./Library/Python/3.8/lib/python/site-packages (from ripser) (1.19.4)
Collecting persim
  Using cached persim-0.1.3-py3-none-any.whl (21 kB)
Collecting joblib>=0.11
  Using cached joblib-0.17.0-py3-none-any.whl (301 kB)
Collecting threadpoolctl>=2.0.0
  Using cached threadpoolctl-2.1.0-py3-none-any.whl (12 kB)
Processing ./Library/Caches/pip/wheels/fb/f7/29/5c31600b478c23a3793be7cea9889d5eccb1e7ef40fef5e34e/hopcroftkarp-1.2.5-py2.py3-none-any.whl
Requirement already satisfied: matplotlib in ./Library/Python/3.8/lib/python/site-packages (from persim->ripser) (3.3.2)
Requirement already satisfied: kiwisolver>=1.0.1 in ./Library/Python/3.8/lib/python/site-packages (from matplotlib->persim->ripser) (1.3.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in ./Library/Python/3.8/lib/python/site-packages (from matplotlib->persim->ripser) (2.4.7)
Requirement already satisfied: cycler>=0.10 in ./Library/Python/3.8/lib/python/site-packages (from matplotlib->persim->ripser) (0.10.0)
Requirement already satisfied: certifi>=2020.06.20 in ./Library/Python/3.8/lib/python/site-packages (from matplotlib->persim->ripser) (2020.6.20)
Requirement already satisfied: python-dateutil>=2.1 in ./Library/Python/3.8/lib/python/site-packages (from matplotlib->persim->ripser) (2.8.1)
Requirement already satisfied: pillow>=6.2.0 in ./Library/Python/3.8/lib/python/site-packages (from matplotlib->persim->ripser) (8.0.1)
Requirement already satisfied: six in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from cycler>=0.10->matplotlib->persim->ripser) (1.15.0)
Building wheels for collected packages: ripser
  Building wheel for ripser (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Developer/CommandLineTools/usr/bin/python3 /Users/.../Library/Python/3.8/lib/python/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/74/01qhmy3s3qg_fwctkdf6mrvh0000gn/T/tmpsa43kkox
       cwd: /private/var/folders/74/01qhmy3s3qg_fwctkdf6mrvh0000gn/T/pip-install-6vzbqkch/ripser
  Complete output (119 lines):
  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/ripser
  copying ripser/_version.py -> build/lib.macosx-10.14.6-x86_64-3.8/ripser
  copying ripser/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/ripser
  copying ripser/ripser.py -> build/lib.macosx-10.14.6-x86_64-3.8/ripser
  running build_ext
  building 'pyRipser' extension
  creating build/temp.macosx-10.14.6-x86_64-3.8
  creating build/temp.macosx-10.14.6-x86_64-3.8/ripser
  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 -DUSE_COEFFICIENTS=1 -DNDEBUG=1 -DASSEMBLE_REDUCTION_MATRIX=1 -I./ripser -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -I/private/var/folders/74/01qhmy3s3qg_fwctkdf6mrvh0000gn/T/pip-build-env-08xxv8e5/overlay/lib/python3.8/site-packages/numpy/core/include -c ripser/pyRipser.cpp -o build/temp.macosx-10.14.6-x86_64-3.8/ripser/pyRipser.o -Ofast -D_hypot=hypot -std=c++11 -mmacosx-version-min=10.9
  In file included from ripser/pyRipser.cpp:47:
  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/bin/../include/c++/v1/limits.h:57:
  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 ripser/pyRipser.cpp:47:
  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/bin/../include/c++/v1/limits.h:57:
  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 ripser/pyRipser.cpp:47:
  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/usr/bin/../include/c++/v1/stdio.h:107:
  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 ripser/pyRipser.cpp:47:
  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/usr/bin/../include/c++/v1/stdio.h:107:
  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 ripser/pyRipser.cpp:47:
  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/usr/bin/../include/c++/v1/stdio.h:107:
  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 ripser/pyRipser.cpp:47:
  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/usr/bin/../include/c++/v1/stdio.h:107:
  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 ripser
Failed to build ripser
ERROR: Could not build wheels for ripser which use PEP 517 and cannot be installed directly

Any ideas? Thanks!

@sauln
Copy link
Member

sauln commented Nov 7, 2020

Could you try installing from source? I might need to add more distributions to our CI/CD.

Sorry, didn't mean to close it.

@sauln sauln closed this as completed Nov 7, 2020
@sauln sauln reopened this Nov 7, 2020
@sunshineinsandiego
Copy link
Author

I tried installing from source:

$ python3 setup.py install
running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 2] No such file or directory: '/Library/Python/3.8/site-packages/test-easy-install-1936.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/3.8/site-packages/

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).

@bdice
Copy link
Collaborator

bdice commented Nov 7, 2020

@sunshineinsandiego Try python3 setup.py install --user. You can’t install to the system site packages without sudo, and it’s better to install to your user site packages anyway.

@sunshineinsandiego
Copy link
Author

sunshineinsandiego commented Nov 7, 2020

Same errors as when trying to install via pip:

$ python3 setup.py install --user
running install
running bdist_egg
running egg_info
writing ripser.egg-info/PKG-INFO
writing dependency_links to ripser.egg-info/dependency_links.txt
writing requirements to ripser.egg-info/requires.txt
writing top-level names to ripser.egg-info/top_level.txt
reading manifest file 'ripser.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'ripser.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.14.6-x86_64/egg
running install_lib
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/ripser
copying ripser/_version.py -> build/lib.macosx-10.14.6-x86_64-3.8/ripser
copying ripser/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/ripser
copying ripser/ripser.py -> build/lib.macosx-10.14.6-x86_64-3.8/ripser
running build_ext
building 'pyRipser' extension
creating build/temp.macosx-10.14.6-x86_64-3.8
creating build/temp.macosx-10.14.6-x86_64-3.8/ripser
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 -DUSE_COEFFICIENTS=1 -DNDEBUG=1 -DASSEMBLE_REDUCTION_MATRIX=1 -I./ripser -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -I/Users/.../Library/Python/3.8/lib/python/site-packages/numpy/core/include -c ripser/pyRipser.cpp -o build/temp.macosx-10.14.6-x86_64-3.8/ripser/pyRipser.o -Ofast -D_hypot=hypot -std=c++11 -mmacosx-version-min=10.9
In file included from ripser/pyRipser.cpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/limits.h:57:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/limits.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/limits.h:63:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: 
      Unsupported architecture
#error Unsupported architecture
 ^
In file included from ripser/pyRipser.cpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/limits.h:57:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/limits.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/limits.h:64:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/limits.h:8:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from ripser/pyRipser.cpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdio.h:107:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: 
      architecture not supported
#error architecture not supported
 ^
In file included from ripser/pyRipser.cpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdio.h:107:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: 
      unknown type name '__int64_t'
typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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 */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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 */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: 
      unknown type name '__int64_t'
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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 ripser/pyRipser.cpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdio.h:107:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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 ripser/pyRipser.cpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdio.h:107:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:31:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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

@sauln
Copy link
Member

sauln commented Nov 9, 2020

@bdice do you think this could be related to the robinhood changes we just merged?

@bdice
Copy link
Collaborator

bdice commented Nov 9, 2020

@sauln I don't think so, but it's possible. I was able to install with python setup.py install --user on my Mac with commit f784e1f and versions:

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

$ python --version
Python 3.8.2

$ cython --version
Cython version 0.29.16

@sunshineinsandiego Can you run those commands and provide version information? Also, can you provide the output of uname -a? Are you trying to cross-compile this code for another architecture like the new macOS ARM processors?

@sunshineinsandiego
Copy link
Author

I am not trying to cross-compile, just trying to install with python3 on a ~2015 Macbook Air. It's possible there is something wonky going on given I just upgraded to Catalina. Thanks for your help!

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.21)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ python --version
Python 2.7.16

$ python3 --version
Python 3.8.2

$ cython --version
zsh: /usr/local/bin/cython: bad interpreter: /usr/local/opt/python/bin/python3.7: no such file or directory

$ which cython
/usr/local/bin/cython

$ python3 -m pip install cython
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: cython in /Users/.../Library/Python/3.8/lib/python/site-packages (0.29.21)

$uname -a
% uname -a
Darwin ... 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64

@bdice
Copy link
Collaborator

bdice commented Nov 11, 2020

@sunshineinsandiego I’m not sure what is wrong. You might try installing the package with pip or conda instead of from source, or try creating a conda environment and installing the package into that environment instead of your system’s user packages.

@sauln
Copy link
Member

sauln commented Nov 11, 2020

I see that you cython is installed into a python3.7 while your python3 version is 3.8.2. Could you try running everything within a virtual environment? I assume your python system is crossed up.

I just installed the library into a virtual environment with Python 3.8.3 on Catalonia and there were no problems.

@MonkeyBreaker
Copy link
Contributor

Hi everyone, sorry I could not be involved earlier, I'm under too much work (Yay !).

do you think this could be related to the robinhood changes we just merged?

Robinhood is disable by default, and without downloading the required folder, it shouldn't be enable. Looking about this problem, I found the following:

It seems the issue has been encountered on other libraries, as I understood, the same problem was encountered here. And apparently, there's a problem with the python shipped with XCode. In order to resolve the problem, it's necessary to uninstall the current Python version and install the one provided directly at python.org

Hopefully this fixes the current issue, let me know if this doesn't fix the problem.

Best,
Julián

@bdice
Copy link
Collaborator

bdice commented Nov 23, 2020

Good find @MonkeyBreaker. That would support my hypothesis about an unexpected cross-compilation. 😄 Using a non-system Python (e.g. from python.org, brew, or conda) should help.

@Lightwel
Copy link

Hi -

This post is really directed at the thread

Unable to build on macOS with Xcode 12: architecture not supported when building watchdog #3770

But that is closed - with a solution. This thread seems similar and I hope it’s ok to raise this issue here. This post will make sense if cross referred to the other thread.

I’m experiencing the same Python related build issues on 10.15.7 with Planetary System Stacker and have been directed to the above page for help. I am a noob in these waters and could do with some extra guidance please.

I installed the CL Tools from the App Store and my terminal shows:

% which python
/usr/bin/python

% python --version
Python 2.7.16

% python3 --version
Python 3.8.2

% which python3
/usr/bin/python3

% which clang
/usr/bin/clang

% 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

Finder searches show multiple files and folders for python - I have versions 2.7, 3.6, 3.8.2 and now 3.9 in various locations. Cannot find a way to list them simply from Finder or terminal.

My take on the discussion in the closed thread so far is:

1 Download and install Py3.9 - done.

Py3.9 is installed on my machine at Mac/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9.

I have “Python 3.9” in my Applications folder (not ~/Applications), where I also have “IDLE.app” and “Python Launcher.app”. Not clear when I would ever launch these, but there they are.

2 ddeville says “Can you check your path (and/or do which python3) and make sure that it's in fact picking the one you've installed from python.org and symlinked in /usr/local/bin?”

Is that symlink necessary? Does it make any difference that Python 3.9 is listed under /Applications and /Library, and not ~/Applications and ~/Library? If the symlink is required, how is it done?

3 rwmitchell says “So focused on python, overlooked what python3 was doing. Fixed pathing to find 3.9 first and all is better.”

How is that done? I noted the ‘lb’ command in the screenshots, but:

% lb python
zsh: command not found: lb

4 Should I remove the other versions of python? How?

5 Do I need to do anything with Xcode to get it to use 3.9 automatically in the future?

Many thanks for any help.

@catanzaromj
Copy link
Contributor

Closing as out of date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants