Summary: | ASTERISK-23315: Asterisk 12 rc1 doesn't compile on my raspberry | ||
Reporter: | Tom De Moor (tomdemoor) | Labels: | |
Date Opened: | 2014-02-15 09:59:14.000-0600 | Date Closed: | 2014-03-20 15:50:10 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Resources/res_pjsip |
Versions: | 12.0.0-alpha1 12.1.1 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Raspbian | Attachments: | |
Description: | I installed pjsip following the instructions as described in https://wiki.asterisk.org/wiki/display/AST/Installing+pjproject
The modules are there, the config scripts finds them as well. But the make gives following error: [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 full output of make command: http://pastebin.com/89F4z1yD the config.log file: http://pastebin.aquilenet.fr/?1034ac23b8e5bd2e#8n9Re8LGZYmKHkXFoywdqHRQVbgweisobXPfcec/Ccg= | ||
Comments: | By: Matt Jordan (mjordan) 2014-02-15 18:14:47.101-0600 Hi Tom - You need the latest version of {{pjproject}} from the github repo. If you update that, it should compile. By: Tom De Moor (tomdemoor) 2014-02-17 05:33:16.875-0600 Sorry Matt, i used the latest version. I removed the pjpproject (make uninstall) and downloaded the pjproject again from the github repo and compiled all again. But i still get the same error. Tom By: Walter Doekes (wdoekes) 2014-02-20 05:48:37.096-0600 Tom: double check /usr/include and /usr/local/include (and /usr/lib and /usr/local/lib), make uninstall may not have worked as intended. By: Tom De Moor (tomdemoor) 2014-02-20 07:29:54.266-0600 Removed all pjsip-files in /usr/include and in /usr/lib. Recompiled the pjproject Did a make clean for asterisk and then a make but still the same error By: Walter Doekes (wdoekes) 2014-02-20 07:40:16.949-0600 Make clean? You should reconfigure too. By: Tom De Moor (tomdemoor) 2014-03-05 13:10:10.838-0600 Sorry forgot to mention that i reconfigured. I ran make clean ./configure make menuselect make By: Rusty Newton (rnewton) 2014-03-06 12:43:56.712-0600 Deleted a duplicate comment. By: Rusty Newton (rnewton) 2014-03-06 13:07:20.032-0600 Tom, Your affects version field says you are using 12.0.0 alpha 1, and your summary says "12 rc1". Are you using 12.1.0-rc1 (if so, why not rc3?) or are you using the alpha? Additionally - just for kicks, you might try starting over from scratch and just emulating what Matt did here: http://matthewjordan.net/2013/09/02/asterisk-12-on-a-raspberry-pi/ since he got it working. By: Tom De Moor (tomdemoor) 2014-03-11 15:51:22.843-0500 I was using 12.1.0-rc1 but even with 12.1.1 I have the same bug. I followed all the steps like described in Matt Jordans blog. I I'll reinstall the raspberry from scratch and retry again By: Tom De Moor (tomdemoor) 2014-03-16 14:57:17.507-0500 I downloaded a brand new Raspbian and followed the steps described in Matts blog and I still got the same error while compiling. I used Asterisk 12.1.1 this time By: Walter Doekes (wdoekes) 2014-03-17 03:18:20.826-0500 Ok. So, that error should only occur when configure did not set {{HAVE_PJ_TRANSACTION_GRP_LOCK}}. And that in turn happens if configure did not find {{pjsip_tsx_create_uac2}} in {{.../include/pjsip/sip_transaction.h}}. Going back to your config.log, we see this: {noformat} configure:23669: checking for pjsip_tsx_create_uac2 in -lpjsip configure:23694: gcc -o conftest -g -O2 conftest.c -lpjsip -lm >&5 configure:23694: $? = 0 configure:23704: result: yes {noformat} So the check succeeds. However, continuing on, the second check: {noformat} ac_fn_c_check_header_mongrel "$LINENO" "pjsip.h" "ac_cv_header_pjsip_h" "$ac_includes_default" {noformat} yields this: {noformat} configure:23728: checking pjsip.h usability configure:23728: gcc -c -g -O2 conftest.c >&5 In file included from /usr/include/pj/types.h:33:0, from /usr/include/pjsip/sip_config.h:27, from /usr/include/pjsip/sip_types.h:34, from /usr/include/pjsip.h:24, from conftest.c:290: /usr/include/pj/config.h:243:6: error: #error Endianness must be declared for this processor In file included from /usr/include/pj/types.h:33:0, from /usr/include/pjsip/sip_config.h:27, from /usr/include/pjsip/sip_types.h:34, from /usr/include/pjsip.h:24, from conftest.c:290: /usr/include/pj/config.h:1161:4: error: #error "PJ_IS_LITTLE_ENDIAN is not defined!" /usr/include/pj/config.h:1165:4: error: #error "PJ_IS_BIG_ENDIAN is not defined!" configure:23728: $? = 1 {noformat} And alas, {{PJ_TRANSACTION_GRP_LOCK_HEADER_FOUND}} is set to {{0}} and finally, you get no {{HAVE_PJ_TRANSACTION_GRP_LOCK}}. Basically, the pjlibs fail to detect the endianness (which apparently they sort of hardcode) on your platform. Please take a look at {{/usr/include/pj/compat/m_auto.h}} and {{/usr/include/pj/config.h}}. For some reason the endianness goes undetected. In my case, {{config.h}} says: {noformat} #if defined(PJ_AUTOCONF) /* * Autoconf configured */ #include <pj/compat/m_auto.h> #elif defined (PJ_M_I386) || defined(_i386_) || defined(i_386_) || \ defined(_X86_) || defined(x86) || defined(__i386__) || \ defined(__i386) || defined(_M_IX86) || defined(__I86__) ... {noformat} and in {{m_auto.h}} it says: {noformat} /* Machine name, filled in by autoconf script */ #define PJ_M_NAME "x86_64" {noformat} I don't know off-hand what should be fixed on your platform, but it probably should work out that you're on little_endian. Can you tweak it, and rerun configure until you get this define right? {noformat} $ grep HAVE_PJ_TRANSACTION_GRP_LOCK include/asterisk/autoconfig.h #define HAVE_PJ_TRANSACTION_GRP_LOCK 1 {noformat} By: Tom De Moor (tomdemoor) 2014-03-17 09:39:44.085-0500 Ok, i was able to compile Asterisk! I replaced {noformat} #elif defined (PJ_M_ARMV4) || defined(ARM) || defined(_ARM_) || \ defined(ARMV4) || defined(__arm__) /* * ARM, bi-endian, so raise error if endianness is not configured */ # undef PJ_M_ARMV4 # define PJ_M_ARMV4 1 # define PJ_M_NAME "armv4" # define PJ_HAS_PENTIUM 0 # if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN # error Endianness must be declared for this processor # endif {noformat} with {noformat} #elif defined (PJ_M_ARMV4) || defined(ARM) || defined(_ARM_) || \ defined(ARMV4) || defined(__arm__) /* * ARM, bi-endian, so raise error if endianness is not configured */ # undef PJ_M_ARMV4 # define PJ_M_ARMV4 1 # define PJ_M_NAME "armv4" # define PJ_HAS_PENTIUM 0 # define PJ_IS_LITTLE_ENDIAN 1 # define PJ_IS_BIG_ENDIAN 0 {noformat} Then I ran ./configure again and I could successfully build Asterisk. Thanks Walter! I would never found that myself. By: Walter Doekes (wdoekes) 2014-03-18 03:08:11.175-0500 Good. So I guess this is a pjproject bug, but perhaps one we can work around until it is fixed upstream? A configure check that attempts to compile something without and with -DPJ_IS_LITTLE_ENDIAN=1 and -DPJ_IS_BIG_ENDIAN=0 perhaps? By: Walter Doekes (wdoekes) 2014-03-18 03:09:20.974-0500 (Or of course more detailed instructions on ./configure'ing pjproject? If it is possible to pass endian-flags there.) By: Rusty Newton (rnewton) 2014-03-19 15:19:34.086-0500 But why didn't this occur for Matt on his Pi ? Tom what options and flags did you pass to ./configure when configuring? By: Tom De Moor (tomdemoor) 2014-03-19 15:33:30.445-0500 For pjsip: {noformat} ./configure --prefix=/usr --enable-shared --disable-sound --disable-video --disable-resample {noformat} for Asterisk {noformat} ./configure {noformat} By: Rusty Newton (rnewton) 2014-03-20 15:49:38.646-0500 I've got nothing else. I added an issue and workaround here https://wiki.asterisk.org/wiki/display/AST/Installing+pjproject#Installingpjproject-IssuesandWorkarounds I'm closing this out since it is not occurring on other systems and a workaround is available. Anyone is welcome to contact Teluu about it or submit documentation to the wiki if you feel something is needed there. |