Skip to content
Snippets Groups Projects
Commit 28c8e4f5 authored by Joshua Colp's avatar Joshua Colp
Browse files

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
parent 50e98411
No related branches found
No related tags found
No related merge requests found
......@@ -355,7 +355,11 @@ else # Darwin
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 @@ ifneq ($(ASTPJ_LIB).$(ASTPJ_SO_VERSION),.)
rm -f "$(DESTDIR)$(ASTLIBDIR)/$(ASTPJ_LIB)"
endif
ifneq ($(LDCONFIG),)
ifneq ($(DESTDIR),)
$(LDCONFIG) $(LDCONFIG_FLAGS) "$(DESTDIR)$(ASTLIBDIR)/"
else
$(LDCONFIG)
endif
endif
clean::
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment