Asterisk 12.4 fails to compile on BeagleBoneBlack - Fixed!

I am trying to compile Asterisk 12.4 on a BeagleBone Black running “Linux arm 3.8.13-bone56 #1 SMP Wed Jun 4 23:59:23 UTC 2014 armv71 GNU/Linux” Debian version 7.6. It fails near the end with

[CC] res_pjsip/pjsip_distributor.c -> res_pjsip/pjsip_distributor.o
res_pjsip/pjsip_distributor.c: In function ‘find_dialog’:
res_pjsip/pjsip_distributor.c:141:21: error: ‘pjsip_transaction’ has no member named ‘mutex’
make[1]: *** [res_pjsip/pjsip_distributor.o] Error 1
make: *** [res] Error 2

Tried 4 times. Found another note on the web about this same error but it was never resolved that I could see. http://forums.asterisk.org/viewtopic.php?f=1&t=88735 Maybe something going on with pjsip but I tried both the official “git” version and the one from the pjsip web site v2.2.1.

Funny thing is the same tar files compiled fine on my x86 machine Running Debian 7.5.

Edited July 21 Discovered the configure file for asterisk has a bug. It checks for tsx_create and the test passed. But HAVE_PJ_TRANSACTION_GRP_LOCK does not get set so when asterisk make is run the compile fails. I had to manually edit autoconfig.h and make sure the define was in there. Once I did that it compiled just fine.

Also, there are bugs in the rc.debian.asterisk file. If you want asterisk to run on start up you must edit it and place the correct path[s] for DAEMON=, ASTVARRUNDIR= , and ASTETCDIR=

Hope Digium will see this and correct the files right away.

I find it odd that this problem still exists, 17 months later.
I just hit the same problem when installing on the current Raspbian.