This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: distutils extra_link_args not working because it is added to cmd last. should before -llibs
Type: behavior Stage: resolved
Components: Distutils, Installation Versions: Python 3.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Liu Cailiang, dstufft, eric.araujo, iritkatriel
Priority: normal Keywords:

Created on 2017-07-10 04:56 by Liu Cailiang, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg298024 - (view) Author: Liu Cailiang (Liu Cailiang) Date: 2017-07-10 04:56
Following is the executed command line (g++ version 5):
g++ -pthread -shared -L/conda/lib -Wl,-rpath=/conda/lib,--no-as-needed /tmp/tmp0lfzn4v9/home/ubuntu/pybind11_opencv_numpy/ndarray_converter.o /tmp/tmp0lfzn4v9/home/ubuntu/pybind11_opencv_numpy/.rendered.cpy.o -L/conda/lib -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -lopencv_video -lopencv_videoio -lopencv_objdetect -lm -lz -lpython3.6m -o /tmp/tmp0lfzn4v9/cpy.cpython-36m-x86_64-linux-gnu.so -Wl,--as-needed -O3 -Wall

If  -Wl,--as-needed -O3 -Wall is before the .o files, the extra_args work.
msg396365 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-22 21:41
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
2022-04-11 14:58:48adminsetgithub: 75072
2021-06-22 21:41:50iritkatrielsetstatus: open -> closed

nosy: + iritkatriel, eric.araujo, dstufft
messages: + msg396365

components: + Distutils
stage: resolved
2017-07-10 04:56:56Liu Cailiangcreate