Importing the rados module fails as follows: $ python3.4 -c 'import rados' Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: /usr/lib64/python3.4/site-packages/rados.cpython-34m.so: undefined symbol: _Py_ZeroStruct I was able to solve the problem by modifying the ebuild to allow a python3.4-only build (and patching man/conf.py for python3 compatibility). The reason it fails with the current ceph-10.2.5-r1 ebuild is that src_configure generates a Makefile containing PYTHON_CFLAGS and PYTHON_LDFLAGS settings which are appropriate only for python2.7, causing rados.cpython-34m.so to be built with inappropriate CFLAGS and LDFLAGS.
Meanwhile, ceph-11 and later has explicit support for python2 and python3 in the same build, where python3 is enabled by -DWITH_PYTHON3=ON: https://github.com/ceph/ceph/commit/7d7a98484664bcb725fdb8691e75fd1c35493bc3
Created attachment 464980 [details, diff] fix ceph-10.2.5-r1.ebuild to re-configure Makefile for each python implementation This patch works, but it can probably be improved somehow. It causes emake_python_bindings to call econf for each python implementation during src_install, which triggers this QA Notice: * QA Notice: econf called in src_install instead of src_configure
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3ed284557758a1d2e86ea8eea96a4ad4f49d514 Fixed upstream, unfortunately there is no good way to fix the QA notices aside from calling python_copy_sources and building all of ceph multiple times, but that is very CPU and disk space intensive for no good reason.