[ovs-discuss] Crash while building Python C extension

Iwase Yusuke iwase.yusuke0 at gmail.com
Tue Jan 10 00:32:02 UTC 2017


Hi Team,

(Sorry, if this post is duplicated.
I have posted this before without subscribing.)

I found build error (as following) has occurred while build Python C,
and cannot use C extension (but installation was finished successfully).

I'm on v2.6.1 of Git source and:
$ uname -a
Linux devXXX 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I've tested as following:
$ virtualenv -p python3 venv
...
$ . venv/bin/activate
(venv) $ python setup.py install
...(snip)
running build_ext
building 'ovs._json' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/ovs
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/home/iwase/ovs/python/venv/include/python3.5m -c ovs/_json.c -o build/temp.linux-x86_64-3.5/ovs/_json.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/ovs/_json.o -lopenvswitch -o build/lib.linux-x86_64-3.5/ovs/_json.cpython-35m-x86_64-linux-gnu.so
*** invalid %N$ use detected ***
collect2: fatal error: ld terminated with signal 6 [中止], core dumped
compilation terminated.
/usr/bin/ld: ***************************************************************************
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
Retrying the build without the C extension.
***************************************************************************
...(snip)
Installed /home/iwase/ovs/python/venv/lib/python3.5/site-packages/ovs-2.6.1-py3.5.egg
Processing dependencies for ovs==2.6.1
Finished processing dependencies for ovs==2.6.1


Does anyone knows why or workaround?
I guess there might be some printf format error in somewhere,
but I could not find it out...


Thanks,
Iwase


More information about the discuss mailing list