[Libreoffice-commits] .: extension libs should have no RPATH

Stephan Bergmann sbergman at redhat.com
Fri Apr 20 00:53:22 PDT 2012


On 04/19/2012 07:34 PM, David Tardon wrote:
> commit 9da0670b601c8c186b0bfbd28ea055016db376ad
> Author: David Tardon<dtardon at redhat.com>
> Date:   Thu Apr 19 19:27:19 2012 +0200
>
>      extension libs should have no RPATH
>
>      At least that is how it seems to work in the old build system:
>      LINFLAGSRUNPATH_OXT in solenv/inc/unxmacx.mk is empty, just like for
>      other platforms . On the other side, macosx-change-install-names.pl only
>      lists OXT in combination with URELIB... Now choose :-)
>
> diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
> index 2ab1336..ab955cf 100644
> --- a/solenv/gbuild/platform/macosx.mk
> +++ b/solenv/gbuild/platform/macosx.mk
> @@ -162,8 +162,7 @@ gb_LinkTarget__RPATHS := \
>
>   # $(call gb_LinkTarget__get_installname,libfilename,soversion,layerprefix)
>   define gb_LinkTarget__get_installname
> -$(if $(3),-install_name '$(3)$(1)$(if $(2),.$(2))',
> -	$(call gb_Output_error,cannot determine -install_name for $(3)))
> +$(if $(3),-install_name '$(3)$(1)$(if $(2),.$(2))')
>   endef

On Mac OS X, LINKFLAGSRUNPATH_xxx is a misnomer.  It does not specify 
any RPATH, but rather a special install name token (those 
"@___...___xxx") that is in turn used by 
solenv/bin/macosx-changes-install-names.pl to determine how other 
libraries and executables reference the given library (and thus is only 
needed for libraries that others can link against).

We apparently have no cases where libraries within one oxt extension 
link against each other, so OXT libraries (at least until now) do not 
need such a special install name token.

(For the record, a related topic is how libraries within oxt extensions 
link against other libraries.  They can legitimately only link against 
published URE libs or against other libs within the same extension, 
where the latter apparently does not happen.  For URE libs, the way this 
is achieved is different on the different platforms:  On Linux, we 
guarantee that the URE libs are already available in the process, so the 
extension lib can mention them as DT_NEEDED without having an RPATH 
through which they could be found.  On Mac OS X, we guarantee that there 
is a symlink urelibs next to the executalbe, so the extension lib can 
reference them via @executable_path/urelibs.  And on Windows, we 
guarantee that the URE libs are available on PATH, anyway.)

Stephan


More information about the LibreOffice mailing list