kokizzu / re2

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

build failure: Mac OS X before 10.9 #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Commit https://code.google.com/p/re2/source/detail?r=975db9909185 made a change 
to the symbols list on Darwin in order to fix an issue preventing re2 from 
compiling on Mac OS X 10.9, which defaults to the libc++ C++ stdlib. Since the 
new symbol that was replaced only occurs in libc++, this has the effect of 
breaking re2 on older versions of OS X by default and on any non-clang compiler 
on 10.9.

Original issue reported on code.google.com by mistyde...@gmail.com on 13 Jan 2014 at 4:46

GoogleCodeExporter commented 9 years ago
Can you suggest a fix that will keep both working?

I am epsilon away from deleting the symbols list entirely. It is nothing but 
trouble.

Original comment by rsc@golang.org on 13 Jan 2014 at 5:26

GoogleCodeExporter commented 9 years ago
Deleting the symbols list sounds like a good solution. ;)

If you keep it, I'd suggest maintaining a symbols list for each C++ standard 
library you encounter/support: for example, one for libstdc++, one for libc++, 
one for Microsoft's compiler (if supported), etc. Mangled symbol names are 
going to be different for any C++ stdlib that isn't 100% ABI compatible.

Original comment by mistyde...@gmail.com on 13 Jan 2014 at 5:29

GoogleCodeExporter commented 9 years ago

Original comment by rsc@golang.org on 13 Jan 2014 at 6:03

GoogleCodeExporter commented 9 years ago
Any update on this bug? MacPorts is having a problem with it, reported here: 
https://trac.macports.org/ticket/42200

Original comment by sean.mic...@gmail.com on 27 Jan 2014 at 6:48

GoogleCodeExporter commented 9 years ago
If someone can tell me a fix that is not "delete the symbols list entirely" I 
will do that.

Original comment by rsc@golang.org on 10 Feb 2014 at 3:46

GoogleCodeExporter commented 9 years ago
I'd suggest adjusting your symbols list to be per C++ standard library instead 
of per OS. If you have separate ones for libstdc++ and libc++ that are selected 
appropriately, then you could use both.

Original comment by mistyde...@gmail.com on 10 Feb 2014 at 7:46

GoogleCodeExporter commented 9 years ago
I am willing to add or remove lines from libre2.symbols.darwin. I do not
want to rearchitect the whole shared library symbol mess.

Original comment by rsc@golang.org on 10 Feb 2014 at 8:32

GoogleCodeExporter commented 9 years ago
I don't know if there is a change you can make to that one file that will make 
it work. The two C++ standard libraries aren't fully ABI compatible and the one 
symbol just doesn't match up between the two. 

The issue is operator<<(std::ostream&, re2::StringPiece const&) specifically, 
which is operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> 
>&, re2::StringPiece const&) under libc++.

Original comment by mistyde...@gmail.com on 10 Feb 2014 at 8:51

GoogleCodeExporter commented 9 years ago
Maybe put the entry for both, with a '*' at the end to suppress errors? It 
could end up exporting extra stuff though, or fail to error out if neither is 
present, but not as badly as removing the lists entirely.

Original comment by docfara...@gmail.com on 3 May 2014 at 3:03

GoogleCodeExporter commented 9 years ago
You could provide separate libre2.symbols.darwin for libstdc++ and libc++. I 
hit the same issue as it's being compiled with GCC 4.9.1/libstdc++, not system 
LLVM/Clang compiler and libc++.

Original comment by David.Ab...@gmail.com on 29 Oct 2014 at 12:14

GoogleCodeExporter commented 9 years ago
RE2 has moved to GitHub. I have not moved the issues over. If this issue is 
still important to you, please file a new one at 
https://github.com/google/re2/issues. Thank you.

Original comment by rsc@golang.org on 11 Dec 2014 at 4:45