[asterisk-bugs] [JIRA] (ASTERISK-22559) gcc 4.7 supports weakref attribute but asterisk doesn't detect it.

ibercom (JIRA) noreply at issues.asterisk.org
Wed Apr 8 14:13:33 CDT 2015


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

ibercom commented on ASTERISK-22559:
------------------------------------

GCC 4.7 Manual:
http://gcc.gnu.org/onlinedocs/gcc-4.7.4/gcc/Function-Attributes.html

Here you can read:
weakref ("target")
{code}
static int x() __attribute__ ((weakref ("y")));
{code}
A weak reference is an alias that does not by itself require a definition to be given for the target symbol.

Hence the error in config.log:
{code}
configure:16034: checking for compiler 'attribute weakref' support
configure:16080: gcc -c -g -O2 -Wall -Wno-unused -Werror  conftest.c >&5
conftest.c:215:46: error: 'weakref' attribute ignored because function is defined [-Werror=attributes]
{code}

To test weakref attribute you only need this function:
{code}
static void __attribute__((weakref("foo"))) *test(void *muffin, ...) ;
{code}
and not:
{code}
static void __attribute__((weakref("foo"))) *test(void *muffin, ...) {return (void *) 0;}
{code}


> gcc 4.7 supports weakref attribute but asterisk doesn't detect it.
> ------------------------------------------------------------------
>
>                 Key: ASTERISK-22559
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22559
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/General
>    Affects Versions: 1.8.23.0, 11.17.0
>         Environment: Debian Wheezy
>            Reporter: ibercom
>            Assignee: ibercom
>         Attachments: config.log, config.log, make.log, menuselect.makeopts
>
>
> Server running Debian Squeeze and Asterisk 1.8.23. After server upgrading from Debian 6 to Debian 7 with the same configuration asterisk don't load app_voicemail.so and chan_dahdi.so
> Asterisk compiles fine, make menuselect without res_adsi and res_smdi. The modules don't exist.
> Asterisk logs when start:
> [Sep 19 15:17:08] WARNING[7490] loader.c: Error loading module 'res_adsi': /usr/lib/asterisk/modules/res_adsi.so: cannot open shared object file: No such file or directory
> [Sep 19 15:17:08] WARNING[7490] loader.c: Module 'res_adsi' could not be loaded.
> [Sep 19 15:17:08] WARNING[7490] loader.c: Error loading module 'res_smdi': /usr/lib/asterisk/modules/res_smdi.so: cannot open shared object file: No such file or directory
> [Sep 19 15:17:08] WARNING[7490] loader.c: Module 'res_smdi' could not be loaded.
> [Sep 19 15:17:08] WARNING[7490] loader.c: Error loading module 'app_voicemail.so': /usr/lib/asterisk/modules/app_voicemail.so: undefined symbol: ast_smdi_mwi_set
> [Sep 19 15:17:08] WARNING[7490] loader.c: Module 'app_voicemail.so' could not be loaded.
> [Sep 19 15:17:08] WARNING[7490] loader.c: Error loading module 'res_smdi': /usr/lib/asterisk/modules/res_smdi.so: cannot open shared object file: No such file or directory
> [Sep 19 15:17:08] WARNING[7490] loader.c: Module 'res_smdi' could not be loaded.
> [Sep 19 15:17:08] WARNING[7490] loader.c: Error loading module 'chan_dahdi.so': /usr/lib/asterisk/modules/chan_dahdi.so: undefined symbol: ast_smdi_interface_unref
> [Sep 19 15:17:08] WARNING[7490] loader.c: Module 'chan_dahdi.so' could not be loaded.
> [Sep 19 15:17:08] WARNING[7490] loader.c: Error loading module 'res_adsi': /usr/lib/asterisk/modules/res_adsi.so: cannot open shared object file: No such file or directory
> [Sep 19 15:17:08] WARNING[7490] loader.c: Module 'res_adsi' could not be loaded.



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



More information about the asterisk-bugs mailing list