Skip to contentSkip to conversation

(resent) multipath-tools: Fix parallel make issues

PATCH New Lars Wendler 1 participant 1 message May 11, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 (resent) multipath-tools: Fix parallel make issues

build is broken like this (tested with -j16):

x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -shared -lpthread -ldevmapper -ldl -L../libmultipath -lmultipath -L../libmpathcmd -lmpathcmd -Wl,-soname=libmpathpersist.so.0 -o libmpathpersist.so.0 mpath_persist.o mpath_updatepr.o mpath_pr_ioctl.o building defaults.o because of defaults.c
...
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmultipath
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:17: libmpathpersist.so.0] Error 1
make: *** [Makefile:29: libmpathpersist] Error 2
make: *** Waiting for unfinished jobs....

install is broken like this:

install -m 755 libprio*.so /var/tmp/portage/sys-fs/multipath-tools-0.8.4/image/lib64/multipath
install -m 755 libcheckcciss_tur.so libcheckreadsector0.so libchecktur.so libcheckdirectio.so libcheckemc_clariion.so libcheckhp_sw.so libcheckrdac.so /var/tmp/portage/sys-fs/multipath-tools-0.8.4/image/lib64/multipath
...
/usr/bin/install: target '/var/tmp/portage/sys-fs/multipath-tools-0.8.4/image/lib64/multipath' is not a directory
/usr/bin/install: target '/var/tmp/portage/sys-fs/multipath-tools-0.8.4/image/lib64/multipath' is not a directory
make[1]: *** [Makefile:28: install] Error 1
make[1]: *** [Makefile:38: install] Error 1

---
 Makefile                           | 3 ++-
 libmultipath/checkers/Makefile     | 1 +
 libmultipath/foreign/Makefile      | 1 +
 libmultipath/prioritizers/Makefile | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)
Makefile +2 -1
index 1dee3680..a9ade94f 100644
@@ -29,7 +29,8 @@ $(BUILDDIRS):
 	$(MAKE) -C $@
 
 multipath multipathd mpathpersist: libmultipath
-mpathpersist:  libmpathpersist
+libmpathpersist: libmultipath
+mpathpersist:  libmultipath libmpathpersist
 
 $(BUILDDIRS.clean):
 	$(MAKE) -C ${@:.clean=} clean
libmultipath/checkers/Makefile +1 -0
index 02caea64..f201ca4c 100644
@@ -24,6 +24,7 @@ libcheck%.so: libsg.o %.o
 	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^
 
 install:
+	$(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir)
 	$(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(libdir)
 
 uninstall:
libmultipath/foreign/Makefile +1 -0
index fae58a0d..567deebd 100644
@@ -14,6 +14,7 @@ libforeign-%.so: %.o
 	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^
 
 install:
+	$(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir)
 	$(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(libdir)
 
 uninstall:
libmultipath/prioritizers/Makefile +1 -0
index 9d0fe03c..b0b0b522 100644
@@ -35,6 +35,7 @@ libprio%.so: %.o
 	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^
 
 install: $(LIBS)
+	$(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir)
 	$(INSTALL_PROGRAM) -m 755 libprio*.so $(DESTDIR)$(libdir)
 
 uninstall:
Signature · 1 line
2.26.2