zeusdeux / re2

Automatically exported from code.google.com/p/re2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

OS X: FilteredRE2 missing symbols #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Apply diff to testinstall.cc
2. make testinstall

What is the expected output? What do you see instead?

Would expect testinstall.cc to be successfully linked, instead:

$ make testinstall
cp testinstall.cc obj
(cd obj && g++ -I/usr/local/include -L/usr/local/lib testinstall.cc -lre2 
-pthread -o testinstall)
Undefined symbols for architecture x86_64:
  "re2::FilteredRE2::FirstMatch(re2::StringPiece const&, std::vector<int, std::allocator<int> > const&) const", referenced from:
      _main in ccfl5rQO.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [testinstall] Error 1

What version of the product are you using? On what operating system?

latest commit on OS X 10.7.3

Cheers,
Donovan.

Original issue reported on code.google.com by DonovanH...@gmail.com on 6 Mar 2012 at 2:31

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,
was a simple case of adding:

__ZNK3re211FilteredRE2*

to libre2.symbols.darwin

Also noticed that it is an uncaught error (resulting in a a segmentation fault 
on an empty atom_index_to_id_ in prefilter_tree.cc:296) to only add one regex 
to a FilteredRE2 instance and then run Compile followed by FirstMatch. Maybe 
there should be a guard in FilteredRE2::Compile or 
PrefilterTree::AssignUniqueIds?

Original comment by DonovanH...@gmail.com on 7 Mar 2012 at 6:51

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

turns out the symbols are incomplete for Linux as well. I've updated the patch 
here:

https://github.com/mediastandardstrust/superfastmatch/commit/b768099460d3274ab35
70c3889f2cda501835282

Is there any chance you could include the fix? If you want me to go through the 
code review route I can, although it is fairly straight forwards .

Cheers,
Donovan.

Original comment by DonovanH...@gmail.com on 19 Mar 2012 at 8:36

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 975db9909185.

Original comment by rsc@swtch.com on 10 Jan 2014 at 1:49