Bug 1195207 - mariadb-devel depends on redhat-rpm-config
Summary: mariadb-devel depends on redhat-rpm-config
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: community-mysql
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Dorňák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-23 11:27 UTC by Attila Fazekas
Modified: 2015-12-02 17:30 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-02 09:21:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Attila Fazekas 2015-02-23 11:27:50 UTC
Description of problem:

Almost all mariadb library consumer build tools uses a 'mysql_config --cflags' 
(or similar) command to get the right cflags for compilation.
At the moment the output of this command:

$ mysql_config --cflags
-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

Please note the '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' .

This file is not installed on the system even after:
$ yum group install "Development Tools"
$ yum group install "C Development Tools and Libraries"

The file is part of the redhat-rpm-config, which AFAIK supposed to be used just for rpm building.

Version-Release number of selected component (if applicable):
mariadb-devel-10.0.15-4.fc21.x86_64

How reproducible:
always

Actual results:
Compilation fails.


Expected results:
After I install the mariadb-devel and a C compiler I MUST be able to compile my dependent project with the recommended cflags. The recommended cfalgs are the ones which reported by the  mysql_config --cflags.

It is not clear how it should be packaged, but I see several options:
A, redhat-hardened-cc1 should be installed together with gcc .
B, mariadb-devel depends on  redhat-rpm-config .
C, mariadb-devel does not advertise '/usr/lib/rpm/redhat/redhat-hardened-cc1' usage .

Additional info:
An example failure:
http://logs.openstack.org/24/158224/1/check/check-tempest-dsvm-f21/8b9b3d4/logs/devstacklog.txt.gz#_2015-02-23_09_49_04_040

Comment 1 Honza Horak 2015-03-14 17:45:11 UTC
Hm, weird, I see totally different output on F21:

$> rpm -q mariadb-devel
mariadb-devel-10.0.17-1.fc21.x86_64

$> mysql_config --cflags
-I/usr/include/mysql

Can you, please, check by exploring /usr/bin/mysql_config-64 where the arguments come from? Since I don't see where they could come from just by observing mysql_config-64 content.

Comment 2 Attila Fazekas 2015-03-16 06:46:49 UTC
$ grep hard /usr/bin/mysql_config-64
cflags="$include -O2 -g -pipe -Wall -Werror=format-security -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 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -fno-delete-null-pointer-checks  -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing  -Wno-uninitialized -DDBUG_OFF " #note: end space!

Also:
$ rpm2cpio ../mariadb-devel-10.0.15-4.fc21.x86_64.rpm |cpio -idmv
$ grep -R hardened *
..
usr/bin/mysql_config-64:cflags="$include -O2 -g -pipe -Wall -Werror=format-security -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 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -fno-delete-null-pointer-checks  -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing  -Wno-uninitialized -DDBUG_OFF " #note: end space!

The same cpio+grep does not finds `hardened` in mariadb-devel-10.0.17-1.fc21.x86_64.rpm (updates-testing).

Comment 3 Honza Horak 2015-03-16 07:42:11 UTC
I see, but it is totally different with the latest build: 10.0.17 (upstream change), which only returns `-I/usr/include/mysql` for `mysql_config --cflags`. 

That seems fine to me, because that is the relevant CFLAGS for mariadb and the rest should be defined by the package it is used in.

Comment 4 Attila Fazekas 2015-03-29 09:53:11 UTC
This is the option C.
We can close this bug when 10.0.17-1.fc21 is promoted to stable.

Comment 5 Jon Dufresne 2015-04-21 22:38:53 UTC
The same issue happens when installing community-mysql-devel on F21. Should this be considered a separate bug or the same?

Comment 6 Honza Horak 2015-05-31 20:28:25 UTC
mariadb-10.0.19-1.fc21 is already stable, so just changing to community-mysql, since the issue is there still..

Comment 7 Fedora Admin XMLRPC Client 2015-08-11 10:02:55 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora End Of Life 2015-11-04 10:54:02 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2015-12-02 09:21:49 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.