pyre2
pyre2 copied to clipboard
Build re2 extension failed: no matching function for call to 'call_once'
OS: OSX 10.12.2
Complier:
➜ Desktop clang -v
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Logs:
Building wheels for collected packages: re2
Running setup.py bdist_wheel for re2 ... error
Complete output from command /Users/user/.pyenv/versions/2.7.13/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/pip-build-cgaqhU/re2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/tmpMSvuDKpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
building 're2' extension
creating build
creating build/temp.macosx-10.12-x86_64-2.7
creating build/temp.macosx-10.12-x86_64-2.7/src
clang -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/Users/user/.pyenv/versions/2.7.13/include/python2.7 -c src/re2.cpp -o build/temp.macosx-10.12-x86_64-2.7/src/re2.o
In file included from src/re2.cpp:202:
/usr/local/include/re2/re2.h:908:5: error: no matching function for call to 'call_once'
std::call_once(once_, &LazyRE2::Init, this);
^~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/mutex:557:1: note: candidate function template not viable: requires 2 arguments, but 3 were provided
call_once(once_flag& __flag, _Callable& __func)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/mutex:569:1: note: candidate function template not viable: requires 2 arguments, but 3 were provided
call_once(once_flag& __flag, const _Callable& __func)
^
src/re2.cpp:1190:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:8725:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:9003:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:9112:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:9366:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:9448:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:10702:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:11696:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:11829:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:11962:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:12095:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:12228:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:12362:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:12508:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
src/re2.cpp:12658:14: warning: explicitly assigning value of variable of type 'PyObject *' (aka '_object *') to itself [-Wself-assign]
__pyx_self = __pyx_self;
~~~~~~~~~~ ^ ~~~~~~~~~~
15 warnings and 1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Failed building wheel for re2
The same problem...
Have you tried running the latest version here on github? I think you're missing the option to enable C++11. You could also try my fork.
@andreasvc thx for your comment.
It works now:
➜ ~ export CFLAGS='-std=c++11'
➜ ~ pip install re2
Collecting re2
Using cached re2-0.2.22.tar.gz
Building wheels for collected packages: re2
Running setup.py bdist_wheel for re2 ... done
Stored in directory: /Users/user/Library/Caches/pip/wheels/e8/8e/e7/86bc3d2b2969ae33ec265ad7d96939756c07eb04fca6b0f97d
Successfully built re2
Installing collected packages: re2
Successfully installed re2-0.2.22