-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-32521: nis libtirpc #5137
bpo-32521: nis libtirpc #5137
Conversation
Confirming here that applying the patch makes the nis module compile successfully at a system where the sun rpc interfaces are provided by libtirpc and not glibc. |
With this change, setup.py first checks if rpcsvc/yp_prot.h is available:
and then it checks if libtirpc is available:
If libtirpc is available, it pass /usr/include/tirpc in include directories to build nismodule.c. In Fedora 27, rpcsvc/yp_prot.h is provided by glibc-headers. In Fedora rawhide (future F28), it's still provided by glibc-headers. It may be provided by a different package (rpcsvc-proto) in the future: https://bugzilla.redhat.com/show_bug.cgi?id=1532364 The PR is correct since rpcsvc/yp_prot.h will remain in /usr/include (full path: /usr/include/rpcsvc/yp_prot.h) even if it will be provided by a different package in Fedora 28. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please just rename include_dirs variable.
Later we might enhance the code by using pkg-config to get the include directory, rather than using an hardcoded path, but well... setup.py doesn't support pkg-config yet, pkg-config is not available on all platforms, and nis is going to be deprecated... So I don't think that it's worth it.
setup.py
Outdated
if self.compiler.find_library_file(lib_dirs, 'tirpc'): | ||
# Sun RPC has been moved from glibc to libtirpc | ||
libs.append('tirpc') | ||
include_dirs = ['/usr/include/tirpc'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code lives in the giant detect_modules() function which is 1184 lines long... The function should be refactored, but that's out of the scope of the PR.
Would you mind to rename include_dirs to nic_incs, as done for for other "include_dirs=" parameters? It would avoid bad surprised with name clashes in this giant function.
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis module Signed-off-by: Christian Heimes <christian@python.org>
@vstinner PR is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6. |
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis module Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit f3031b8)
GH-5165 is a backport of this pull request to the 3.6 branch. |
GH-5166 is a backport of this pull request to the 2.7 branch. |
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis module Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit f3031b8)
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis moduleupdated path for rpc.h for systems using libtirpc See python/cpython#5137 This closes #224 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillion@kitware.com>
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis moduleupdated path for rpc.h for systems using libtirpc See python/cpython#5137 This closes #224 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillion@kitware.com>
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis moduleupdated path for rpc.h for systems using libtirpc See python/cpython#5137 This closes #224 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis moduleupdated path for rpc.h for systems using libtirpc See python/cpython#5137 This closes #224 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis moduleupdated path for rpc.h for systems using libtirpc See python/cpython#5137 This closes python-cmake-buildsystem#224 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis moduleupdated path for rpc.h for systems using libtirpc See python/cpython#5137 This closes python-cmake-buildsystem#224 Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module
Signed-off-by: Christian Heimes christian@python.org
https://bugs.python.org/issue32521