release 2017-06-01
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-by: Paul Wankadia <>
1 file changed