From a1a966a598eb3693463aa5b0153f37ba22cfee6d Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 4 Jan 2021 03:32:38 +0000 Subject: Building of Less program now uses patchelf to ensure good linking After correctly setting Less to depend on 'ncurses', I noticed its still not linking to Maneage's 'ncurses', but pointing to my host system's 'ncurses' (that happens to have the same version! So it would crash on a system with a different version). This shows that like some other software, we need to manually correct the RPATH inside Less. With this command, the necessary call to 'patchelf' has been added and with it, the installed 'less' command properly linked to Maneage's internal build of 'ncurses'. --- reproduce/software/make/basic.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 4e69a32..2a28e76 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -978,6 +978,9 @@ $(ibidir)/less-$(less-version): $(ibidir)/ncurses-$(ncurses-version) tarball=less-$(less-version).tar.gz $(call import-source, $(less-url), $(less-checksum)) $(call gbuild, less-$(less-version), static,,-j$(numthreads)) + if [ -f $(ibdir)/patchelf ]; then + $(ibdir)/patchelf --set-rpath $(ildir) $(ibdir)/less; + fi echo "Less $(less-version)" > $@ # On Mac OS, libtool does different things, so to avoid confusion, we'll -- cgit v1.2.1