[Home]

Summary:ASTERISK-27858: Cannot build static with chan_mgcp, chan_phone
Reporter:Pablo Catalina (xkill)Labels:pjsip
Date Opened:2018-05-16 05:03:44Date Closed:2018-07-25 06:11:43
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2 Channels/chan_mgcp Channels/chan_phone Channels/chan_pjsip Channels/General
Versions:15.4.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian Jessie (armel)Attachments:
Description:Compiling asterisk on armel (debian jessie) with LOW MEM and STATIC enabled:

{code}
  [CC] chan_mgcp.c -> chan_mgcp.o
  [LD] chan_mgcp.o -> chan_mgcp.so
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/4.9/../../../arm-linux-gnueabi/libc.a(dl-tsd.o)(.text+0x18): R_ARM_TLS_LE32 relocation not permitted in shared object
/usr/lib/gcc/arm-linux-gnueabi/4.9/../../../arm-linux-gnueabi/libc.a(dl-tsd.o): In function `_dl_initial_error_catch_tsd':
(.text+0x18): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
/root/asterisk-15.4.0/Makefile.rules:176: recipe for target 'chan_mgcp.so' failed
make[1]: *** [chan_mgcp.so] Error 1
Makefile:386: recipe for target 'channels' failed
make: *** [channels] Error 2
{code}

{code}
  [CC] chan_phone.c -> chan_phone.o
  [LD] chan_phone.o -> chan_phone.so
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/4.9/../../../arm-linux-gnueabi/libc.a(dl-tsd.o)(.text+0x18): R_ARM_TLS_LE32 relocation not permitted in shared object
/usr/lib/gcc/arm-linux-gnueabi/4.9/../../../arm-linux-gnueabi/libc.a(dl-tsd.o): In function `_dl_initial_error_catch_tsd':
(.text+0x18): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
/root/asterisk-15.4.0/Makefile.rules:176: recipe for target 'chan_phone.so' failed
make[1]: *** [chan_phone.so] Error 1
Makefile:386: recipe for target 'channels' failed
make: *** [channels] Error 2
{code}

{code}
  [CC] chan_iax2.c -> chan_iax2.o
  [CC] iax2/parser.c -> iax2/parser.o
  [CC] iax2/firmware.c -> iax2/firmware.o
  [CC] iax2/provision.c -> iax2/provision.o
  [CC] iax2/codec_pref.c -> iax2/codec_pref.o
  [CC] iax2/format_compatibility.c -> iax2/format_compatibility.o
  [LD] chan_iax2.o iax2/parser.o iax2/firmware.o iax2/provision.o iax2/codec_pref.o iax2/format_compatibility.o -> chan_iax2.so
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/4.9/../../../arm-linux-gnueabi/libc.a(dl-tsd.o)(.text+0x18): R_ARM_TLS_LE32 relocation not permitted in shared object
/usr/lib/gcc/arm-linux-gnueabi/4.9/../../../arm-linux-gnueabi/libc.a(dl-tsd.o): In function `_dl_initial_error_catch_tsd':
(.text+0x18): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
/root/asterisk-15.4.0/Makefile.rules:176: recipe for target 'chan_iax2.so' failed
make[1]: *** [chan_iax2.so] Error 1
Makefile:386: recipe for target 'channels' failed
make: *** [channels] Error 2
{code}

{code}
  [CC] chan_pjsip.c -> chan_pjsip.o
  [CC] pjsip/dialplan_functions.c -> pjsip/dialplan_functions.o
  [CC] pjsip/cli_commands.c -> pjsip/cli_commands.o
  [LD] chan_pjsip.o pjsip/dialplan_functions.o pjsip/cli_commands.o -> chan_pjsip.so
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/4.9/../../../arm-linux-gnueabi/libc.a(dl-tsd.o)(.text+0x18): R_ARM_TLS_LE32 relocation not permitted in shared object
/usr/lib/gcc/arm-linux-gnueabi/4.9/../../../arm-linux-gnueabi/libc.a(dl-tsd.o): In function `_dl_initial_error_catch_tsd':
(.text+0x18): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
/root/asterisk-15.4.0/Makefile.rules:176: recipe for target 'chan_pjsip.so' failed
make[1]: *** [chan_pjsip.so] Error 1
Makefile:386: recipe for target 'channels' failed
make: *** [channels] Error 2
{code}


Probably all the channels are affected by this issue. I'm going to compile without STATIC flag.
Comments:By: Asterisk Team (asteriskteam) 2018-05-16 05:03:45.915-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Joshua C. Colp (jcolp) 2018-05-16 06:36:17.248-0500

STATIC is not really supported or maintained any longer. Ideally it should be removed.

By: Benjamin Keith Ford (bford) 2018-05-16 13:56:27.335-0500

[~xkill], were you successful in compiling without STATIC? If so, I'll go ahead and open up another issue for what we want to do with STATIC in the future.

By: Pablo Catalina (xkill) 2018-05-16 14:23:49.222-0500

Yes. It compiled without any problems without STATIC.

By: Joshua C. Colp (jcolp) 2018-07-25 06:11:43.992-0500

As of Asterisk 16 support for static will be removed as it is not supported or maintained. If you'd like to contribute a change to add working support back in the initial comment has details on the contribution process.