[Home]

Summary:ASTERISK-20761: Asterisk 11 Compile errors when embedding modules (/usr/bin/ld: Dwarf Error: ...)
Reporter:Thomas Eugene (kjuma)Labels:
Date Opened:2012-12-04 11:29:56.000-0600Date Closed:2017-03-27 09:50:32
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/BuildSystem Resources/res_rtp_asterisk Resources/res_xmpp
Versions:11.0.0 11.0.1 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-19241 Cannot compile with Embedded Modules
Environment:Debian 6 x64Attachments:( 0) Asterisk_11_Compile_Error.txt
( 1) embedded-11.patch
( 2) embedded-12up.patch
( 3) embedded-all.patch
Description:When compiling Version 11, I get compile time error with DWARF error. I get this when I embed modules. I also has removed the main/modules.link issues that seems not be caught by anyone since version 1.8, 10 and 11.

I have all the packages needed. Asterisk 1.8 has no issues compiling.

I will attach the compile time logs with the errors I see
Comments:By: Thomas Eugene (kjuma) 2012-12-04 11:38:32.868-0600

This is compile time error, step by step. Shows output of the entire compile.

By: Rusty Newton (rnewton) 2012-12-07 09:30:48.150-0600

We've acknowledged this issue. Module Embedding is under extended support and therefore supported primarily by the Asterisk developer community. Response times may reflect that. More information on module support levels can be found here:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States

By: KJ (kumeil) 2013-01-09 00:46:40.582-0600

Just as an update, this issue is also present in 11.1.

By: Matt Jordan (mjordan) 2013-01-09 09:22:31.509-0600

The issue is still open. There's no need to update an issue with a minor version when it hasn't been fixed.

By: KJ (kumeil) 2013-07-08 12:25:05.301-0500

Hi,
It has been 7 months since this issue was opened. Has there been any updates on this?

Thanks.

By: Matt Jordan (mjordan) 2013-07-08 13:07:31.986-0500

{quote}
We've acknowledged this issue. Module Embedding is under extended support and therefore supported primarily by the Asterisk developer community. Response times may reflect that. More information on module support levels can be found here:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
{quote}

As there are no comments on here, no, there are no updates on this issue. No one from the Asterisk developer community has taken on this issue or provided a patch.

By: Corey Farrell (coreyfarrell) 2013-08-22 11:55:33.161-0500

[^embedded_modules.patch] applies to 1.8+.
* Enable embedding of CEL
* Fix error that caused attempted use of main/modules.link
* Resolve flood of warnings caused by asterisk/module.h
* Allows Makefile's to declare NO_EMBED_MODS before including Makefile.moddir_rules

[^noembed-res_rtp_asterisk.patch] applies to 11.  This requires the first patch and tells res/Makefile that it's impossible to embed res_rtp_asterisk (thus creating a loadable module).  Since pjproject is linked as a shared object in 12/trunk, I don't think the exclusion would be needed.

I've done very limited tested on these patches for 1.8 and 11 (they built and ran in valgrind).  I haven't had a chance to try these with trunk.

I realize this is not the solution you are looking for but resolving the embedding error's for pjproject users in 11 would likely be too risky.

By: Corey Farrell (coreyfarrell) 2013-09-12 03:14:06.630-0500

Updated patches are attached.  This patch removes the changes to include/asterisk/module.h as they seem to cause crashing on some systems.  NO_EMBED_MODS Makefile variable was also removed since all modules are embeddable.

Embedded modules cannot hide non-static symbols.  I used 'nm' to audit global symbols in all object (*.o) files.  Static was added to any variable that is not used outside it's own source, and not normally exported.  These fixes resolve the duplicate symbol error's with embedded linking.

Asterisk 12 res_pjsip and res_pjsip_messaging both had pjsip_message_method.  The patch for asterisk 12 removes both since the same variable is already declared and exported from pjproject.  That change needs testing or verified by someone with more knowledge of res_pjsip.

PJPROJECT in Asterisk 11 is a special problem.  It requires adding shared libraries to asterisk which are not otherwise used.  This is not directly supported through the normal method of embedding libraries.  My patch adds special targets to res/Makefile which print LDFLAGS and LDLIBS needed for PJPROJECT.  This is called from main/Makefile so PJPROJECT can be linked to asterisk.

By: Corey Farrell (coreyfarrell) 2017-03-27 09:50:32.435-0500

Suspending this ticket for inactivity, nobody tested the patches which no longer work.

Module embedding has not worked in any currently supported version of Asterisk the current plan is to remove it entirely.