Coder Social home page Coder Social logo

pyre2's Issues

cannot build on Mac

@localhost pyre2 % make CFLAGS='-fPIC -c -Wall -Wno-sign-compare -O3 -g -I.'
python3 setup.py build
running build
running build_py
running build_ext
building '_re2' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -fPIC -c -Wall -Wno-sign-compare -O3 -g -I. -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c _re2.cc -o build/temp.macosx-10.15-x86_64-3.8/_re2.o -std=c++11
_re2.cc:211:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
PyObject_HEAD_INIT(NULL)
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8/object.h:85:5: note: expanded from macro 'PyObject_HEAD_INIT'
1, type },
^~~~~~~
_re2.cc:255:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
PyObject_HEAD_INIT(NULL)
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8/object.h:85:5: note: expanded from macro 'PyObject_HEAD_INIT'
1, type },
^~~~~~~
_re2.cc:299:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
PyObject_HEAD_INIT(NULL)
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8/object.h:85:5: note: expanded from macro 'PyObject_HEAD_INIT'
1, type },
^~~~~~~
3 warnings generated.
clang++ -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -c -Wall -Wno-sign-compare -O3 -g -I. build/temp.macosx-10.15-x86_64-3.8/_re2.o -L/usr/local/lib -L/usr/local/opt/[email protected]/lib -L/usr/local/opt/sqlite/lib -lre2 -o build/lib.macosx-10.15-x86_64-3.8/_re2.cpython-38-darwin.so
clang: warning: build/temp.macosx-10.15-x86_64-3.8/_re2.o: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lre2: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-bundle' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-undefined dynamic_lookup' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-fPIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-O3' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-g' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-I .' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/usr/local/opt/[email protected]/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/usr/local/opt/sqlite/lib' [-Wunused-command-line-argument]
python3 setup.py build_ext -i
running build_ext
building '_re2' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -fPIC -c -Wall -Wno-sign-compare -O3 -g -I. -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c _re2.cc -o build/temp.macosx-10.15-x86_64-3.8/_re2.o -std=c++11
_re2.cc:211:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
PyObject_HEAD_INIT(NULL)
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8/object.h:85:5: note: expanded from macro 'PyObject_HEAD_INIT'
1, type },
^~~~~~~
_re2.cc:255:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
PyObject_HEAD_INIT(NULL)
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8/object.h:85:5: note: expanded from macro 'PyObject_HEAD_INIT'
1, type },
^~~~~~~
_re2.cc:299:3: warning: suggest braces around initialization of subobject [-Wmissing-braces]
PyObject_HEAD_INIT(NULL)
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/[email protected]/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8/object.h:85:5: note: expanded from macro 'PyObject_HEAD_INIT'
1, type },
^~~~~~~
3 warnings generated.
clang++ -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -c -Wall -Wno-sign-compare -O3 -g -I. build/temp.macosx-10.15-x86_64-3.8/_re2.o -L/usr/local/lib -L/usr/local/opt/[email protected]/lib -L/usr/local/opt/sqlite/lib -lre2 -o build/lib.macosx-10.15-x86_64-3.8/_re2.cpython-38-darwin.so
clang: warning: build/temp.macosx-10.15-x86_64-3.8/_re2.o: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lre2: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-bundle' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-undefined dynamic_lookup' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-fPIC' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-O3' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-g' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-I .' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/usr/local/opt/[email protected]/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/usr/local/opt/sqlite/lib' [-Wunused-command-line-argument]
error: can't copy 'build/lib.macosx-10.15-x86_64-3.8/_re2.cpython-38-darwin.so': doesn't exist or not a regular file
make: *** [build] Error 1
@localhost pyre2 %

Match misplace by 2

When the ’ (RIGHT SINGLE QUOTATION MARK ; HTML ’ HEX 0x2019 ) is in the string to search the span is displace by 2, for example:

string = "it’s your car"
regex = re2.compile('you')
match = regex.search(string)
pather_match = string[match.start():match.end()]
print(pather_match)

'ur c'

fb-re2 compiles and installs on macos but using gives segmentation fault

While I suspect there is some specific local environment issue that produces this awful result, I think that we need to prevent it from building/installing a broken package.

pip install fb-re2
python -c "import re2; re2.compile('foo')"
[1]    99748 segmentation fault  python -c "import re2; re2.compile('foo')"

I was able to reproduce the error with both python3.6 and pyton3.7 installed using pyenv.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.