VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
noloader at gmail.com Guest
|
Posted: Fri Jul 25, 2014 9:32 am Post subject: [asterisk-users] Use of undeclared identifier 'pvt' in aster |
|
|
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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Fri Jul 25, 2014 9:35 am Post subject: [asterisk-users] Use of undeclared identifier 'pvt' in aster |
|
|
Jeffrey Walton wrote:
Quote: | 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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
noloader at gmail.com Guest
|
Posted: Fri Jul 25, 2014 9:40 am Post subject: [asterisk-users] Use of undeclared identifier 'pvt' in aster |
|
|
On Fri, Jul 25, 2014 at 10:35 AM, Joshua Colp <jcolp@digium.com> wrote:
Quote: | Jeffrey Walton wrote:
Quote: |
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.
| Oh, that's a drag. I specifically choose Clang so I could use its
static and dynamic analysis capabilities. The sanitizers rock - they
are real tattle tales.
Are there any plans to support Clang? If the effort is going on now,
then I 'd be happy to help out with porting and testing.
Jeff
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Fri Jul 25, 2014 9:42 am Post subject: [asterisk-users] Use of undeclared identifier 'pvt' in aster |
|
|
Jeffrey Walton wrote:
Quote: | On Fri, Jul 25, 2014 at 10:35 AM, Joshua Colp<jcolp@digium.com> wrote:
Quote: | Jeffrey Walton wrote:
Quote: | 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.
| Oh, that's a drag. I specifically choose Clang so I could use its
static and dynamic analysis capabilities. The sanitizers rock - they
are real tattle tales.
Are there any plans to support Clang? If the effort is going on now,
then I 'd be happy to help out with porting and testing.
|
There is one review at https://reviewboard.asterisk.org/r/3488/ which is
a proof of concept, but I know of noone actively working on it.
--
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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
noloader at gmail.com Guest
|
Posted: Fri Jul 25, 2014 10:46 am Post subject: [asterisk-users] Use of undeclared identifier 'pvt' in aster |
|
|
On Fri, Jul 25, 2014 at 10:42 AM, Joshua Colp <jcolp@digium.com> wrote:
Quote: | Jeffrey Walton wrote:
Quote: |
...
Quote: | 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.
|
Oh, that's a drag. I specifically choose Clang so I could use its
static and dynamic analysis capabilities. The sanitizers rock - they
are real tattle tales.
Are there any plans to support Clang? If the effort is going on now,
then I 'd be happy to help out with porting and testing.
|
There is one review at https://reviewboard.asterisk.org/r/3488/ which is a
proof of concept, but I know of no one actively working on it.
| Thanks Joshua. Those nested functions are toxic.
Nested functions have the obvious effect breaking tools like Clang.
But worse, you can't use NX-stacks (-Wl,-z,noexecstack). NX-Stacks and
nested functions are mutually exclusive because GCC places a
trampoline on the stack.
The lack of NX-Stacks could be a security defect and could lead to
governance problems.
Jeff
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
mjordan at digium.com Guest
|
Posted: Fri Jul 25, 2014 12:46 pm Post subject: [asterisk-users] Use of undeclared identifier 'pvt' in aster |
|
|
On Fri, Jul 25, 2014 at 10:46 AM, Jeffrey Walton <noloader@gmail.com> wrote:
Quote: | On Fri, Jul 25, 2014 at 10:42 AM, Joshua Colp <jcolp@digium.com> wrote:
Quote: | Jeffrey Walton wrote:
Quote: |
...
Quote: | 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.
|
Oh, that's a drag. I specifically choose Clang so I could use its
static and dynamic analysis capabilities. The sanitizers rock - they
are real tattle tales.
Are there any plans to support Clang? If the effort is going on now,
then I 'd be happy to help out with porting and testing.
|
There is one review at https://reviewboard.asterisk.org/r/3488/ which is a
proof of concept, but I know of no one actively working on it.
| Thanks Joshua. Those nested functions are toxic.
Nested functions have the obvious effect breaking tools like Clang.
But worse, you can't use NX-stacks (-Wl,-z,noexecstack). NX-Stacks and
nested functions are mutually exclusive because GCC places a
trampoline on the stack.
The lack of NX-Stacks could be a security defect and could lead to
governance problems.
|
I'm sorry you don't like nested functions.
The use of RAII_VAR has saved the Asterisk project on countless
defects: memory leaks, reference leaks, port leaks, deadlocks on off
nominal paths, all sorts of ills.
They aren't going anywhere.
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
noloader at gmail.com Guest
|
Posted: Sat Jul 26, 2014 4:07 am Post subject: [asterisk-users] Use of undeclared identifier 'pvt' in aster |
|
|
On Fri, Jul 25, 2014 at 1:45 PM, Matthew Jordan <mjordan@digium.com> wrote:
Quote: | ...
The use of RAII_VAR has saved the Asterisk project on countless
defects: memory leaks, reference leaks, port leaks, deadlocks on off
nominal paths, all sorts of ills.
| The problem is not with RAII_VAR. Its a good pattern, and I often use similar.
The issue is GCC's particular implementation of nested functions.
Diederik de Groot offered a very good alternative in the report cited
by Joshua Colp. Its a very good alternative because it avoids the
problems cause by GCC's implementation of nested functions. And it
allows an operator to further improve their security posture by
honoring best practices and adhering to SDLCs.
Every best practice and SDLC I've seen includes NX-Stack, NX-Heaps,
PIE, FORTIFY_SOURCES, GOT Hardening, PLT Hardening, and friends.
The alternative is also a win-win. Not only does it address the gaps
created by GCC, it also allows advanced analysis on the binaries.
Static and dynamic analysis is also part of best practices and SDLCs.
Jeff
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|