Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Undefined symbol __intel_sse2_strrchr

Ashwin_D_
Beginner
1,519 Views

Hello,

           This is with regards to using some modules of python which were compiled with icc but python itself was compiled with gcc 4.8.2. When I tried to import this module into python I get this linking error below. Do I need to rebuild python with icc if I have python modules built with icc ?

Regards,

Ashwin.

 

Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pygrib.pyx", line 212, in init pygrib (pygrib.c:29700)
    ctypedef extern class numpy.ndarray [object PyArrayObject]:
  File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 170, in <module>
    from . import add_newdocs
  File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/__init__.py", line 6, in <module>
    from . import multiarray
ImportError: /usr/local/lib/python2.7/dist-packages/numpy/core/multiarray.so: undefined symbol: __intel_sse2_strrchr
>>>

0 Kudos
4 Replies
Feilong_H_Intel
Employee
1,519 Views

Hi Ashwin,

__intel_sse2_strrchr is defined in libirc.so.  Please check if multiarray.so has a dependency on libirc.so with the following command.

$ ldd /usr/local/lib/python2.7/dist-packages/numpy/core/multiarray.so

Thanks.

0 Kudos
Ashwin_D_
Beginner
1,519 Views

When I run that command ldd I get this output. Please help me to interpret what that means.    

 

    linux-vdso.so.1 =>  (0x00007fff331fe000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc5a9186000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc5a8dbf000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fc5a9821000)

 

0 Kudos
Ashwin_D_
Beginner
1,519 Views

When I recompiled python with icc the original problem went away.

0 Kudos
Om_S_Intel
Employee
1,519 Views

We are happy to learn that it is resolved.

 

Om

0 Kudos
Reply