[asterisk-bugs] [JIRA] (ASTERISK-23315) Asterisk 12 rc1 doesn't compile on my raspberry

Walter Doekes (JIRA) noreply at issues.asterisk.org
Mon Mar 17 03:19:18 CDT 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-23315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=216547#comment-216547 ] 

Walter Doekes commented on ASTERISK-23315:
------------------------------------------

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}

> Asterisk 12 rc1 doesn't compile on my raspberry
> -----------------------------------------------
>
>                 Key: ASTERISK-23315
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23315
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip
>    Affects Versions: 12.0.0-alpha1
>         Environment: Raspbian
>            Reporter: Tom De Moor
>            Assignee: Tom De Moor
>
> 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=



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list