[pjsip] [PATCH] Fix dependencies when running parallel make.
Shaun Ruffell
sruffell at digium.com
Wed Dec 12 12:36:20 EST 2012
On Thu, Sep 06, 2012 at 09:02:39AM -0500, Shaun Ruffell wrote:
> From: Shaun Ruffell <sruffell at digium.com>
>
> pjlib-util, pjlib, pjmedia, pjnath, and pjsip test targets do not
> specify the library under test as a dependency. This results in
> failed builds when building both lib* and lib*-test targets in a
> parallel make.
>
> Before this change:
> $ make -j10 all >/dev/null
> gcc: ../lib/libpjlib-util-x86_64-unknown-linux-gnu.a: No such file or directory
> make[2]: *** [../bin/pjlib-util-test-x86_64-unknown-linux-gnu] Error 1
> make[1]: *** [pjlib-util-test] Error 2
> make[1]: *** Waiting for unfinished jobs....
> ar: creating ../lib/libpjlib-util-x86_64-unknown-linux-gnu.a
> make: *** [all] Error 1
> ---
>
> Hi,
>
> I figured this was relatively minor and didn't require any
> contribution agreement. If I'm wrong, I apologize.
>
> I ran into this originally when building Asterisk 11 in parallel.
>
> https://issues.asterisk.org/jira/browse/ASTERISK-20362
>
> Cheers,
> Shaun
>
> pjlib-util/build/Makefile | 2 +-
> pjlib/build/Makefile | 2 +-
> pjmedia/build/Makefile | 4 +++-
> pjnath/build/Makefile | 2 ++
> pjsip/build/Makefile | 2 +-
> 5 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/pjlib-util/build/Makefile b/pjlib-util/build/Makefile
> index fba93bb..d2ad65a 100644
> --- a/pjlib-util/build/Makefile
> +++ b/pjlib-util/build/Makefile
> @@ -74,7 +74,7 @@ distclean: realclean
> pjlib-util:
> $(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $(PJLIB_UTIL_LIB)
>
> -pjlib-util-test:
> +pjlib-util-test: pjlib-util
> $(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $(UTIL_TEST_EXE)
>
> .PHONY: ../lib/pjlib-util.ko
> diff --git a/pjlib/build/Makefile b/pjlib/build/Makefile
> index 9183644..a36f5f4 100644
> --- a/pjlib/build/Makefile
> +++ b/pjlib/build/Makefile
> @@ -87,7 +87,7 @@ pjlib: ../include/pj/config_site.h
> ../include/pj/config_site.h:
> touch ../include/pj/config_site.h
>
> -pjlib-test:
> +pjlib-test: pjlib
> $(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test $(TEST_EXE)
>
> .PHONY: ../lib/pjlib.ko
> diff --git a/pjmedia/build/Makefile b/pjmedia/build/Makefile
> index 2f97296..19e03a1 100644
> --- a/pjmedia/build/Makefile
> +++ b/pjmedia/build/Makefile
> @@ -173,7 +173,9 @@ pjmedia-audiodev:
> pjsdp:
> $(MAKE) -f $(RULES_MAK) APP=PJSDP app=pjsdp $(PJSDP_LIB)
>
> -pjmedia-test: $(PJMEDIA_LIB)
> +$(PJMEDIA_LIB) : pjmedia
> +
> +pjmedia-test: $(PJMEDIA_LIB) pjmedia
> $(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $(PJMEDIA_TEST_EXE)
>
> .PHONY: ../lib/pjmedia.ko
> diff --git a/pjnath/build/Makefile b/pjnath/build/Makefile
> index 573d957..d985c61 100644
> --- a/pjnath/build/Makefile
> +++ b/pjnath/build/Makefile
> @@ -97,6 +97,8 @@ distclean: realclean
> pjnath:
> $(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $(PJNATH_LIB)
>
> +$(PJNATH_LIB): pjnath
> +
> pjnath-test: $(PJLIB_LIB) $(PJLIB_UTIL_LIB) $(PJNATH_LIB)
> $(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $(PJNATH_TEST_EXE)
>
> diff --git a/pjsip/build/Makefile b/pjsip/build/Makefile
> index 2605be0..0f8fd13 100644
> --- a/pjsip/build/Makefile
> +++ b/pjsip/build/Makefile
> @@ -138,7 +138,7 @@ pjsip-simple:
> pjsua-lib:
> $(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $(PJSUA_LIB_LIB)
>
> -pjsip-test:
> +pjsip-test: pjsip
> $(MAKE) -f $(RULES_MAK) APP=TEST app=pjsip-test $(TEST_EXE)
>
> .PHONY: ../lib/pjsip.ko
> --
> 1.7.11.2
Bump.. it appears that this is still an issue. Anyone have any
suggestions how this change might incorporated into the source? I'm
unsure what the process is here.
Thanks,
Shaun
--
Shaun Ruffell
Digium, Inc. | Linux Kernel Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org
More information about the pjsip
mailing list