[Asterisk-code-review] build: Execute ldconfig to build cache. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Feb 21 13:36:39 CST 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5044 )

Change subject: build: Execute ldconfig to build cache.
......................................................................


build: Execute ldconfig to build cache.

On some platforms a multiarch approach is used for libraries.
The build system does not take this into account and still
places libraries into the lib directory if no --libdir is
specified to configure. On initial startup this results in
libasteriskssl.so not being found, as it is not in the multiarch
lib directory.

This change does the minimally invasive thing and executes
ldconfig so that the libraries in the lib directory are found
and their location cached. By doing so Asterisk starts up fine.

If DESTDIR is specified, however, the old logic is executed as
the install process may not have permission to alter the ldconfig
cache.

ASTERISK-26705

Change-Id: If4eca46ac510c6fea5568256280ffdb3888d7bb4
---
M main/Makefile
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified



diff --git a/main/Makefile b/main/Makefile
index 4d1b2c4..3c371c6 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -355,7 +355,11 @@
 endif
 endif
 ifneq ($(LDCONFIG),)
+ifneq ($(DESTDIR),)
 	$(LDCONFIG) $(LDCONFIG_FLAGS) "$(DESTDIR)$(ASTLIBDIR)/"
+else
+	$(LDCONFIG)
+endif
 endif
 	$(LN) -sf asterisk "$(DESTDIR)$(ASTSBINDIR)/rasterisk"
 
@@ -373,7 +377,11 @@
 	rm -f "$(DESTDIR)$(ASTLIBDIR)/$(ASTPJ_LIB)"
 endif
 ifneq ($(LDCONFIG),)
+ifneq ($(DESTDIR),)
 	$(LDCONFIG) $(LDCONFIG_FLAGS) "$(DESTDIR)$(ASTLIBDIR)/"
+else
+	$(LDCONFIG)
+endif
 endif
 
 clean::

-- 
To view, visit https://gerrit.asterisk.org/5044
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If4eca46ac510c6fea5568256280ffdb3888d7bb4
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list