mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
Fix parallel make for res_asterisk_rtp.
Fixes a build regression introduced in r369517 "Add support for ICE/STUN/TURN in res_rtp_asterisk and chan_sip." [1]. [1] http://svnview.digium.com/svn/asterisk?view=revision&revision=369517 When compiling asterisk in parallel like: $ make -j 10 It's possible to get errors like the following: .pjlib-util-test-x86_64-unknown-linux-gnu.depend:120: *** missing separator. Stop. make[4]: *** [depend] Error 2 make[3]: *** [dep] Error 1 make[2]: *** [/home/sruffell/asterisk-working/res/pjproject/pjnath/lib/libpjnath-x86_64-unknown-linux-gnu.a] Error 2 make[3]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. This is because the build system is trying to build each of the libraries in pjproject in parallel. Now the build will build pjproject in a single job and link the results into res_asterisk_rtp. Parallel builds, on one test system, saves ~1.5 minutes from a default Asterisk build: Single job: $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make >/dev/null 2>&1 ) real 2m34.529s user 1m41.810s sys 0m15.970s Parallel make: $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make -j10 >/dev/null 2>&1 ) real 1m2.353s user 2m39.120s sys 0m18.850s (closes issue ASTERISK-20362) Reported by: Shaun Ruffel Patches: 0001-res_asterisk_rtp-Fix-build-error-when-using-parallel.patch uploaded by Shaun Ruffel (License #5417) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
13
res/Makefile
13
res/Makefile
@@ -67,17 +67,22 @@ endif
|
||||
ael/pval.o: ael/pval.c
|
||||
|
||||
clean::
|
||||
$(MAKE) -C pjproject realclean
|
||||
rm -f snmp/*.o snmp/*.i ael/*.o ael/*.i ais/*.o ais/*.i
|
||||
|
||||
pjproject/build.mak:
|
||||
cd pjproject && ./configure AR="" CFLAGS=-fPIC --disable-floating-point --disable-sound --disable-oss --disable-speex-aec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-g711-codec
|
||||
|
||||
.PHONY : pjproject
|
||||
pjproject: pjproject/build.mak
|
||||
# Make sure we always build pjproject with a single job.
|
||||
$(MAKE) -j1 -C pjproject dep
|
||||
$(MAKE) -j1 -C pjproject
|
||||
|
||||
include pjproject/build.mak
|
||||
|
||||
res_rtp_asterisk.o: pjproject/build.mak $(PJ_LIB_FILES)
|
||||
$(PJ_LIB_FILES): pjproject
|
||||
res_rtp_asterisk.o: $(PJ_LIB_FILES)
|
||||
res_rtp_asterisk.o: _ASTCFLAGS+=$(PJ_CFLAGS)
|
||||
res_rtp_asterisk.so: _ASTLDFLAGS+=$(PJ_LDFLAGS)
|
||||
res_rtp_asterisk.so: LIBS+=$(PJ_LDLIBS)
|
||||
|
||||
$(PJ_LIB_FILES):
|
||||
cd pjproject && make dep && make
|
||||
|
||||
Reference in New Issue
Block a user