[asterisk-bugs] [Asterisk 0016782]: [patch] res_pktccops.so doesn't export a symbol, chan_mgcp will not load or will malfunction depending on gcc version
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Feb 10 15:55:44 CST 2010
The following issue has been RESOLVED.
======================================================================
https://issues.asterisk.org/view.php?id=16782
======================================================================
Reported By: nahuelgreco
Assigned To: tilghman
======================================================================
Project: Asterisk
Issue ID: 16782
Category: Channels/chan_mgcp
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 245184
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2010-02-05 18:56 CST
Last Modified: 2010-02-10 15:55 CST
======================================================================
Summary: [patch] res_pktccops.so doesn't export a symbol,
chan_mgcp will not load or will malfunction depending on gcc version
Description:
res_pktccops.so is generated without exported symbols, because a
res_pktccops.exports file is missing in the res/ directory.
This is fun, because if you try it in a modern platform, AST_OPTIONAL_API
macro will do his magic and chan_mgcp.so will load with no complaints
because the ast_pktccops_gate_alloc symbol is declared as an optional
dependency. But then it will silenty fail when trying to open gates at the
CMTS, because AST_OPTIONAL_API will provide ast_pktccops_gate_alloc as a an
always-returning-NULL stub.
If you try it in an old platform, like RHEL 5.0 (gcc 4.1.1), chan_mgcp.so
will not load, saying there is an undefined symbol
ast_pktccops_gate_alloc... while res_pktccops.so is already loaded. That's
because AST_OPTIONAL_API macro will do nothing special in presence of a gcc
version that doesn't support weak symbols, so all symbols will be
required.
Solution: Add the attached res_pktccops.exports file to the res/
directory.
This was tested with SVN trunk rev 245184.
RHEL 5.0 log (second case):
*CLI> module show like pkt
Module Description
Use Count
res_pktccops.so PktcCOPS manager for MGCP 0
1 modules loaded
*CLI> module load chan_mgcp.so
[2010-02-05 18:39:15.565] WARNING[2761]: loader.c:429 load_dynamic_module:
Error loading module 'chan_mgcp.so':
/usr/lib/asterisk/modules/chan_mgcp.so: undefined symbol:
ast_pktccops_gate_alloc
[2010-02-05 18:39:15.565] WARNING[2761]: loader.c:820 load_resource:
Module 'chan_mgcp.so' could not be loaded.
Unable to load module chan_mgcp.so
Command 'module load chan_mgcp.so ' failed.
*CLI>
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-02-10 15:55 svnbot Status new => assigned
2010-02-10 15:55 svnbot Assigned To => tilghman
2010-02-10 15:55 svnbot Status assigned => resolved
2010-02-10 15:55 svnbot Resolution open => fixed
======================================================================
More information about the asterisk-bugs
mailing list