Paul Wankadia uploaded patch set #2 to the change originally created by Kyle Gorman.
Uses straightforward SO install name on Darwin.
When building for Darwin, the SO generated is given the install_name
"@rpath/libre2". Other SOs will as a result be unable to dlopen this.
(I haven't figured out exactly which circumstances this occurs, though
it appears to be a widespread problem---see below.) The obvious thing
to do is to give it traditional install_name, which is $(libdir)/libre2.
Homebrew, the package manager for Mac OS X, in fact incorporates a patch
of sorts to fix exactly this problem: after running "make install" with
the provided Makefile, it uses the obscure "install_name_tool" to repair
the install_name to exactly this. I have confirmed this is necessary to
dlopen libre2 on El Capitan.
(NB: This commit makes the Homebrew patch otiose.)
Change-Id: Ia5835dbaa591a66a4698a64b0b8b02c64e145de0
---
0 files changed, 0 insertions(+), 0 deletions(-)
To view, visit change 4250. To unsubscribe, visit settings.
Paul Wankadia uploaded patch set #4 to the change originally created by Kyle Gorman.
Uses straightforward SO install name on Darwin.
When building for Darwin, the SO generated is given the install_name
"@rpath/libre2". Other SOs will as a result be unable to dlopen this.
(I haven't figured out exactly which circumstances this occurs, though
it appears to be a widespread problem---see below.) The obvious thing
to do is to give it traditional install_name, which is $(libdir)/libre2.
Homebrew, the package manager for Mac OS X, in fact incorporates a patch
of sorts to fix exactly this problem: after running "make install" with
the provided Makefile, it uses the obscure "install_name_tool" to repair
the install_name to exactly this. I have confirmed this is necessary to
dlopen libre2 on El Capitan.
(NB: This commit makes the Homebrew patch otiose.)
Change-Id: Ia5835dbaa591a66a4698a64b0b8b02c64e145de0
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)
To view, visit change 4250. To unsubscribe, visit settings.
Paul Wankadia posted comments on this change.
Patch set 4:Code-Review +2
Currently, Homebrew's RE2 formula (https://github.com/Homebrew/homebrew-core/blob/master/Formula/re2.rb) is doing this:
MachO::Tools.change_dylib_id("#{lib}/libre2.0.0.0.dylib", "#{lib}/libre2.0.dylib")Under the assumption that doing that will keep Homebrew working (i.e. Cellar and all) regardless of the install name that the RE2 build assigns, I'm going to change said install name. I honestly don't understand why the install name has a directory when the soname (on other platforms) does not, but this is apparently not working for all macOS users, so if the RE2 build does something that works out of the box and Homebrew does something further and everyone is happy, then that's great. (But if this does break someone, then we really do need to understand *why*...)
Paul Wankadia merged this change.
Uses straightforward SO install name on Darwin.
When building for Darwin, the SO generated is given the install_name
"@rpath/libre2". Other SOs will as a result be unable to dlopen this.
(I haven't figured out exactly which circumstances this occurs, though
it appears to be a widespread problem---see below.) The obvious thing
to do is to give it traditional install_name, which is $(libdir)/libre2.
Homebrew, the package manager for Mac OS X, in fact incorporates a patch
of sorts to fix exactly this problem: after running "make install" with
the provided Makefile, it uses the obscure "install_name_tool" to repair
the install_name to exactly this. I have confirmed this is necessary to
dlopen libre2 on El Capitan.
(NB: This commit makes the Homebrew patch otiose.)
Change-Id: Ia5835dbaa591a66a4698a64b0b8b02c64e145de0
Reviewed-on: https://code-review.googlesource.com/4250
Reviewed-by: Paul Wankadia <jun...@google.com>
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 645b364..1c04cb9 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@
SOEXT=dylib
SOEXTVER=$(SONAME).$(SOEXT)
SOEXTVER00=$(SONAME).0.0.$(SOEXT)
-MAKE_SHARED_LIBRARY=$(CXX) -dynamiclib -Wl,-install_name,@rpath/libre2.$(SOEXTVER),-exported_symbols_list,libre2.symbols.darwin $(RE2_LDFLAGS) $(LDFLAGS)
+MAKE_SHARED_LIBRARY=$(CXX) -dynamiclib -Wl,-install_name,$(libdir)/libre2.$(SOEXTVER),-exported_symbols_list,libre2.symbols.darwin $(RE2_LDFLAGS) $(LDFLAGS)
else ifeq ($(shell uname),SunOS)
SOEXT=so
SOEXTVER=$(SOEXT).$(SONAME)
To view, visit change 4250. To unsubscribe, visit settings.