Bug 916189 - mysql_config --cflags output (from mariadb) contains -I/usr/include/mysql/..
Summary: mysql_config --cflags output (from mariadb) contains -I/usr/include/mysql/..
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-27 14:00 UTC by Mattias Ellert
Modified: 2013-02-28 14:39 UTC (History)
2 users (show)

Fixed In Version: mariadb-5.5.29-7.fc19
Clone Of:
Environment:
Last Closed: 2013-02-28 09:17:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mattias Ellert 2013-02-27 14:00:55 UTC
Description of problem:

# mysql_config --cflags
-I/usr/include/mysql -I/usr/include/mysql/.. .....

Version-Release number of selected component (if applicable):

mariadb-5.5.29-4

Additional info:

/usr/include/mysql/.. is the same as /usr/include. Having -I/usr/include in CFLAGS is not a good idea.

Comment 1 Honza Horak 2013-02-27 16:47:47 UTC
The reason is that we move mysql_config due to multilib issues and then guessing basedir fails. I'd propose adding the following sed that just uses correct %{prefix} macro.

diff --git a/mariadb.spec b/mariadb.spec
index 0bf2f1b..81cc548 100644
--- a/mariadb.spec
+++ b/mariadb.spec
@@ -307,6 +307,10 @@ cat %{SOURCE15} >> mysql-test/rh-skipped-tests.list
 echo "main.gis-precise : rhbz#906367" >> mysql-test/rh-skipped-tests.list
 %endif
 
+# don't guess basedir in mysql_config; we place it under _libdir because
+# of multilib conflicts
+sed -ie "s;basedir=\`echo $me.*$;basedir=%{_prefix};" scripts/mysql_config.sh
+
 # install mysql_plugin
 cp %{SOURCE16} man/

Comment 2 Tom Lane 2013-02-27 17:11:10 UTC
Fix sounds reasonable, but I'd recommend doing it as a patch; sed is a bit too fragile.

Comment 3 Honza Horak 2013-02-28 09:17:15 UTC
I should have mentioned why sed was preferred before patch file -- it was because of using %_prefix macro rather than fixed /usr path. However, there is a better way how to use configured prefix value -- simply use @prefix@. It's already fixed this way in Rawhide.

Comment 4 Mattias Ellert 2013-02-28 13:44:26 UTC
And when can we expext the build to happen?

Comment 5 Honza Horak 2013-02-28 14:39:51 UTC
(In reply to comment #4)
> And when can we expext the build to happen?

I'm doing also some other changes there but I believe I'll submit a build today or tomorrow.


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