| Summary: | mysql fails to rebuild with debug enabled | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Karel Volný <kvolny> |
| Component: | mysql | Assignee: | Tom Lane <tgl> |
| Status: | CLOSED WONTFIX | QA Contact: | qe-baseos-daemons |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.2 | CC: | byte, hhorak, psklenar |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-02-07 16:14:36 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Karel Volný
2012-02-07 12:05:20 UTC
I can confirm that building is possible with such a modification of spec file in mysql-5.1.52-1.el6_0.1.src.rpm and not with mysql-5.1.61-1.el6_2.1.src.rpm - latest errata version This is, more or less by definition, not a bug in Red Hat's packaging of mysql. More generally, I'm unwilling to take on a contract of "guarantee that mysql builds warning-free on compiler versions other than what upstream uses". The only supportable fix from my point of view would be to remove -Werror from the compiler options used in a debug build, which seems to rather miss the point. So I'm inclined to consider this NOTABUG, or at least a request that would have to be directed to upstream not me. Development Management has reviewed and declined this request. You may appeal this decision by reopening this request. (In reply to comment #2) > More generally, I'm unwilling to take on a contract of "guarantee that mysql > builds warning-free on compiler versions other than what upstream uses". well, may I doubt that it builds warning-free even for them? anyways, we need to be able to compile with debug to test CVE-2010-3836 (if we don't want to drop this from our testsuite) I've already updated the testcase - https://tcms.engineering.redhat.com/case/74473/ - but: > The only supportable fix from my point of view would be to remove -Werror from > the compiler options used in a debug build, please could you specify how to do this exactly, for manual testing? (In reply to comment #4) > (In reply to comment #2) > > More generally, I'm unwilling to take on a contract of "guarantee that mysql > > builds warning-free on compiler versions other than what upstream uses". > > well, may I doubt that it builds warning-free even for them? Well, I can't speculate as to their testing practices, but I would think that for development it's pretty important to be able to make a debug build. > anyways, we need to be able to compile with debug to test CVE-2010-3836 (if we > don't want to drop this from our testsuite) I don't remember that specific CVE, but if it's only applicable to debug builds then it never has and never will affect what we ship, so I have no problem with not testing it. > > The only supportable fix from my point of view would be to remove -Werror from > > the compiler options used in a debug build, > > please could you specify how to do this exactly, for manual testing? IIRC it's the last reference to -Werror in the configure script that would need to be patched out. There are some earlier places that temporarily add it to CXXFLAGS, but you don't want to muck with those for fear of breaking configure probes. just FTR, still bad luck with mysql-5.1.66 # source='complete.c' object='complete.o' libtool=no gcc -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR -D_GNU_SOURCE=1 -I. -I../../include -I../../include -I../../include -I../.. -Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror -Wdeclaration-after-statement -g -DSAFE_MUTEX -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -DUNIV_LINUX -DUNIV_LINUX -c complete.c cc1: warnings being treated as errors complete.c: In function 'fnprint': complete.c:676: error: ignoring return value of 'fwrite', declared with attribute warn_unused_result make[2]: *** [complete.o] Error 1 ... and yes, it works after patching out -Werror, I've did it with this trick: --- mysql.spec~ 2012-11-11 16:40:05.000000000 -0500 +++ mysql.spec 2012-11-11 16:40:51.000000000 -0500 @@ -227,6 +227,8 @@ CXXFLAGS="$CFLAGS -felide-constructors -fno-rtti -fno-exceptions" export CFLAGS CXXFLAGS +sed -i -e "s/-Werror//g" configure + # mysql 5.1.30 fails regression tests on x86 unless we use --with-big-tables, # suggesting that upstream doesn't bother to test the other case ... # note: the with-plugin and without-plugin options do actually work; ignore and here's 5.1.67 failure: # source='complete.c' object='complete.o' libtool=no gcc -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR -D_GNU_SOURCE=1 -I. -I../../include -I../../include -I../../include -I../.. -Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror -Wdeclaration-after-statement -g -DSAFE_MUTEX -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -DUNIV_LINUX -DUNIV_LINUX -c complete.c cc1: warnings being treated as errors complete.c: In function 'fnprint': complete.c:676: error: ignoring return value of 'fwrite', declared with attribute warn_unused_result make[2]: *** [complete.o] Error 1 |