[Home]

Summary:ASTERISK-24975: Enabling 'DEBUG_THREADLOCALS' Causes the Build to Fail
Reporter:Ashley Sanders (asanders)Labels:
Date Opened:2015-04-17 15:27:58Date Closed:2015-04-20 05:53:53
Priority:MajorRegression?
Status:Closed/CompleteComponents:
Versions:SVN 11.17.1 13.3.2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) threadstorage-fix.patch
Description:After I cloned the repository, I:
1. $ ./configure --enable-dev-mode
2. $ make menuselect
3. In menuselect, enabled Compiler Flags - Development -> DEBUG_THREADLOCALS.
4. $ make

The build fails with the following message:
{noformat}
In file included from /home/ashley/dev/asterisk/src/include/asterisk/strings.h:31:0,
                from /home/ashley/dev/asterisk/src/include/asterisk/utils.h:869,
                from /home/ashley/dev/asterisk/src/include/asterisk/config.h:30,
                from /home/ashley/dev/asterisk/src/include/asterisk/channel.h:169,
                from logger.c:57:
logger.c: In function ‘__cleanup_in_safe_log’:
/home/ashley/dev/asterisk/src/include/asterisk/threadstorage.h:137:11: error: called object is not a function or function pointer
 c_cleanup(data);                            \
          ^
/home/ashley/dev/asterisk/src/include/asterisk/threadstorage.h:88:2: note: in expansion of macro ‘AST_THREADSTORAGE_CUSTOM_SCOPE’
 AST_THREADSTORAGE_CUSTOM_SCOPE(name, NULL, NULL,)
 ^
logger.c:110:1: note: in expansion of macro ‘AST_THREADSTORAGE_RAW’
AST_THREADSTORAGE_RAW(in_safe_log);
^
make[1]: *** [logger.o] Error 1
make: *** [main] Error 2
{noformat}


After the build failed, I disabled the setting and re-built Asterisk. This time, the build succeeded.

To verify enabling the flag is what failed my initial build, I retraced my steps and the build failed a second time.
Comments:By: Corey Farrell (coreyfarrell) 2015-04-17 15:46:27.471-0500

I'll investigate this and work on a patch since I created {{AST_THREADSTORAGE_RAW}}.

By: Corey Farrell (coreyfarrell) 2015-04-17 16:16:17.057-0500

This patch seems to fix the problem (tested in master).  I'm just recompiling with 11 before I post to gerrit.