在 OpenIndiana 151 上安装 MySql2 gem
我尝试在 OpenIndiana 151 上安装 mysql2 gem,但没有成功:(
我安装了 MySQL 5.1 服务器/客户端/库软件包:
$ pkg list | grep mysql
database/mysql-51 5.1.37-0.151.1 installed -----
database/mysql-51/library 5.1.37-0.151.1 installed -----
database/mysql-common 0.5.11-0.151.1 installed -----
但是当我尝试安装 gem 时:
gem install mysql2 -v '0.2.17' -- --with-mysql-config=/usr/mysql/5.1/bin/mysql_config
我得到以下输出:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/home/aburns/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb --with-mysql-config=/usr/mysql/5.1/bin/mysql_config
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... no
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
creating Makefile
make
gcc -I. -I/home/aburns/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i386-solaris2.11 -I/home/aburns/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/aburns/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -I/home/aburns/.rvm/usr/include -D_FILE_OFFSET_BITS=64 -I/usr/mysql/5.1/include/mysql -xprefetch=auto -xprefetch_level=3 -mt -fns=no -fsimple=1 -xbuiltin=%all -xlibmil -xlibmopt -xnorunpath -DHAVE_RWLOCK_T -DUNIV_SOLARIS -fPIC -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -fPIC -Wall -funroll-loops -o mysql2_ext.o -c mysql2_ext.c
gcc: language norunpath not recognized
gcc: mysql2_ext.c: linker input file unused because linking not done
[[ snip dependent compile errors ]]
gcc: mysql2_ext.o: No such file or directory
gcc: result.o: No such file or directory
gcc: client.o: No such file or directory
make: *** [mysql2.so] Error 1
Gem files will remain installed in /home/aburns/.rvm/gems/ruby-1.9.2-p290@quibbler/gems/mysql2-0.2.17 for inspection.
Results logged to /home/aburns/.rvm/gems/ruby-1.9.2-p290@quibbler/gems/mysql2-0.2.17/ext/mysql2/gem_make.out
如您所见,GCC 失败并显示gcc: language norunpath not recognize
我对我们的原生 gem 构建不够熟悉,
根据我的研究,我认为 norunpath
是。 GCC 不支持的 Sun 特定标志;但是我不确定如何删除它,或者是否可以删除它,
请告知。
I am attempting to install the mysql2 gem on OpenIndiana 151 without success :(
I have the MySQL 5.1 server/client/library packages installed:
$ pkg list | grep mysql
database/mysql-51 5.1.37-0.151.1 installed -----
database/mysql-51/library 5.1.37-0.151.1 installed -----
database/mysql-common 0.5.11-0.151.1 installed -----
But when I attempt to install the gem:
gem install mysql2 -v '0.2.17' -- --with-mysql-config=/usr/mysql/5.1/bin/mysql_config
I get the following output:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/home/aburns/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb --with-mysql-config=/usr/mysql/5.1/bin/mysql_config
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... no
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
creating Makefile
make
gcc -I. -I/home/aburns/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i386-solaris2.11 -I/home/aburns/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/aburns/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -I/home/aburns/.rvm/usr/include -D_FILE_OFFSET_BITS=64 -I/usr/mysql/5.1/include/mysql -xprefetch=auto -xprefetch_level=3 -mt -fns=no -fsimple=1 -xbuiltin=%all -xlibmil -xlibmopt -xnorunpath -DHAVE_RWLOCK_T -DUNIV_SOLARIS -fPIC -O3 -g -Wall -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -fPIC -Wall -funroll-loops -o mysql2_ext.o -c mysql2_ext.c
gcc: language norunpath not recognized
gcc: mysql2_ext.c: linker input file unused because linking not done
[[ snip dependent compile errors ]]
gcc: mysql2_ext.o: No such file or directory
gcc: result.o: No such file or directory
gcc: client.o: No such file or directory
make: *** [mysql2.so] Error 1
Gem files will remain installed in /home/aburns/.rvm/gems/ruby-1.9.2-p290@quibbler/gems/mysql2-0.2.17 for inspection.
Results logged to /home/aburns/.rvm/gems/ruby-1.9.2-p290@quibbler/gems/mysql2-0.2.17/ext/mysql2/gem_make.out
As you can see GCC fails with the gcc: language norunpath not recognized.
I am not familiar enough with GCC our native gem building to know what to do next.
Based on my research I think norunpath
is a Sun specific flag that GCC does not support; however I am not sure how, or even if, I can remove it.
Please advise.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在我的 博客 上写了相关内容不久前:
I wrote about it on my blog a while ago: