Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Brew won't compile Sphinx with MySQL support #16073

Closed
brennovich opened this Issue · 5 comments

4 participants

@brennovich

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

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

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
@adamv
Owner

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

@adamv adamv closed this in dbe847e
@snakeyroc3 snakeyroc3 referenced this issue from a commit in snakeyroc3/homebrew
@adamv adamv sphinx: fix database detection
Closes #16073.
11b865e
@Bounga

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

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

#16840

@gwydirsam gwydirsam referenced this issue from a commit
@adamv adamv sphinx: fix database detection
Closes #16073.
ae0448c
@guyzmo guyzmo referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@cooljeanius cooljeanius referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.