Skip to content

MySQL “unrecognized command line option '-aes'” with ruby 1.9.3-p125 #245

ylluminate opened this Issue Feb 28, 2012 · 6 comments

3 participants


I have just recently installed ruby 1.9.3-p125 on Mac OS X. I use rvm for ruby mgmt and homebrew for mysql, etc. I have Xcode 4.3 with command line tools installed as Apple has them packaged now.

Oddly I've hit an odd issue with p125 that does not seem to happen at all on p0 and was hoping for some insight into what may be happening here:

Perhaps this is a combinatorial effect perhaps of ruby 1.9.3-p125, mysql2 and perhaps the new Xcode 4.3... ?

If I remove the -aes from the mysql2 Makefile it will build and install just fine.

If I brew remove --force mysql && brew install mysql --use-clang it seems to install just fine with the -aes option, however this is quite a burdensome step to take as I've had to reinstall the gem a couple of times.

I'm hoping to get to the bottom of what may be going on here.


I actually just had a co-worker hit the same exact error. No idea where the -aes option is even coming from. Definitely let me know if you track something down.

Thanks for reporting!


Thanks @brianmario. Could you please explain a little about how to pry open the "creating Makefile" process of the gem install? It appears that I need to poke around in there to see where this is coming from. Presently it creates a new Makefile each time with the -aes in place when you do a bundle install and so it's quite maddening. I'd very much like to figure out where this is coming into the picture tonight.


I'm pretty sure the only place where anything is happening with the Makefile itself is the last line of extconf.rb where the Makefile is actually created.

The -aes option may be something new that 1.9.3-p125 added and simultaneously the new gcc that came with XCode 4.3 dropped?


Wellll... I started a thread here with the homebrew folks here and interestingly you'll see that it's in my env. I think perhaps you may wish to chime in there.


You can see the quick solution there right now if you'd like on that last link. Turns out that you can remove the -aes flag from the mysql_config ("edit which mysql_config") and it will do the trick for the moment.



I commented about why this is failing over on the homebrew thread.

TL;DR Gems are compiled with whatever compiler was used to compile Ruby. Don't mix compilers; if you plan to use mysql with clang, make sure you install Ruby with clang.

To find your current compiler, run this command:

ruby -v -rrbconfig -e"p RbConfig::CONFIG['CC']"

Hope that helps!

@tenderlove tenderlove closed this Mar 28, 2012
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.