Jeffrey Walton
2014-Jul-25 14:31 UTC
[asterisk-users] Use of undeclared identifier 'pvt' in asterisk-12.4.0
I downloaded asterisk-12.4.0 (asterisk-12-current.tar.gz, dated 10-JUL_2014) from http://downloads.asterisk.org/pub/telephony/asterisk/. The packaged configured OK. However, I'm getting a compile error: use of undeclared identifier 'pvt'. I've found similar reports for other versions (asterisk-11 and dongle; macports; a couple others), but nothing for 12.4. Any suggestions to fix the issue? Thanks in advance. ********** make ... [CC] recno/rec_utils.c -> recno/rec_utils.o clang: warning: argument unused during compilation: '-fnested-functions' [AR] hash/hash.o hash/hash_bigkey.o hash/hash_buf.o hash/hash_func.o hash/hash_log2.o hash/hash_page.o hash/ndbm.o btree/bt_close.o btree/bt_conv.o btree/bt_debug.o btree/bt_delete.o btree/bt_get.o btree/bt_open.o btree/bt_overflow.o btree/bt_page.o btree/bt_put.o btree/bt_search.o btree/bt_seq.o btree/bt_split.o btree/bt_utils.o db/db.o mpool/mpool.o recno/rec_close.o recno/rec_delete.o recno/rec_get.o recno/rec_open.o recno/rec_put.o recno/rec_search.o recno/rec_seq.o recno/rec_utils.o -> libdb1.a [LD] astdb2sqlite3.o db1-ast/libdb1.a -> astdb2sqlite3 [CC] astdb2bdb.c -> astdb2bdb.o clang: warning: argument unused during compilation: '-fnested-functions' [LD] astdb2bdb.o db1-ast/libdb1.a -> astdb2bdb [CC] chan_bridge_media.c -> chan_bridge_media.o clang: warning: argument unused during compilation: '-fnested-functions' chan_bridge_media.c:122:2: error: illegal storage class on function RAII_VAR(struct ast_callid *, callid, NULL, ast_callid_cleanup); ^ /home/jeffrey/asterisk-12.4.0/include/asterisk/utils.h:991:5: note: expanded from macro 'RAII_VAR' auto void _dtor_ ## varname (vartype * v); \ ^ chan_bridge_media.c:122:2: error: function definition is not allowed here /home/jeffrey/asterisk-12.4.0/include/asterisk/utils.h:992:42: note: expanded from macro 'RAII_VAR' void _dtor_ ## varname (vartype * v) { dtor(*v); } \ ^ chan_bridge_media.c:123:2: error: illegal storage class on function RAII_VAR(struct ast_unreal_pvt *, pvt, NULL, ao2_cleanup); ^ /home/jeffrey/asterisk-12.4.0/include/asterisk/utils.h:991:5: note: expanded from macro 'RAII_VAR' auto void _dtor_ ## varname (vartype * v); \ ^ chan_bridge_media.c:123:2: error: function definition is not allowed here /home/jeffrey/asterisk-12.4.0/include/asterisk/utils.h:992:42: note: expanded from macro 'RAII_VAR' void _dtor_ ## varname (vartype * v) { dtor(*v); } \ ^ chan_bridge_media.c:125:8: error: use of undeclared identifier 'pvt' if (!(pvt = ast_unreal_alloc(sizeof(*pvt), ast_unreal_destructor... ^ chan_bridge_media.c:125:39: error: use of undeclared identifier 'pvt' if (!(pvt = ast_unreal_alloc(sizeof(*pvt), ast_unreal_destructor... ^ chan_bridge_media.c:129:18: error: use of undeclared identifier 'pvt' ast_copy_string(pvt->name, data, sizeof(pvt->name)); ^ chan_bridge_media.c:131:15: error: use of undeclared identifier 'pvt' ast_set_flag(pvt, AST_UNREAL_NO_OPTIMIZATION); ^ /home/jeffrey/asterisk-12.4.0/include/asterisk/utils.h:72:15: note: expanded from macro 'ast_set_flag' typeof ((p)->flags) __p = (p)->flags; \ ^ chan_bridge_media.c:131:15: error: use of undeclared identifier 'pvt' /home/jeffrey/asterisk-12.4.0/include/asterisk/utils.h:72:33: note: expanded from macro 'ast_set_flag' typeof ((p)->flags) __p = (p)->flags; \ ^ chan_bridge_media.c:131:15: error: use of undeclared identifier 'pvt' /home/jeffrey/asterisk-12.4.0/include/asterisk/utils.h:75:8: note: expanded from macro 'ast_set_flag' ((p)->flags |= (flag)); \ ^ chan_bridge_media.c:133:2: error: use of undeclared identifier 'callid' callid = ast_read_threadstorage_callid(); ^ chan_bridge_media.c:135:33: error: use of undeclared identifier 'pvt' chan = ast_unreal_new_channels(pvt, tech, ^ chan_bridge_media.c:141:13: error: use of undeclared identifier 'pvt' ast_answer(pvt->owner); ^ chan_bridge_media.c:142:13: error: use of undeclared identifier 'pvt' ast_answer(pvt->chan); ^ chan_bridge_media.c:144:34: error: use of undeclared identifier 'pvt' if (ast_channel_add_bridge_role(pvt->chan, role)) { ^ 15 errors generated. make[1]: *** [chan_bridge_media.o] Error 1 make: *** [channels] Error 2
Joshua Colp
2014-Jul-25 14:35 UTC
[asterisk-users] Use of undeclared identifier 'pvt' in asterisk-12.4.0
Jeffrey Walton wrote:> I downloaded asterisk-12.4.0 (asterisk-12-current.tar.gz, dated > 10-JUL_2014) from > http://downloads.asterisk.org/pub/telephony/asterisk/. > > The packaged configured OK. However, I'm getting a compile error: use > of undeclared identifier 'pvt'. > > I've found similar reports for other versions (asterisk-11 and dongle; > macports; a couple others), but nothing for 12.4. > > Any suggestions to fix the issue?You are building Asterisk using the 'clang' compiler. At this time Asterisk does not support being built with it. You will need to ensure GCC is used instead. Cheers, -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org