To build shared library object, it is required to built as "Position Independent Code" (on x86-64, for example). This patch adds "-fPIC" extra compile flag to make sure that extension being PIC while building a shared library object.
Signed-off-by: IWASE Yusuke <iwase.yusu...@gmail.com> --- python/setup.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/setup.py b/python/setup.py index 19c1f18..8f565d8 100644 --- a/python/setup.py +++ b/python/setup.py @@ -76,8 +76,13 @@ setup_args = dict( 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', ], - ext_modules=[setuptools.Extension("ovs._json", sources=["ovs/_json.c"], - libraries=['openvswitch'])], + ext_modules=[ + setuptools.Extension( + "ovs._json", + sources=["ovs/_json.c"], + libraries=['openvswitch'], + extra_compile_args=["-fPIC"]), + ], cmdclass={'build_ext': try_build_ext}, ) -- 2.7.4 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev