axiak / pyre2

Python wrapper for RE2
BSD 3-Clause "New" or "Revised" License
295 stars 39 forks source link

pyre2 does not compile with the latest version of re2 #6

Closed davekirby closed 12 years ago

davekirby commented 12 years ago

I grabbed the latest re2 and pyre2, but when I tried to build pyre2 it failed with the following errors:

src/re2.cpp: In function ‘PyObject* __pyx_f_3re2_7Pattern__search(__pyx_obj_3re2_Pattern*, PyObject*, int, int, re2::RE2::Anchor)’:
src/re2.cpp:5160: error: no matching function for call to ‘re2::RE2::Match(re2::StringPiece&, int&, re2::RE2::Anchor&, re2::StringPiece*&, int)’
/usr/local/include/re2/re2.h:458: note: candidates are: bool re2::RE2::Match(const re2::StringPiece&, int, int, re2::RE2::Anchor, re2::StringPiece*, int) const

I tracked the problem down to a change made to re2 on March 2nd 2011 - mercurial changeset 57:d9f8806c004d that added an extra 'endpos' parameter to Match.

I worked round this problem by building the previous version of re2, but pyre2 should be updated to work with the latest version of re2.

axiak commented 12 years ago

Which version of pyre2 was this? I fixed it in Jul 15, not sure if I made another release for the fix though.

davekirby commented 12 years ago

I was trying to compile the latest released version on PyPi - 0.2.14.

I have now got the current version from github and it compiles with no problems.