[Home]

Summary:ASTERISK-25503: Compilation failure in Fedora 23 - 'collect2: error: ld returned 1 exit status'
Reporter:Private Name (falves11)Labels:
Date Opened:2015-10-28 23:46:27Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Core/BuildSystem
Versions:12.8.2 13.6.0 Frequency of
Occurrence
Related
Issues:
Environment:Fedora 23Attachments:
Description:I could not compile any version of Asterisk12 in Fedora 23. There must be a flag that needs to be set. The errors below:  

[Edit by Rusty - Cleaning up the excessive debug below this line. As we've mentioned before please attach debug to the issue in .txt format. Do not post large debug into description or comment fields.]
{noformat}
[LD] chan_sip.o sip/security_events.o sip/dialplan_functions.o sip/reqresp_parser.o sip/config_parser.o sip/utils.o -> chan_sip.so
sip/security_events.o: In function `ast_atomic_fetchadd_int':
...
chan_sip.o:/usr/src/asterisk/include/asterisk/strings.h:1099: first defined here
sip/utils.o: In function `ast_rq_is_int':
/usr/src/asterisk/include/asterisk/config.h:1116: multiple definition of `ast_rq_is_int'
chan_sip.o:/usr/src/asterisk/include/asterisk/config.h:1116: first defined here
collect2: error: ld returned 1 exit status
/usr/src/asterisk/Makefile.rules:138: recipe for target 'chan_sip.so' failed
make[1]: *** [chan_sip.so] Error 1
Makefile:383: recipe for target 'channels' failed
make: *** [channels] Error 2
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2015-10-28 23:46:28.922-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: Private Name (falves11) 2015-10-29 00:21:08.254-0500

in order to compile, it needs this flag in ./configure
LDFLAGS="-z muldefs"
it would be worth to add it to the project

By: Charles Moye (chazzam) 2016-04-20 13:59:56.736-0500

Ran into this on Tiny Core 7, for asterisk-certified-13.1-cert6 and certified-asterisk-1.8.28-cert5, adding the LDFLAGS="-z muldefs" resolved it for both.
I was seeing chan_iax2 and then chan_dahdi fail, after I disabled chan_iax in menuselect. Was able to re-enable chan_iax2 after adding this option to the configure.