[asterisk-bugs] [JIRA] (ASTERISK-29884) logger.h: logger macros cause install to fail
Joshua C. Colp (JIRA)
noreply at issues.asterisk.org
Thu Jan 27 12:31:06 CST 2022
[ https://issues.asterisk.org/jira/browse/ASTERISK-29884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joshua C. Colp updated ASTERISK-29884:
--------------------------------------
Affects Version/s: (was: 18.9.0)
GIT
> logger.h: logger macros cause install to fail
> ---------------------------------------------
>
> Key: ASTERISK-29884
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29884
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Core/Logging, General
> Affects Versions: GIT
> Environment: FreeBSD 13
> Reporter: N A
> Severity: Major
>
> Actual version is master branch, not 18.9.0.
> When trying to install Asterisk on FreeBSD, install fails when compiling bridge.c:
> [CPP] backtrace.c -> backtrace.i
> [CCi] backtrace.i -> backtrace.o
> [CPP] bridge.c -> bridge.i
> [CCi] bridge.i -> bridge.o
> bridge.c:1630:54: error: illegal storage class on function
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1630, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1630, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1630:164: error: function definition is not allowed here
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1630, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1630, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1630:756: error: illegal storage class on function
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1630, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1630, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1630:834: error: function definition is not allowed here
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1630, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1630, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1888:54: error: illegal storage class on function
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1888, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1888, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1888:164: error: function definition is not allowed here
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1888, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1888, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1888:756: error: illegal storage class on function
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1888, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1888, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1888:834: error: function definition is not allowed here
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1888, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1888, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s Bridge: %s\n", ast_channel_name(chan), bridge->uniqueid); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1910:54: error: illegal storage class on function
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1910, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s\n", ast_channel_name(chan)); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1910, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s\n", ast_channel_name(chan)); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1910:164: error: function definition is not allowed here
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1910, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s\n", ast_channel_name(chan)); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1910, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s\n", ast_channel_name(chan)); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1910:727: error: illegal storage class on function
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1910, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s\n", ast_channel_name(chan)); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1910, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s\n", ast_channel_name(chan)); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> ^
> bridge.c:1910:805: error: function definition is not allowed here
> const char *__trace_funcname = __PRETTY_FUNCTION__; auto void __scopevar__LINE____EXIT(void * v); void __scopevar__LINE____EXIT(void * v __attribute__((unused))) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1910, __trace_funcname, AST_TRACE_INDENT_DEC_BEFORE, 0, " " "%s\n", ast_channel_name(chan)); } } void *__scopevar__LINE____TRACER __attribute__((cleanup(__scopevar__LINE____EXIT))) = (void *) __PRETTY_FUNCTION__ ; auto int __scopevar__LINE____ENTER(void); int __scopevar__LINE____ENTER(void) { if ((option_trace >= (1) || (({ typeof ((&ast_options)->flags) __p = (&ast_options)->flags; typeof (__unsigned_int_flags_dummy) __x = 0; (void) (&__p == &__x); ((&ast_options)->flags & (AST_OPT_FLAG_TRACE_MODULE)); }) && ((int)ast_trace_get_by_module("core") >= (1) || (int)ast_trace_get_by_module("bridge.c") >= (1))))) { __ast_trace("bridge.c", 1910, __trace_funcname, AST_TRACE_INDENT_INC_AFTER, 0, " " "%s\n", ast_channel_name(chan)); } return 0; } int __scopevar__LINE____RETURN __attribute__((unused)) = __scopevar__LINE____ENTER();
> However, if I go ahead and comment out the contents and turn SCOPE_TRACE into an empty macro, then installation proceeds... at least until it gets here - there may be multiple other incompatabilities as well:
> [CPP] logger.c -> logger.i
> [CCi] logger.i -> logger.o
> logger.c:2536:54: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
> ast_log_full(1, -1, ((void *)0), 0, ((void *)0), 0, ast_str_buffer(fmt), ap);
> It seems something about this isn't compatible with FreeBSD.
> I'm using gmake, and don't recall encountering this issue before. This is on a fresh virtual machine. This happens both with and without applying the FreeBSD port patches (minus the obsolete one that modifies Makefiles.rules due to the recent srtp pjproject review).
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list