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

ImportError on CentOS 7 #2

Closed
davidgaleano opened this issue Dec 20, 2018 · 9 comments
Closed

ImportError on CentOS 7 #2

davidgaleano opened this issue Dec 20, 2018 · 9 comments

Comments

@davidgaleano
Copy link

Installed with:

pip3 install --user --upgrade orjson

Fails on import:

import orjson
ImportError: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/davidgaleano/.local/lib/python3.6/site-packages/orjson.cpython-36m-x86_64-linux-gnu.so)

The python version is 3.6.3, and the CentOS version is 7.4.1708.

@ijl
Copy link
Owner

ijl commented Dec 20, 2018

Ok, this needs rust-lang/rust#56849, then can look into building Linux wheel using the manylinux1 container. PyO3/maturin#47.

@joar
Copy link

joar commented Jan 9, 2019

@ijl If it helps, I've managed to build manylinux wheels successfully for https://github.com/joar/rust-csv-py by instaling an older rust nightly.

In any case, I have some code that might be helpful when building pyo3 libraries using the manylinux1 docker image.

  1. Makefile target build-wheels-manylinux (called from travis/deploy.sh)
  2. travis/build-wheels-manylinux.sh (executed inside the manylinux docker image). Note: I'm using setuptools-rust, I think the pyo3-pack version of this script might be shorter.

@ijl
Copy link
Owner

ijl commented Jan 9, 2019

@joar thanks, I'll revisit this issue later.

@konstin
Copy link
Contributor

konstin commented Jan 18, 2019

FYI pyo3-pack got a working docker image now that should make this. I've only used the image with the testing crates yet so please feel free to open an issue if there's any problem or question with the image.

@ijl
Copy link
Owner

ijl commented May 2, 2019

I attempted this and it was not practical. I've documented that glibc earlier than 2.18 is not supported in the README (2d0c76e). You can build a wheel from source on your own system, however.

@ijl ijl closed this as completed May 2, 2019
@konstin
Copy link
Contributor

konstin commented May 4, 2019

@ijl Could you tell a bit more about what the problem with the docker container was?

@ijl
Copy link
Owner

ijl commented May 4, 2019

@konstin it wasn't a problem with the container you've published, more that working with Azure Pipelines was failing and too time consuming.

@pskopnik
Copy link
Contributor

I just built a conforming manylinux1 wheel using the konstin2/maturin:master image. Tests are passing.

Would you reconsider testing whether this is feasible on Azure? I used very similar commands to the pipeline specification.

These changes are required from my point of view:

  • https://github.com/ijl/orjson/blob/master/ci/azure-linux-container.yml

    • Remove interpreter, add Python tag variable.

      The tag would correspond to the directory name of the Python version:

      $ ls /opt/python/
      cp27-cp27m  cp27-cp27mu  cp34-cp34m  cp35-cp35m  cp36-cp36m  cp37-cp37m  cp38-cp38
    • Add the Python binary directory to the beginning of PATH. python, pip and co. will then resolve to the correct binary.

      $ ls /opt/python/cp37-cp37m/bin
      2to3      auditwheel    easy_install-3.7  idle3.7  pip3    __pycache__  pydoc3.7  python3    python3.7-config  python3.7m-config  pyvenv      readelf.py
      2to3-3.7  easy_install  idle3             pip      pip3.7  pydoc3       python    python3.7  python3.7m        python3-config     pyvenv-3.7  wheel
  • Restructure to use the maturin image, use the Python tag instead of the interpreter variable: https://github.com/ijl/orjson/blob/master/ci/azure-pipelines.yml#L17..L67

@pskopnik
Copy link
Contributor

I can probably just create a PR. Will the pipelines execute?

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

5 participants