[New-bugs-announce] [issue30889] distutils extra_link_args not working because it is added to cmd last. should before -llibs

Liu Cailiang report at bugs.python.org
Mon Jul 10 00:56:56 EDT 2017


New submission from Liu Cailiang:

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.

----------
components: Installation
messages: 298024
nosy: Liu Cailiang
priority: normal
severity: normal
status: open
title: distutils extra_link_args not working because it is added to cmd last. should before -llibs
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30889>
_______________________________________


More information about the New-bugs-announce mailing list