[SOLVED] Build error 16 chan_vpb error: uninitialized const member 'ast_channel_tech::send_text_data'

when try to build the chan_vpb module i got taht error: chan_vpb.cc:427:1: error: uninitialized const member 'ast_channel_tech::send_text_data' … quite xtrange … why?

last lines of build process:

[  486s] i586-linux-gnu-gcc -o sip/route.o -c sip/route.c -MD -MT sip/route.o -MF .sip_route.o.d -MP -pthread -I/usr/src/packages/BUILD/include -fgnu89-inline -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2   -I/usr/include/libxml2  -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations       -fPIC -DAST_MODULE=\"chan_sip\" -DAST_MODULE_SELF_SYM=__internal_chan_sip_self    
[  486s] /usr/src/packages/BUILD/build_tools/make_linker_version_script chan_sip "" "/usr/src/packages/BUILD"
[  486s] i586-linux-gnu-gcc -o chan_sip.so -pthread -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed    -shared -Wl,--version-script,chan_sip.exports,--warn-common  chan_sip.o sip/security_events.o sip/dialplan_functions.o sip/reqresp_parser.o sip/utils.o sip/config_parser.o sip/route.o  
[  486s] i586-linux-gnu-g++ -o chan_vpb.oo -c chan_vpb.cc -MD -MT chan_vpb.oo -MF .chan_vpb.oo.d -MP -pthread -I/usr/src/packages/BUILD/include -fgnu89-inline -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -I/usr/include/libxml2 -pipe -Wall -fPIC -DAST_MODULE=\"chan_vpb\" -DAST_MODULE_SELF_SYM=__internal_chan_vpb_self 
[  486s] cc1plus: warning: command line option '-fgnu89-inline' is valid for C/ObjC but not for C++
[  486s] chan_vpb.cc:393:1: error: uninitialized const member 'ast_channel_tech::send_text_data'
[  486s]  };
[  486s]  ^
[  486s] chan_vpb.cc:427:1: error: uninitialized const member 'ast_channel_tech::send_text_data'
[  486s]  };
[  486s]  ^
[  487s] /usr/src/packages/BUILD/Makefile.rules:169: recipe for target 'chan_vpb.oo' failed
[  487s] make[3]: *** [chan_vpb.oo] Error 1
[  487s] make[3]: Leaving directory '/usr/src/packages/BUILD/channels'
[  487s] Makefile:383: recipe for target 'channels' failed
[  487s] make[2]: *** [channels] Error 2
[  487s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  487s] make -j1 AST_FORTIFY_SOURCE= DEBUG= OPTIMIZE= NOISY_BUILD=yes ASTDATADIR=/var/asterisk ASTVARRUNDIR=/var/run/asterisk returned exit code 2

This module has been deprecated in Asterisk 16+, so if possible I’d suggest avoiding its use if you are able.

That being said it appears the compiler does not like that the member is not being initialized. It seems several members were added to the ‘ast_channel_tech’ structure at some point, and the ‘vpb_tech’ and ‘vpb_tech_indicate’ variables were not updated. Probably due to the fact the module is deprecated. It’s unlikely it will be too unless you or another community member are willing to update the module in question. If you do decide to take it on something like the following needs to be added to the end of each declaration:

.get_pvt_uniqueid = NULL,
.cc_callback = NULL,
.pre_call = NULL,
.send_text_data = NULL,

See the following if you are interested in submitting a patch:


1 Like

are you talking at the end of each struct declaration related to ast_channel_tech ?

Thanks for suggestions, solution patch https://groups.google.com/forum/m/?place=forum/venenuxsarisari#!topic/venenuxsarisari/FXcLQsaGxwQ

Glad it worked. Adding a link here to the JIRA issue for reference:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.