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

BUG: linking errors with cimg/python:3.11.0 and glibc #226

Closed
neutrinoceros opened this issue Dec 22, 2022 · 2 comments
Closed

BUG: linking errors with cimg/python:3.11.0 and glibc #226

neutrinoceros opened this issue Dec 22, 2022 · 2 comments
Assignees

Comments

@neutrinoceros
Copy link

Following a discussion with CircleCI support's, I'd like to report a problem with the cimg/python:3.11.0 image, with which we are experiencing linking errors not present with other Python versions/images:

original context:
yt-project/yt_astro_analysis#163

example failed job:
https://app.circleci.com/jobs/github/yt-project/yt_astro_analysis/1942

sample error message from the gcc compiler

io/io_tipsy.c:7:10: fatal error: rpc/types.h: No such file or directory
    7 | #include <rpc/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

it appears the "missing" rpc headers are in fact correctly installed

ls /usr/include/tirpc/rpc | grep rpc
rpcb_clnt.h
rpcb_prot.h
rpcb_prot.x
rpc_com.h
rpcent.h
rpc.h
rpc_msg.h
rpcsec_gss.h
@JalexChen
Copy link
Contributor

JalexChen commented Jan 5, 2023

Hi @neutrinoceros - there are a couple of factors here:

  • RPC functionality was dropped in favor of TIRPC
  • io_nchilada.c and io_tipsy.c are referencing /usr/include/rpc/types.h in their include headers, not /usr/include/tirpc/rpc/types.h, which is what your ls | grep is showing
  • python 3.11 is built off ubuntu 22.04, which uses tirpc rather than rpc.

If you were to change the include references to point to the correct path like above, you won't encounter the error. However, the types.h file has an internal include reference to netconfig.h. this does not exist in /usr/include/tirpc/rpc, but in usr/include/tirpc - you can reference this to edit and git apply the correct CFLAGS, e.g -I/usr/include/tirpc to address the above.

Additionally, i initially tried running your original code with git apply ../rockstar-patches/cflags.patch and it wasn't working. if you add the --whitespace=fix flag, you would be able to do so without using sed.

Lastly, even with those fixes, it seems there are multiple definition errors that are preventing compilation. I would assume those are coming from the rockstar-galaxies repo, though. Please note: the python versions that were passing tests were built using a cimg/base image using Ubuntu 20.04.

Python 3.11 does not have such an image at the moment. If you would like to make one for yourself in the meantime, you can edit the dockerfile to be FROM cimg/base:2022.01-20.04

@neutrinoceros
Copy link
Author

Thank you so much for your help and this detailed answer. I confirm that adding -I/usr/include/tirpc to CFLAGS fixes Rockstar's compilation. The remaining issues with my build are unrelated.

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