On Wed, Jan 11, 2017 at 09:38:13AM +0900, IWASE Yusuke wrote: > 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 <[email protected]> > --- > 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}, > )
Are you sure that this is the right way to build a Python shared object? It is very ELF-specific so I imagine that it will break Windows and BSD builds. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
