Unable to run cython on Ubuntu 14.04

65 views
Skip to first unread message

ashwinD12

unread,
Jun 18, 2016, 4:30:56 AM6/18/16
to cython-users
I need to rebuild cython with icc compiler.

When I run cython on Ubuntu 14.04 - I get this error

How do I do that ?

Traceback (most recent call last):
  File "/usr/local/bin/cython", line 9, in <module>
    load_entry_point('Cython==0.24', 'console_scripts', 'cython')()
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 351, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2363, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python3.4/dist-packages/Cython/Compiler/Main.py", line 28, in <module>
    from .Scanning import PyrexScanner, FileSourceDescriptor
ImportError: /usr/local/lib/python3.4/dist-packages/Cython/Compiler/Scanning.cpython-34m.so: undefined symbol: __intel_sse2_strchr

ashwinD12

unread,
Jun 19, 2016, 3:56:44 AM6/19/16
to cython-users
CC=icc LINKCC=icc /usr/bin/python3.4 setup.py build_ext does compile but I still get the undefined symbols.

Any suggestions ?

ashwinD12

unread,
Jun 19, 2016, 11:58:49 AM6/19/16
to cython-users
icc -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /home/aswin/libPython/Cython-
0.24/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-3.4/home/aswin/libPython/Cython-0.24/Cython/Plex/Scanners.o
icc: command line warning #10006: ignoring unknown option '-fwrapv'
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/Cython
creating build/lib.linux-x86_64-3.4/Cython/Plex
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -lirc -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/home/aswin/libPython/Cython-0.24/Cython/Plex/Scanners.o -o build/lib.linux-x86_64-3.4/Cython/Plex/Scanners.cpython-34m.so

As you can see it is STILL using gcc for linking even though I specified icc for linking.

How can I change it to icc for linking and not gcc ?

ashwinD12

unread,
Jun 20, 2016, 7:47:01 AM6/20/16
to cython-users
LDSHARED="icc -shared" CC=icc python3.4 setup.py build_ext

This one command ensures that both the compiler and linker are icc !
Reply all
Reply to author
Forward
0 new messages