Skip to content

First draft of installing vendor libs with module

Simon Rose requested to merge vlibs into master

The goal of this MR is to have the vendor libraries installed with the actual modules.

There may have been historical reasons to install them separately in siteLibs/vendor, but this has proven to be problematic for a few reasons:

  1. Vendor libraries cannot depend on the architecture, which can only work if the module only is valid for one architecture
  2. Vendor libraries cannot be installed locally for testing purposes

The aim is to replace the module-by-module defined vlibs target with globally installing them as part of the install process. This will address both of the points above: since it runs as part of the install process, we have access to $(T_A) and can specify different libraries per architecture. Similarly cellinstall will now pick up these libraries and install them accordingly.

Where we have to be a bit careful is that this is replacing custom install scripts with global installs. However, this should not be too large of an issue: the standard install script is one of the following two:

$(VENDOR_LIBS):
	$(QUIET) patchelf --set-rpath "\$$ORIGIN" $@
	$(QUIET) $(SUDO) install -m 755 -d $(E3_MODULES_VENDOR_LIBS_LOCATION)/
	$(QUIET) $(SUDO) install -m 555 $@ $(E3_MODULES_VENDOR_LIBS_LOCATION)/

or

$(VENDOR_LIBS):
	$(QUIET) $(SUDO) install -m 755 -d $(E3_MODULES_VENDOR_LIBS_LOCATION)/
	$(QUIET) $(SUDO) install -m 555 $@ $(E3_MODULES_VENDOR_LIBS_LOCATION)/

The install lines can be easily replaced, and the patchelf command may not be necessary. More testing will need to be done with the modules that have vendor libraries to ensure that they work correctly.

Edited by Simon Rose

Merge request reports