Last Updated: February 25, 2016
·
836
· ruurd

Fix building mysql2 native extension on OS X

Homebrew introduces after mysql-5.6.10 two new compiler flags in mysql_config that conflict with the gcc42 compiler needed to build gems against ruby-1.9.3. Building them against ruby-2.0.0 does not produce problems. This is logical because the latter uses the llvm compiler instead of the gcc42 compiler to build native extensions.

The solution is to (temporarily) remove the -Wno-null-conversion -Wno-unused-private-field flags from the cflags and cxxflags in the mysql_config script located in /usr/ocal/Cellar/mysql-5.6.12/bin/ directory.

1 Response
Add your response

over 1 year ago ·