Parallel build issue: error: cannot find the library 'libmschmd.la' or unhandled argument 'libmschmd.la'
Whissi opened this issue · 3 comments
Whissi commented
When compiling with make -j 4
or larger you sometimes hit a parallel make issue:
libtool: link: x86_64-pc-linux-gnu-ar cru .libs/libmscabd.a mspack/.libs/system.o mspack/.libs/cabd.o mspack/.libs/lzxd>
libtool: error: cannot find the library 'libmschmd.la' or unhandled argument 'libmschmd.la'
libtool: link: x86_64-pc-linux-gnu-ranlib .libs/libmschmd.a
make[1]: *** [Makefile:836: test/chmd_test] Error 1
Doesn't happen with "-j1".
kyz commented
Thanks for bringing it up. automake should generate parallel-safe Makefiles by default.
I think the issue is specifically with chmd_test, it is the only one with a _DEPENDENCIES setting, and I think that there's an implicit dependency on sources that gets lost when adding an explicit _DEPENDENCIES. I found that adding libmschmd.la to test_chmd_test_DEPENDENCIES fixes the issue. Could you confirm?
-test_chmd_test_DEPENDENCIES = test/test_files/chmd/cve-2015-4467-reset-interval-zero.chm
+test_chmd_test_DEPENDENCIES = libmschmd.la test/test_files/chmd/cve-2015-4467-reset-interval-zero.chm
Whissi commented
Yes, I can confirm that with this change I can build with make -j5
.