classification
Title: distutils: allow overriding of the RANLIB command on macOS (darwin)
Type: compile error Stage: resolved
Components: Cross-Build, Distutils Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Alex.Willmer, Alexandru Ardelean, Jakub Piotr Cłapa, dstufft, eric.araujo, isuruf, ned.deily, steve.dower
Priority: normal Keywords: patch

Created on 2019-08-22 11:37 by Jakub Piotr Cłapa, last changed 2021-02-03 18:07 by steve.dower. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15387 closed python-dev, 2019-08-22 11:38
Messages (5)
msg350185 - (view) Author: Jakub Piotr Cłapa (Jakub Piotr Cłapa) * Date: 2019-08-22 11:37
On a macOS hosts the system ranlib does not understand ELF
files so using the "ranlib" command causes errors during cross-compilations.

The simplest way to fix it is to pass the RANLIB parameter provided to setup.py through to the distutils compiler machinery. This is analogous to the way the C/C++ cross-compiler is configured.

This change (in a GitHub PR) was required to proceed with crosscompiling numpy. It should help with other packages too (if they use distutils and need ranlib).
msg350978 - (view) Author: Alexandru Ardelean (Alexandru Ardelean) * Date: 2019-09-02 10:24
ping here :)
any thoughts/feedback?

the fix looks interesting, and I'm also interested in seeing a resolution for this
msg355909 - (view) Author: Isuru Fernando (isuruf) * Date: 2019-11-03 21:50
This is an issue even without cross-compilations as there is an environment variable for the archiver and therefore the archiver and ranlib can be from 2 different toolchains and leads to error. Ran into this issue in python 3.8 on macOS with an lto build
msg358062 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-12-09 09:43
Thank you for the PR. I did a quick look at it and added some comments to the PR including wondering whether the root cause of the problematic behavior is elsewhere in Distutils.
msg386259 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:07
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools
History
Date User Action Args
2021-02-03 18:07:53steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386259

resolution: out of date
stage: patch review -> resolved
2019-12-09 09:43:10ned.deilysetnosy: + ned.deily
messages: + msg358062
2019-11-03 21:50:05isurufsetnosy: + isuruf
messages: + msg355909
2019-09-02 10:24:55Alexandru Ardeleansetnosy: + Alexandru Ardelean
messages: + msg350978
2019-08-23 18:48:18ned.deilysetnosy: + eric.araujo, dstufft
components: + Distutils
2019-08-22 11:38:50python-devsetkeywords: + patch
stage: patch review
pull_requests: + pull_request15096
2019-08-22 11:37:17Jakub Piotr Cłapacreate