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

OSX not building on Python 2.7 #23

Closed
33 tasks done
rolyp opened this issue Mar 2, 2020 · 0 comments
Closed
33 tasks done

OSX not building on Python 2.7 #23

rolyp opened this issue Mar 2, 2020 · 0 comments

Comments

@rolyp
Copy link
Collaborator

rolyp commented Mar 2, 2020

Can’t build for Python 2.7.10 or 3.4.8 on my Mac or on the GitHub macos-10.15 virtual machine. Installation fails with compilation error, apparently because of wrong version of SSL library.

  • remove sdist step and use of pyenv
    • verify unnecessary
    • [Errno 63] File name too long (circular file path?)
      • try pip wheel from esig and esig/build
    • new build script for 2.7 only initially
      • use virtualenv directly without pyenv
      • remove virtual environment after use
    • new GitHub job without 3.5 installation step in build-OSX-python-2.7.yml
    • extract $p from python –version so will work with 3.4 too
    • consolidate temporary folder structure
    • new GitHub job to run 2.7 build script in a Python 3.4 environment ❌ (3.4 not supported)
  • experiment with dropping pyenv:
    • with Python 2.7, run python -m pip install -U pip virtualenv
      • fails with ERROR:root:code for hash md5 was not found., probably to do with my openssl shenanigans:
        • brew reinstall python@2
          • FormulaUnavailableError: No available formula with the name “/usr/local/opt/python@2/.brew/python@2.rb”
            • save python@2.rb locally then brew reinstall python@2.rb
  • Anaconda experiment to have multiple Python versions without requiring pyenv, at least for 2.7 and 3.4:
    • install Anaconda for Python 3.7
    • install Python 2.7 virtual environment
    • install Python 3.4 virtual environment
    • run wheel build in Python 3.4 virtual environment ❌
      • RuntimeError: Python 3.5 or later is required
    • run wheel build in Python 3.5 virtual environment ❌
      • fatal error: ‘string’ file not found: #include <string>
        • set CPATH=/Users/rperera/anaconda3/envs/py35/include/c++/v1/ before wheel build
      • ld: warning: directory not found for option ‘-L/opt/local/lib/’; ld: library not found for -lstdc++
      • give up for now and uninstall (seemed to be breaking pyenv install)
  • discuss PyPI download statistics with Terry
  • ask Peter to try building 2.7.10 and 3.4.8
  • fail build if any Python installation fails
  • temporarily enable OXS build on mac-build branch only
  • enable SSH access to GitHub Actions build – haven’t needed it yet
  • compilation error _ssl.c:684:35: error: incomplete definition of type ‘struct X509_name_entry_st’ (same error with Python 2.7 and 3.4) ❌
    • experiment to force Python 2.7 build to use [libressl-2.2.7] ❌(https://www.bountysource.com/issues/47297948-error-the-python-ssl-extension-was-not-compiled-missing-the-openssl-lib)
      • put libressl-2.2.7 somewhere local using curl -O https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.2.7.tar.gz then tar xvf libressl-2.2.7.tar.gz
      • try setting CFLAGS include dir to libressl-2.2.7 - failed, argument not passed to clang, this code which ignores CFLAGS is probably relevant, also homebrew bumped openssl from 1.0 to 1.1 on 27 Nov 2019
      • try ln -s ~/Repo/esig/build/OSX/libressl-2.2.7 /usr/local/opt/openssl@1.1 - seems to unstick compiler but fails with linker error ld: library not found for -lssl
      • copy /usr/local/opt/openssl@1.1/lib/* to libressl-2.2.7/lib - seems to unstick that link step, but fails with another linker error ld: framework not found QuickTime (and also highly dubious!)
      • improve slightly by instead trying ln -s ~/Repo/esig/build/OSX/libressl-2.2.7/include /usr/local/opt/openssl@1.1/include (linking include dir only) - should reproduce QT error
      • apparently --no-opencv will drop the QT requirement but not sure what this needs to be passed to ❌ – no need to continue this inquiry as no longer trying to build 2.7 from sources
      • install QuickTime and symlink into XCode installation ❌ – still apparently can’t find Quicktime.framework
    • experiment with force-removing openssl - later problem with ImportError: No module named zipp
    • experiment with PYTHON_CONFIGURE_OPTS=”--with-openssl-dir=./libressl-2.2.7”
    • set brew installations to specific versions - probably possible by pointing to specific .rb files but prob unnecessary
    • upgrade pyenv-virtualenv to 1.1.5 fails because openssl not symlinked??
    • remove anaconda installation so openssl isn’t picked up from there
      • removing anaconda means Python falls back to default 2.7 installation that comes with MacOS, and pip fails with ERROR:root:code for hash md5 was not found
      • reinstall system-level Python 3:
        • requires xcode-select –install (thought I already did that?)
        • brew install python3
  • try with Python 2.7.1 and 2.7.17 - still fails
@rolyp rolyp changed the title OSX build working on Python 2.7 and 3.4 OSX not building on Python 2.7 and 3.4 Mar 3, 2020
@rolyp rolyp changed the title OSX not building on Python 2.7 and 3.4 OSX not building on Python 2.7 or 3.4 Mar 3, 2020
@rolyp rolyp mentioned this issue Mar 10, 2020
21 tasks
@rolyp rolyp changed the title OSX not building on Python 2.7 or 3.4 OSX not building on Python 2.7 Mar 10, 2020
@rolyp rolyp closed this as completed Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant