问题描述
我用自制软件(Linux移植)安装freetds的,我试图部署/包安装与宝石tinytds我的应用程序。我在做捆绑安装时出现此错误输出
安装tiny_tds(0.5.1)与原生扩展
宝石::安装:: ExtensionBuildError:错误:打造宝石原生扩展失败。
/home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb
在/ usr /斌/劳工处:/opt/homebrew/lib/libsybdb.a(dblib.o):对创建共享目标的时候`.RODATA'不能用于搬迁R_X86_64_32;重新编译-fPIC
/opt/homebrew/lib/libsybdb.a:看不懂的符号:错误的价值
pretty的类似于此的修复,但我没有在我的文件夹中所提到的文件:的http:// stackoverflow.com/a/7119224/1130736
自制lib文件夹的内容:
的/ opt /自制/ lib目录$ LS
libct.a libsybdb.a
完全错误转储:
完全错误转储:
安装tiny_tds(0.5.1)与原生扩展
宝石::安装:: ExtensionBuildError:错误:打造宝石原生扩展失败。
/home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb
检查iconv_open子()在iconv.h ...是的
检查sybfront.h ...是的
检查sybdb.h ...是的
检查tdsdbopen()在-lsybdb ...是的
检查ct_bind()在-lct ...是的
创建的Makefile
使
在/ usr /斌/ gcc的-I。 -I /家庭/部署/ .rbenv /版本/ 1.9.2-P290 /有/红宝石-1.9.1 / x86_64的Linux的-I /家庭/部署/ .rbenv /版本/ 1.9.2-P290 /有/红宝石-1.9.1 /红宝石/后-I /家庭/部署/ .rbenv /版本/ 1.9.2-P290 /有/红宝石1.9.1 -I。 -DHAVE_ICONV_OPEN -DHAVE_SYBFRONT_H -DHAVE_SYBDB_H -I /选择/自制/包括-I在/ usr / local / include目录-I / usr / include目录-I'/家庭/部署/ .rbenv /版本/ 1.9.2-P290 /包括' - 子卡-O3 -ggdb -Wextra -Wno-未使用的参数-Wno-括号-Wpointer-ARITH -Wwrite弦-Wno缺失场-初始化-Wno-长隆-o client.o -c client.c
client.c:在函数'tinytds_err_handler:
client.c:52:警告:指针目标类型的初始化丢弃预选赛
client.c:在函数'tinytds_msg_handler:
client.c:100:警告:指针目标类型的初始化丢弃预选赛
在/ usr /斌/ gcc的-I。 -I /家庭/部署/ .rbenv /版本/ 1.9.2-P290 /有/红宝石-1.9.1 / x86_64的Linux的-I /家庭/部署/ .rbenv /版本/ 1.9.2-P290 /有/红宝石-1.9.1 /红宝石/后-I /家庭/部署/ .rbenv /版本/ 1.9.2-P290 /有/红宝石1.9.1 -I。 -DHAVE_ICONV_OPEN -DHAVE_SYBFRONT_H -DHAVE_SYBDB_H -I /选择/自制/包括-I在/ usr / local / include目录-I / usr / include目录-I'/家庭/部署/ .rbenv /版本/ 1.9.2-P290 /包括' - 子卡-O3 -ggdb -Wextra -Wno-未使用的参数-Wno-括号-Wpointer-ARITH -Wwrite弦-Wno缺失场-初始化-Wno-长隆-o result.o -c result.c
在/ usr /斌/ gcc的-I。 -I /家庭/部署/ .rbenv /版本/ 1.9.2-P290 /有/红宝石-1.9.1 / x86_64的Linux的-I /家庭/部署/ .rbenv /版本/ 1.9.2-P290 /有/红宝石-1.9.1 /红宝石/后-I /家庭/部署/ .rbenv /版本/ 1.9.2-P290 /有/红宝石1.9.1 -I。 -DHAVE_ICONV_OPEN -DHAVE_SYBFRONT_H -DHAVE_SYBDB_H -I /选择/自制/包括-I在/ usr / local / include目录-I / usr / include目录-I'/家庭/部署/ .rbenv /版本/ 1.9.2-P290 /包括' - 子卡-O3 -ggdb -Wextra -Wno-未使用的参数-Wno-括号-Wpointer-ARITH -Wwrite弦-Wno缺失场-初始化-Wno-长隆-o tiny_tds_ext.o -c tiny_tds_ext.c
在/ usr /斌/ GCC -shared -o tiny_tds.so client.o result.o tiny_tds_ext.o -L。 -L /家庭/部署/ .rbenv /版本/ 1.9.2-P290 / lib目录轮候册,-R /家庭/部署/ .rbenv /版本/ 1.9.2-P290 / lib目录-L /家庭/部署/ .rbenv /versions/1.9.2-p290/lib轮候册,-R /家庭/部署/ .rbenv /版本/ 1.9.2-P290 / lib目录-L /选择/自制/ lib目录轮候册,-R /选择/自制/ LIB -L / usr / lib目录轮候册,-R / usr / lib目录-L。 -L'/家庭/部署/ .rbenv /版本/ 1.9.2-P290 / lib目录-rdynamic -Wl,-export动态-lct -lsybdb -lpthread -lrt -ldl -lcrypt -lm -lc
在/ usr /斌/劳工处:/opt/homebrew/lib/libsybdb.a(dblib.o):对创建共享目标的时候`.RODATA'不能用于搬迁R_X86_64_32;重新编译-fPIC
/opt/homebrew/lib/libsybdb.a:看不懂的符号:错误的价值
collect2:劳工处返回1退出状态
使:*** [tiny_tds.so]错误1
宝石文件将保留安装在/home/deployer/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/tiny_tds-0.5.1进行检查。
结果记录到/home/deployer/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/tiny_tds-0.5.1/ext/tiny_tds/gem_make.out
在安装tiny_tds(0.5.1)发生了错误,并捆扎机无法继续。
确保`创业板安装tiny_tds -v0.5.1'`捆绑之前成功。
我运行Fedora的,但对我来说,解决办法是
须藤yum的安装freetds的-devel软件包
我是pretty的肯定,你只需要有freetds的这个开发包工作。之后我有devel包,我
创业板安装tiny_tds
完美。
I used homebrew (linux port) to install freeTDS and am trying to deploy /bundle install my app with gem tinytds. I get this error output when doing bundle install
Installing tiny_tds (0.5.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb
/usr/bin/ld: /opt/homebrew/lib/libsybdb.a(dblib.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/homebrew/lib/libsybdb.a: could not read symbols: Bad value
Pretty similar to this fix, but I don't have the files referred to in my folder: http://stackoverflow.com/a/7119224/1130736
Contents of homebrew lib folder:
/opt/homebrew/lib$ ls
libct.a libsybdb.a
Full error dump:
full error dump:
Installing tiny_tds (0.5.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... yes
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... yes
checking for ct_bind() in -lct... yes
creating Makefile
make
/usr/bin/gcc -I. -I/home/deployer/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/deployer/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/deployer/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_ICONV_OPEN -DHAVE_SYBFRONT_H -DHAVE_SYBDB_H -I/opt/homebrew/include -I/usr/local/include -I/usr/include -I'/home/deployer/.rbenv/versions/1.9.2-p290/include' -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o client.o -c client.c
client.c: In function ‘tinytds_err_handler’:
client.c:52: warning: initialization discards qualifiers from pointer target type
client.c: In function ‘tinytds_msg_handler’:
client.c:100: warning: initialization discards qualifiers from pointer target type
/usr/bin/gcc -I. -I/home/deployer/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/deployer/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/deployer/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_ICONV_OPEN -DHAVE_SYBFRONT_H -DHAVE_SYBDB_H -I/opt/homebrew/include -I/usr/local/include -I/usr/include -I'/home/deployer/.rbenv/versions/1.9.2-p290/include' -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o result.o -c result.c
/usr/bin/gcc -I. -I/home/deployer/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/deployer/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/deployer/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -DHAVE_ICONV_OPEN -DHAVE_SYBFRONT_H -DHAVE_SYBDB_H -I/opt/homebrew/include -I/usr/local/include -I/usr/include -I'/home/deployer/.rbenv/versions/1.9.2-p290/include' -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o tiny_tds_ext.o -c tiny_tds_ext.c
/usr/bin/gcc -shared -o tiny_tds.so client.o result.o tiny_tds_ext.o -L. -L/home/deployer/.rbenv/versions/1.9.2-p290/lib -Wl,-R/home/deployer/.rbenv/versions/1.9.2-p290/lib -L/home/deployer/.rbenv/versions/1.9.2-p290/lib -Wl,-R/home/deployer/.rbenv/versions/1.9.2-p290/lib -L/opt/homebrew/lib -Wl,-R/opt/homebrew/lib -L/usr/lib -Wl,-R/usr/lib -L. -L'/home/deployer/.rbenv/versions/1.9.2-p290/lib' -rdynamic -Wl,-export-dynamic -lct -lsybdb -lpthread -lrt -ldl -lcrypt -lm -lc
/usr/bin/ld: /opt/homebrew/lib/libsybdb.a(dblib.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/homebrew/lib/libsybdb.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [tiny_tds.so] Error 1
Gem files will remain installed in /home/deployer/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/tiny_tds-0.5.1 for inspection.
Results logged to /home/deployer/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/tiny_tds-0.5.1/ext/tiny_tds/gem_make.out
An error occured while installing tiny_tds (0.5.1), and Bundler cannot continue.
Make sure that `gem install tiny_tds -v '0.5.1'` succeeds before bundling.'
I run fedora, but the fix for me is
sudo yum install freetds-devel
I am pretty sure that you just need to have the development package of freetds for this to work. After I had the devel package, my
gem install tiny_tds
worked perfectly.
这篇关于家酿/ TinyTDS / freetds的包错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!