 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Gerardo Santana Gómez Garrido
RE: gem installation fails [ reply ] 2008-06-12 14:49
|
That's all Tim, I'm sorry for the inconvenience. Your patch program is fine, I just made it against HEAD.
I'll try to release 0.7.2 soon to fix this problem when using it with Informix 7.x
Thanks for trying Ruby/Informix, don't hesitate to mail me if you have questions.
|
By: Tim E
RE: gem installation fails [ reply ] 2008-06-12 12:52
|
There might be something wrong w/my version of patch. But the incomplete patch failed to apply again. I did the same thing as with the other failed patch. Removed and added lines as necessary. I then searched for "extended_id" in informixc.ec and removed that reverence from the sql query.
It now connects just fine. Is there anything else that I'll need to do?
|
By: Tim E
RE: gem installation fails [ reply ] 2008-06-11 12:44
|
Connection now fails. Because of how the informix server is set up, I have to use the path of the DB, and not just the DB name (throws and error if if I use the DB name).
-------------------------------------------------
#!/usr/bin/ruby -w
require 'informix'
db = Informix.connect('optim/informix_dbs/optim','un','pw')
db.close
-------------------------------------------------
/usr/lib64/ruby/gems/1.8/gems/ruby-informix-0.7.1/lib/informix.rb:101: warning: too many arguments for format string
/usr/lib64/ruby/gems/1.8/gems/ruby-informix-0.7.1/lib/informix.rb:101:in `initialize': Column (extended_id) not found in any table in the query (or SLV is undefined). (Informix::DatabaseError)
from /usr/lib64/ruby/gems/1.8/gems/ruby-informix-0.7.1/lib/informix.rb:101:in `new'
from /usr/lib64/ruby/gems/1.8/gems/ruby-informix-0.7.1/lib/informix.rb:101:in `open'
from /usr/lib64/ruby/gems/1.8/gems/ruby-informix-0.7.1/lib/informix.rb:58:in `connect'
from ./ifx.rb:5
|
By: Tim E
RE: gem installation fails [ reply ] 2008-06-10 19:16
|
If I simply remove the lines specified in the patch file. make succeeds.
However, make install only installs the informix, no ruby files. So ruby throws an error when try to include the library with
require 'informix'
Here is the output
---------------------------------------------------
# make
x86_64-pc-linux-gnu-gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -I/opt/IBM/informix/incl/esql -fPIC -O2 -pipe -fno-strict-aliasing -fPIC -c informixc.c
x86_64-pc-linux-gnu-gcc -shared -o informixc.so informixc.o -L'.' -L'/usr/lib64' -Wl,-R'/usr/lib64' -L'/opt/IBM/informix/lib' -Wl,-R'/opt/IBM/informix/lib' -L'/opt/IBM/informix/lib/esql' -Wl,-R'/opt/IBM/informix/lib/esql' -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/lib64 -L/usr/lib64 -lruby18 -lifsql -lifasf -lifgen -lifos -lifgls /opt/IBM/informix/lib/esql/checkapi.o -ldl -lcrypt -lm -lc
# make install
/usr/bin/install -c -m 0755 informixc.so /usr/lib64/ruby/site_ruby/1.8/x86_64-linux
# irb
irb(main):001:0> require 'informix'
LoadError: no such file to load -- informix
from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from (irb):1
irb(main):002:0>
|
By: Tim E
RE: gem installation fails [ reply ] 2008-06-10 18:39
|
The patched did not apply successfully. Thanks for your quick reply!
---------------------------------------------------
# pwd
/usr/lib64/ruby/gems/1.8/gems/ruby-informix-0.7.1
# patch -p1 < informix.patch
patching file ext/informixc.ec
patch: **** malformed patch at line 4: static VALUE rb_cSequentialCursor, rb_cScrollCursor, rb_cInsertCursor;
|
By: Gerardo Santana Gómez Garrido
RE: gem installation fails [ reply ] 2008-06-10 14:49
|
Hi Tim,
does this patch work for you?
--- a/ext/informixc.ec
+++ b/ext/informixc.ec
@@ -46,8 +46,6 @@ static VALUE rb_cStatement, rb_cCursorBase;
static VALUE rb_cSequentialCursor, rb_cScrollCursor, rb_cInsertCursor;
static VALUE rb_cIfxVersion;
-static VALUE rb_cArray;
-
/* Exceptions */
static VALUE rb_eError, rb_eWarning, rb_eInternalError;
static VALUE rb_eProgrammingError, rb_eOperationalError, rb_eDatabaseError;
@@ -3370,8 +3368,6 @@ void Init_informixc(void)
rb_define_singleton_method(rb_mCursor, "new0", rb_cursor_s_new0, -1);
/* Global constants ---------------------------------------------------
- rb_cArray = rb_const_get(rb_cObject, rb_intern("Array"));
-
rb_require("date");
rb_cDate = rb_const_get(rb_cObject, rb_intern("Date"));
|
By: Tim E
gem installation fails [ reply ] 2008-06-10 13:14
|
I'm running x86_64 Gentoo. Here is the command and output and environment variables. I have connectivity to the ifx db with isql and ODBC.
-------------------------------------------------
Command and output
# gem install ruby-informix
Bulk updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (x86_64-linux)
1. ruby-informix 0.7.1 (i386-mswin32)
2. ruby-informix 0.7.1 (ruby)
3. ruby-informix 0.7.0 (ruby)
4. ruby-informix 0.7.0 (i386-mswin32)
5. Skip this gem
6. Cancel installation
> 2
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.
ruby extconf.rb install ruby-informix
creating Makefile
make
x86_64-pc-linux-gnu-gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -I/opt/IBM/informix/incl/esql -fPIC -O2 -pipe -fno-strict-aliasing -fPIC -c informixc.c
informixc.ec:52: error: static declaration of 'rb_cArray' follows non-static declaration
/usr/lib64/ruby/1.8/x86_64-linux/ruby.h:607: error: previous declaration of 'rb_cArray' was here
make: *** [informixc.o] Error 1
Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/ruby-informix-0.7.1 for inspection.
Results logged to /usr/lib64/ruby/gems/1.8/gems/ruby-informix-0.7.1/ext/gem_make.out
-----------------------------------------------
Environment Variables
INFORMIXDIR=/opt/IBM/informix
PATH=/opt/IBM/informix/bin
ODBCINI=/etc/unixODBC/odbc.ini
INFORMIXSERVER=optim
LDPATH="/opt/IBM/informix/lib
/opt/IBM/informix/lib/esql
/opt/IBM/informix/lib/cli
/opt/IBM/informix/lib/client"
|
|
 |