Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Brew won't compile Sphinx with MySQL support #16073

Closed
brennovich opened this issue Nov 14, 2012 · 5 comments
Closed

Brew won't compile Sphinx with MySQL support #16073

brennovich opened this issue Nov 14, 2012 · 5 comments
Assignees

Comments

@brennovich
Copy link

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
Copy link

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.

@brennovich
Copy link
Author

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?

@ghost ghost assigned adamv Dec 15, 2012
@adamv
Copy link
Contributor

adamv commented Dec 15, 2012

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

@adamv adamv closed this as completed in dbe847e Dec 15, 2012
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
@Bounga
Copy link
Contributor

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
Copy link
Contributor

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.

#16840

@Homebrew Homebrew 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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants