From 6e90f2b479ed03f48e429bb7164fc7e9f402e1de Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 12 Jun 2014 22:10:27 +0200 Subject: Only move shared libraries to /lib if they exists In several Makemodule.am, there is a install-exec-hook- target whose role is to move the shared library from /usr/lib to /lib, while keeping a symbolic link /usr/lib/libuuid.so -> ../../lib/.so.. However, when util-linux is built with --enable-static --disable-shared (as is needed on noMMU platforms that don't support shared libraries), no .so is built, but the install-exec-hook-libuuid creates an invalid /usr/lib/.so symbolic link, pointing to ../../lib (yes, the directory). This causes troubles later one when other libraries/programs are compiled with -l, as gcc thinks a shared library is available because there's a file named /usr/lib/.so. Signed-off-by: Thomas Petazzoni --- libuuid/src/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libuuid') diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am index a20cb4ccb..a5fd561cf 100644 --- a/libuuid/src/Makemodule.am +++ b/libuuid/src/Makemodule.am @@ -44,7 +44,7 @@ EXTRA_DIST += libuuid/src/uuid.sym # move lib from $(usrlib_execdir) to $(libdir) if needed install-exec-hook-libuuid: - if test "$(usrlib_execdir)" != "$(libdir)"; then \ + if test "$(usrlib_execdir)" != "$(libdir)" -a -f "$(DESTDIR)$(usrlib_execdir)/libuuid.so"; then \ mkdir -p $(DESTDIR)$(libdir); \ mv $(DESTDIR)$(usrlib_execdir)/libuuid.so.* $(DESTDIR)$(libdir); \ so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libuuid.so); \ -- cgit v1.2.3-55-g7522