numexpr icon indicating copy to clipboard operation
numexpr copied to clipboard

"Symbol not found: __ZSt20__throw_length_errorPKc" when importing numexpr

Open arturmatos opened this issue 12 years ago • 1 comments

Hi,

I'm having issues installing numexpr 2.3.1 on Mac OS X 10.9.2.

It installs just fine when I do "pip install numexpr" on a virtualenv, but I when I try to import it from a python shell I get:

ImportError: dlopen(/Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numexpr/interpreter.so, 2): Symbol not found: __ZSt20__throw_length_errorPKc Referenced from: /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numexpr/interpreter.so Expected in: flat namespace in /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numexpr/interpreter.so

Any ideas why I'm getting this? Am I missing any dependency? Searching the internet doesn't come up with anything.

I have Cython==0.20.1 and numpy==1.8.0.

In case it is helpful this is the output I get when installing:

Downloading/unpacking numexpr Downloading numexpr-2.3.1.tar.gz (74kB): 74kB downloaded Running setup.py (path:/Users/amatos/.virtualenvs/daikokuten/build/numexpr/setup.py) egg_info for package numexpr Warning: Assuming default configuration (numexpr/tests/{setup_tests,setup}.py was not found)Appending numexpr.tests configuration to numexpr Ignoring attempt to set 'name' (from 'numexpr' to 'numexpr.tests') build_src building py_modules sources building extension "numexpr.interpreter" sources build_src: building npy-pkg config files

warning: no previously-included files found matching 'numexpr/__config__.py'
warning: no previously-included files found matching 'RELEASING.txt'

Installing collected packages: numexpr Running setup.py install for numexpr Warning: Assuming default configuration (numexpr/tests/{setup_tests,setup}.py was not found)Appending numexpr.tests configuration to numexpr Ignoring attempt to set 'name' (from 'numexpr' to 'numexpr.tests') unifing config_cc, config, build_clib, build_ext, build commands --compiler options unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options build_src building py_modules sources building extension "numexpr.interpreter" sources build_src: building npy-pkg config files customize UnixCCompiler customize UnixCCompiler using build_ext customize UnixCCompiler #### ['/usr/bin/clang', '-fno-strict-aliasing', '-fno-common', '-dynamic', '-Os', '-pipe', '-march=native', '-mmacosx-version-min=10.8', '-Wno-unused-value', '-Wno-empty-body ', '-Qunused-arguments', '-DNDEBUG', '-g', '-fwrapv', '-O3', '-Wall', '-Wstrict-prototypes'] ####### Missing compiler_cxx fix for UnixCCompiler customize UnixCCompiler using build_ext building extension "numexpr.interpreter" sources [54/1892] build_src: building npy-pkg config files

warning: no previously-included files found matching 'numexpr/__config__.py'
warning: no previously-included files found matching 'RELEASING.txt'

Installing collected packages: numexpr Running setup.py install for numexpr Warning: Assuming default configuration (numexpr/tests/{setup_tests,setup}.py was not found)Appending numexpr.tests configuration to numexpr Ignoring attempt to set 'name' (from 'numexpr' to 'numexpr.tests') unifing config_cc, config, build_clib, build_ext, build commands --compiler options unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options build_src building py_modules sources building extension "numexpr.interpreter" sources build_src: building npy-pkg config files customize UnixCCompiler customize UnixCCompiler using build_ext customize UnixCCompiler #### ['/usr/bin/clang', '-fno-strict-aliasing', '-fno-common', '-dynamic', '-Os', '-pipe', '-march=native', '-mmacosx-version-min=10.8', '-Wno-unused-value', '-Wno-empty-body ', '-Qunused-arguments', '-DNDEBUG', '-g', '-fwrapv', '-O3', '-Wall', '-Wstrict-prototypes'] ####### Missing compiler_cxx fix for UnixCCompiler customize UnixCCompiler using build_ext building 'numexpr.interpreter' extension compiling C++ sources C compiler: /usr/bin/clang++ -fno-strict-aliasing -fno-common -dynamic -Os -pipe -march=native -mmacosx-version-min=10.8 -Wno-unused-value -Wno-empty-body -Qunused-arguments -DNDEBUG -g -fwrapv -O3 -Wall

compile options: '-I/Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions

/2.7/include/python2.7 -c' extra options: '-funroll-all-loops' clang++: numexpr/module.cpp In file included from numexpr/module.cpp:12: In file included from numexpr/module.hpp:12: In file included from /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17: In file included from /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728: /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: "Using deprecated NumPy API, disable it by #def ining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" ^ 1 warning generated. clang++: numexpr/numexpr_object.cpp In file included from numexpr/numexpr_object.cpp:10: In file included from numexpr/module.hpp:12: In file included from /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17: In file included from /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728: /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: "Using deprecated NumPy API, disable it by #def ining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" ^ numexpr/numexpr_object.cpp:97:30: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] static char *kwlist[] = {"signature", "tempsig", ^ numexpr/numexpr_object.cpp:97:43: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] static char *kwlist[] = {"signature", "tempsig", numexpr/numexpr_object.cpp:98:30: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] "program", "constants", ^ numexpr/numexpr_object.cpp:98:42: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] "program", "constants", ^ numexpr/numexpr_object.cpp:99:30: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] "input_names", NULL}; ^ numexpr/numexpr_object.cpp:360:6: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] {"signature", T_OBJECT_EX, offsetof(NumExprObject, signature), READONLY, NULL}, ^ numexpr/numexpr_object.cpp:361:6: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] {"constsig", T_OBJECT_EX, offsetof(NumExprObject, constsig), READONLY, NULL}, ^ numexpr/numexpr_object.cpp:362:6: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] {"tempsig", T_OBJECT_EX, offsetof(NumExprObject, tempsig), READONLY, NULL}, ^ numexpr/numexpr_object.cpp:363:6: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] {"fullsig", T_OBJECT_EX, offsetof(NumExprObject, fullsig), READONLY, NULL}, ^ numexpr/numexpr_object.cpp:365:6: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] {"program", T_OBJECT_EX, offsetof(NumExprObject, program), READONLY, NULL}, ^ numexpr/numexpr_object.cpp:366:6: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] {"constants", T_OBJECT_EX, offsetof(NumExprObject, constants), ^ numexpr/numexpr_object.cpp:368:6: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] {"input_names", T_OBJECT, offsetof(NumExprObject, input_names), 0, NULL}, ^ 13 warnings generated. clang++: numexpr/interpreter.cpp In file included from numexpr/interpreter.cpp:10: In file included from numexpr/module.hpp:12: In file included from /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17: In file included from /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728: /Users/amatos/.virtualenvs/daikokuten/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" ^ numexpr/interpreter.cpp:811:22: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings] errmsg = "Parallel engine doesn't support reduction yet"; ^ 2 warnings generated. /usr/bin/clang++ -bundle -undefined dynamic_lookup -L/usr/local/Cellar/readline/6.2.4/lib -L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/lib -L/opt/X11/lib build/temp.macosx-10.8-x86_64-2.7/numexpr/interpreter.o build/temp.macosx-10.8-x86_64-2.7/numexpr/module.o build/temp.macosx-10.8-x86_64-2.7/numexpr/numexpr_object.o -lm -o build/lib.macosx-10.8-x86_64-2.7/numexpr/interpreter.so

warning: no previously-included files found matching 'numexpr/__config__.py'
warning: no previously-included files found matching 'RELEASING.txt'
customize UnixCCompiler

Successfully installed numexpr Cleaning up...

arturmatos avatar Mar 08 '14 22:03 arturmatos

In case someone else has the same problem, this is what I did to fix it:

export CFLAGS='-std=c++11 -stdlib=libc++ -mmacosx-version-min=10.8’ export LDFLAGS=-lc++

Before running python setup.py install

arturmatos avatar Mar 12 '14 22:03 arturmatos