Brew won't compile Sphinx with MySQL support #16073

brennovich opened this Issue Nov 14, 2012 · 5 comments


None yet

4 participants


With MySQL and Postgres installed when I run brew install sphinx brew dynamically adds without-mysql into args.

./configure --prefix=/usr/local/Cellar/sphinx/2.0.6 --localstatedir=/usr/local/var --with-libstemmer --with-pgsql --without-mysql

After some debugging i realize that build.include?('mysql') and which 'mysql_config' both returns nil.

So, after commented out:

args << "--without-mysql" unless build.include?('mysql') or which 'mysql_config'

and added this:

args << "--with-mysql"

Everything works.

Should MySQL and Postgres be supported default? How can I force MySQL support?

Brew doctor outputs Your system is raring to brew.

Thank You, and sorry for my english.

schlick commented Dec 13, 2012

I had this same problem. Mysql was already installed on my system yet this brew formula didn't think so and configured without mysql. I tried the following and it worked:

brew install sphinx --mysql

Perhaps this command can be added to the Caveats text as an example of how to force a compile against mysql.

Worked! Thanks @schlick.

Curious... If I put --mysql it will throw --with-libstemmer --with-pgsql, but without --mysql option it will throw --with-libstemmer --with-pgsql --without-mysql. Why the behaviour of mysql and postgres are diferent?

@adamv adamv was assigned Dec 15, 2012
adamv commented Dec 15, 2012

Issue because of and vs && differences, and calling which without parens. Posting a fix.

@adamv adamv added a commit that closed this issue Dec 15, 2012
@adamv adamv sphinx: fix database detection
Closes #16073.
@adamv adamv closed this in dbe847e Dec 15, 2012
@snakeyroc3 snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
@adamv adamv sphinx: fix database detection
Closes #16073.
Bounga commented Jan 2, 2013

There's a problem with the formula. If you have PG and MySQL installed on your system there's no way to force Sphinx installation with mysql option. Gonna do a PR for you.

Bounga commented Jan 2, 2013

A pull request is now available to fix this problem when you've both PGsql and MySQL installed on your system.


@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.