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

Python 3.7 backport for sharedmemory does not compile on Mac OS #132

Open
aofarrel opened this issue Mar 10, 2022 · 0 comments
Open

Python 3.7 backport for sharedmemory does not compile on Mac OS #132

aofarrel opened this issue Mar 10, 2022 · 0 comments

Comments

@aofarrel
Copy link

Setup

OS: 10.15.17 (Catalina), running bash, in spite of Catalina's best efforts to convince me otherwise

> gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
> python --version
Python 3.7.9
> pip3 --version
pip 22.0.4 from /Users/ash/Library/Python/3.7/lib/python/site-packages/pip (python 3.7)
> xcode-select -v
xcode-select version 2373.

Error

> pip3 install getm 
Collecting getm
  Using cached getm-0.0.4.tar.gz (24 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: requests in /Users/ash/Library/Python/3.7/lib/python/site-packages (from getm) (2.25.1)
Requirement already satisfied: jsonschema in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from getm) (4.4.0)
Requirement already satisfied: google-crc32c in /Users/ash/Library/Python/3.7/lib/python/site-packages (from getm) (1.0.0)
Requirement already satisfied: cffi>=1.0.0 in /Users/ash/Library/Python/3.7/lib/python/site-packages (from google-crc32c->getm) (1.14.2)
Requirement already satisfied: attrs>=17.4.0 in /Users/ash/Library/Python/3.7/lib/python/site-packages (from jsonschema->getm) (20.3.0)
Requirement already satisfied: importlib-resources>=1.4.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from jsonschema->getm) (5.4.0)
Requirement already satisfied: typing-extensions in /Users/ash/Library/Python/3.7/lib/python/site-packages (from jsonschema->getm) (4.1.1)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from jsonschema->getm) (0.18.1)
Requirement already satisfied: importlib-metadata in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from jsonschema->getm) (4.0.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/ash/Library/Python/3.7/lib/python/site-packages (from requests->getm) (1.26.8)
Requirement already satisfied: idna<3,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests->getm) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests->getm) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests->getm) (2020.6.20)
Requirement already satisfied: pycparser in /Users/ash/Library/Python/3.7/lib/python/site-packages (from cffi>=1.0.0->google-crc32c->getm) (2.20)
Requirement already satisfied: zipp>=3.1.0 in /Users/ash/Library/Python/3.7/lib/python/site-packages (from importlib-resources>=1.4.0->jsonschema->getm) (3.1.0)
Building wheels for collected packages: getm
  Building wheel for getm (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-3.7
      creating build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/checksum.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/version.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/reader.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/cli.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/utils.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/http.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/progress.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      creating build/lib.macosx-10.9-x86_64-3.7/getm/concurrent
      copying getm/concurrent/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent
      copying getm/concurrent/collections.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent
      copying getm/concurrent/buffers.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent
      creating build/lib.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37
      copying getm/concurrent/shared_memory_37/shared_memory.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37
      copying getm/concurrent/shared_memory_37/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37
      running build_ext
      building 'getm.concurrent.shared_memory_37._posixshmem' extension
      creating build/temp.macosx-10.9-x86_64-3.7
      creating build/temp.macosx-10.9-x86_64-3.7/getm
      creating build/temp.macosx-10.9-x86_64-3.7/getm/concurrent
      creating build/temp.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c getm/concurrent/shared_memory_37/posixshmem.c -o build/temp.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37/posixshmem.o
      gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37/posixshmem.o -lrt -o build/lib.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37/_posixshmem.cpython-37m-darwin.so
      ld: library not found for -lrt
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command '/usr/bin/gcc' 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 getm
  Running setup.py clean for getm
Failed to build getm
Installing collected packages: getm
  Running setup.py install for getm ... error
  error: subprocess-exited-with-error

  × Running setup.py install for getm did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      running install
      /Users/ash/Library/Python/3.7/lib/python/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-3.7
      creating build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/checksum.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/version.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/reader.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/cli.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/utils.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/http.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      copying getm/progress.py -> build/lib.macosx-10.9-x86_64-3.7/getm
      creating build/lib.macosx-10.9-x86_64-3.7/getm/concurrent
      copying getm/concurrent/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent
      copying getm/concurrent/collections.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent
      copying getm/concurrent/buffers.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent
      creating build/lib.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37
      copying getm/concurrent/shared_memory_37/shared_memory.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37
      copying getm/concurrent/shared_memory_37/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37
      running build_ext
      building 'getm.concurrent.shared_memory_37._posixshmem' extension
      creating build/temp.macosx-10.9-x86_64-3.7
      creating build/temp.macosx-10.9-x86_64-3.7/getm
      creating build/temp.macosx-10.9-x86_64-3.7/getm/concurrent
      creating build/temp.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c getm/concurrent/shared_memory_37/posixshmem.c -o build/temp.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37/posixshmem.o
      gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37/posixshmem.o -lrt -o build/lib.macosx-10.9-x86_64-3.7/getm/concurrent/shared_memory_37/_posixshmem.cpython-37m-darwin.so
      ld: library not found for -lrt
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> getm

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
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

1 participant