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

Compilation Problem when Installing Python Package (grpio) #45

Closed
nickpresta opened this issue Mar 15, 2017 · 3 comments
Closed

Compilation Problem when Installing Python Package (grpio) #45

nickpresta opened this issue Mar 15, 2017 · 3 comments

Comments

@nickpresta
Copy link

Hello,

I've moved the comments over from this PR.

Overview

I'm attempting to use the glibc-dev package, pulled from CircleCI's artifacts, but I'm getting strange problems when compiling the grpio package in Python.

Here is a gist that provides a reproducible Dockerfile and the output I'm seeing.

This is very likely related to this issue filed with grpc.

Thanks to @jairov4 for trying to help. I added the gcc-libs that was suggested, but it didn't seem to fix anything (steps for this also included in the gist linked above).

Next Steps

What is confusing to me is that when I add the glibc-dev package and update the CPATH and LIBRARY_PATH environment variables, I get an error on missing Python.h, which suggests I'm missing the python-dev package, but it's installed. So I attempted to provide a CPATH and LIBRARY_PATH that would include the default locations as well as /usr/glibc-compat/lib and /usr/glibc-compat/include:

export LIBRARY_PATH=/usr/x86_64-alpine-linux-musl/lib64:/usr/local/lib64:/lib64:/usr/lib64:/usr/x86_64-alpine-linux-musl/lib:/usr/local/lib:/lib:/usr/lib:/usr/glibc-compat/lib
export CPATH=/usr/lib:/usr/lib/gcc/x86_64-alpine-linux-musl/6.3.0/include:/usr/glibc-compat/include
python3 -m pip install grpcio==1.1.3 grpcio-tools==1.1.3

But I still get the same problem about missing Python.h.

When I remove all references to the glibc-dev directories when installing, I get the same No symbol version section for versioned symbolmemcpy@GLIBC_2.2.5'` error, which is obviously the original problem I'm hoping this package can solve.

I understand that this may ultimately be a problem with the gRPC project and their interoperability with musl but I'm trying to understand if this issue is supposed to be fixed by this package.

Thanks for the help!

@sgerrand
Copy link
Owner

@nickpresta: I don't think that linking to the glibc header files will help with compiling the Python grpcio package. Compiling that package using muslc works, but ld throws an error during the final link stage.

/usr/lib/gcc/x86_64-alpine-linux-musl/6.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: final link failed: Nonrepresentable section on output
  collect2: error: ld returned 1 exit status

I'll have a further look into this issue today.

@nickpresta
Copy link
Author

Hey @sgerrand

I hope things are going well with you. I just wanted to follow up and see if you had any time to take a look at this issue?

Thanks!

@sgerrand
Copy link
Owner

@nickpresta: Sorry that I haven't been able to help you with this issue. I'm not able to successfully compile the grpio Python package under Alpine Linux. The authors of that package have created it against a glibc based Linux distribution. In the interim, I suggest you port your Docker image over to use something like debian:stable-slim as the base image.

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

2 participants