mysql - "Failed to build gem native extension" error when installing mysql2 on mac -
this question has answer here:
i installing mysql2 in terminal on mac there error message. know how solve problem? lot!
my osx version 10.9 , have installed xcode , command line tool.
joe@~ $sudo gem install mysql2 password: building native extensions. take while... error: error installing mysql2: error: failed build gem native extension. /system/library/frameworks/ruby.framework/versions/2.0/usr/bin/ruby extconf.rb checking ruby/thread.h... yes checking rb_thread_call_without_gvl() in ruby/thread.h... yes checking rb_thread_blocking_region()... yes checking rb_wait_for_single_fd()... yes checking rb_hash_dup()... yes checking rb_intern3()... yes ----- using mysql_config @ /usr/local/bin/mysql_config ----- checking mysql.h... yes checking errmsg.h... yes checking mysqld_error.h... yes ----- setting rpath /usr/local/cellar/mysql/5.6.17/lib ----- creating makefile make "destdir=" compiling client.c compiling infile.c compiling mysql2_ext.c compiling result.c linking shared-object mysql2/mysql2.bundle clang: error: unknown argument: '-multiply_definedsuppress' [-wunused-command-line-argument-hard-error-in-future] clang: note: hard error (cannot downgraded warning) in future make: *** [mysql2.bundle] error 1 gem files remain installed in /library/ruby/gems/2.0.0/gems/mysql2-0.3.15 inspection. results logged /library/ruby/gems/2.0.0/gems/mysql2-0.3.15/ext/mysql2/gem_make.out
the error message says, `clang: error: unknown argument: '-multiply_definedsuppress' [-wunused-command-line-argument-hard-error-in-future]
. seems option '-multiply_definedsuppress'
not accepted option compiler when installing it. need make compiler accept time being.
according xcode 5.1 release notes:
the apple llvm compiler in xcode 5.1 treats unrecognized command-line options errors. issue has been seen when building both python native extensions , ruby gems, invalid compiler options specified. projects using invalid compiler options need changed remove options. ease transition, compiler temporarily accept option downgrade error warning: -wno-error=unused-command-line-argument-hard-error-in-future
therefore, may want try running:
archflags=-wno-error=unused-command-line-argument-hard-error-in-future gem install mysql2
Comments
Post a Comment