Bug #31644 Values of *FLAGS that were used for building packages is missed in mysqlbug
Submitted: 16 Oct 2007 17:19 Modified: 5 Nov 2007 2:29
Reporter: Alexey Stroganov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0 and up OS:Any (all Unix/Linux (sh script))
Assigned to: Joerg Bruehe CPU Architecture:Any

[16 Oct 2007 17:19] Alexey Stroganov
Description:
mysqlbug script that included in every package contains exact configure command line that was used for building of this package but it lacks details about actual values of CFLAGS and CXXFLAGS that were used.

How to repeat:
example from mysql-enterprise-5.0.50-linux-x86_64-glibc23 package

mysqlbug:

...
COMP_ENV_INFO="CC='ccache gcc'  CFLAGS=''  CXX='ccache gcc'  CXXFLAGS='' LDFLAGS=''  ASFLAGS=''"
CONFIGURE_LINE="./configure '--prefix=/usr/local/mysql' '--localstatedir=/usr/local/mysql/data' '--libexecdir=/usr/local/mysql/bin' '--with-comment=MySQL Enterprise Server (Commercial)' '--with-server-suffix=-enterprise' '--enable-thread-safe-client' '--enable-local-infile' '--with-pic' '--with-fast-mutexes' '--with-client-ldflags=-static' '--with-mysqld-ldflags=-static' '--with-zlib-dir=bundled' '--with-big-tables' '--with-yassl' '--with-libedit' '--with-archive-storage-engine' '--with-blackhole-storage-engine' '--with-csv-storage-engine' '--with-example-storage-engine' '--with-federated-storage-engine' '--with-innodb' '--with-extra-charsets=complex' 'CC=ccache gcc' 'CXX=ccache gcc'"
[17 Oct 2007 14:42] Joerg Bruehe
Analysis:
    When "scripts/mysqlbug.sh" is transformed into "scripts/mysqlbug"
    ("scripts/Makefile.am"), the "SAVE_*FLAGS" values are used.
    These are set to the initial values of "*FLAGS" as passed on the 
    "configure" call, so the later changes done by "configure" 
    (especially the setting of standard optimizer flags) are not 
    reflected.
[18 Oct 2007 10:03] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/35820

ChangeSet@1.2538, 2007-10-18 12:03:30+02:00, joerg@trift2. +3 -0
  Modify "mysqlbug" ("scripts/mysqlbug.sh") so that it differs between the original
  and the modified values of the compile-related variables used in "configure".
  
  Make the necessary adjustments in "configure.in" and "scripts/Makefile.am".
  
  This fixes bug#31644
     Values of *FLAGS that were used for building packages is missed in mysqlbug
[19 Oct 2007 17:01] Joerg Bruehe
Approved by mail.
[1 Nov 2007 10:15] Bugs System
Pushed into 6.0.4-alpha
[1 Nov 2007 10:16] Bugs System
Pushed into 5.1.23-rc
[1 Nov 2007 10:17] Bugs System
Pushed into 5.0.52
[5 Nov 2007 2:29] Paul DuBois
Noted in 5.0.52, 5.1.23, 6.0.4 changelogs.

The mysqlbug script did not include the correct values of CFLAGS and
CXXFLAGS that were used to configure the distribution.