[Home]

Summary:ASTERISK-25434: Compiler flags not reported in 'core show settings' despite usage during compilation
Reporter:Rusty Newton (rnewton)Labels:
Date Opened:2015-09-29 14:08:51Date Closed:2015-11-04 14:27:32.000-0600
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:SVN 11.20.0 13.4.0 13.5.0 13.6.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Ubuntu 12.04 , Linux newtonr-laptop 3.13.0-55-generic #94~precise1-Ubuntu SMP Thu Jun 18 09:53:13 UTC 2015 x86_64 x86_64 x86_64 GNU/LinuxAttachments:( 0) cli-display-build-opts.patch
Description:Edit: Issue may be that the string used by "core show settings" is not built correctly.. the actual options appear to get defined correctly.

Description:

Before building Asterisk, enable DONT_OPTIMIZE or BETTER_BACKTRACES in menuselect. After building and installing check "core show settings" and see that those options are not reported.

I believe the flags are not actually set as I noticed the problem when I was reproducing a crash and saw optimizations in pjsip code despite having selected DONT_OPTIMIZE in menuselect.

Other options such as DEBUG_THREADS or DEBUG_FD_LEAKS seem to work fine.

Notes:


I *cannot* reproduce in 13.3.2, but I *can* reproduce in 13.4.0, 13.5.0 and a git pull of 13 branch from today.

I had [~kharwell] reproduce as well with a git pull from a few hours ago.

That all being said, I could swear these options worked fine (disabling and enabling between builds) in 13.5.0 for the past weeks... Very confusing.

I'm interested to see if others can reproduce.

EDIT:

Issue caused by commit:

{noformat}
commit ac1f0090eb5f93f8d37f512a94aa6b16affb77e1
Author: Corey Farrell <git@cfware.com>
Date:   Wed Apr 29 04:03:00 2015 -0400

   Build System: Prevent unneeded changes to asterisk/buildopts.h.
   
   * Add AST_DEVMODE to BUILDOPTS
   * Remove CFLAGS that do not effect ABI from BUILDOPTS.
   * Use BUILDOPTS to generate AST_BUILDOPT_SUM.
   * Remove loop that defined AST_MODULE_*
   
   These changes ensure that only ABI effecting options are considered for
   AST_BUILDOPT_SUM.  This also reduces unneeded full system rebuilds caused
   by enabling or disabling one module that another is dependent on.
   
   ASTERISK-25028
   Reported by: Corey Farrell
   
   Change-Id: I2c516d93df9f6aaa09ae079a8168c887a6ff93a2
{noformat}

I tested with that commit and the previous. Issue does not occur when backed up to "5875bf183c255f19ededdb1004f35fd15cd1e6cf"


Comments:By: Corey Farrell (coreyfarrell) 2015-10-06 17:02:58.681-0500

I think it would be best for 'core show settings' to use a separate string for build options.  The strings in buildopts.h are used to determine if a module is compatible with Asterisk, and all options that have no effect on ABI are excluded.  Maybe we can add unfiltered buildopts to main/ast_version.c, have CLI use that for display?

By: Corey Farrell (coreyfarrell) 2015-11-02 20:09:19.733-0600

The attached patch creates a new function to allow CLI to display build options, including those which have no effect on ABI.  Worth noting this does duplicate a portion of {{build_tools/make_buildopts_h}}, but I'm not sure of a better way to deal with this without reverting the original commit.