Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1160845
Summary: | udf_example.c couldn't compile | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mikhail <mikhail.v.gavrilov> | ||||
Component: | mariadb | Assignee: | Jan Staněk <jstanek> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 21 | CC: | hhorak, jdornak, jstanek, mmuzila | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | mariadb-10.0.14-8.fc21 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-12-06 09:59:27 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Mikhail
2014-11-05 19:07:57 UTC
If I am manually remove -Werror=format-security parameter compile would be successful $ gcc -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -fno-delete-null-pointer-checks -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -shared -fPIC -o udf_example.so udf_example.c The problem seems to originate in the way the mysql_config scripts is created during mariadb configuration and how it actually produces the --cflags output. When the cmake scripts are run in the specfile, the mysql_config picks up actual CFLAGS environment variable and uses it as a base for reporting. However, when actually asked for the CFLAGS (by executing it with --cflags option or similar), it does some preprocessing on the saved values - including removing warning-related flags. The regexp ('-W[-A-Za-z]*') catches (and thus removes) the -Wall options (which "include" -Wformat), but not the -Werror=format-security (which *needs* -Wformat specified in one way or another). The regexp should definitely be fixed, the question is how -- should it also remove the -Werror=format-security, or should it leave the -Wall option in order to get the aforementioned option to work? Guessing from the way the script is written, I think that the -Werror... should be removed as well as the others and leave the decision about compiler warnings and errors to the end user. I will contact upstream and hope for feedback. Created attachment 959298 [details]
Upstream patch
Upstream fixed this issue and it should be shipped with the next release of mariadb 5.5. The fix is accesible at [1] and the Mariadb bug with commentary on this issue is at [2]. For the time being, I am going to apply the patch to current MariaDB, which should fix the issue until next upstream release. [1] http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4360 [2] https://mariadb.atlassian.net/browse/MDEV-7028 mariadb-10.0.14-8.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mariadb-10.0.14-8.fc21 Package mariadb-10.0.14-8.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mariadb-10.0.14-8.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-15761/mariadb-10.0.14-8.fc21 then log in and leave karma (feedback). mariadb-10.0.14-8.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. |