 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Kubo Takehiro
RE: Forcing use of 32 bit cc [ reply ] 2010-12-07 11:39
|
> times(NULL) = -1930357195
Could you ask to your oracle support whether your oracle version hits a bug that 32-bit applications hang when the server clock tick is over 2G?
Could you reboot your machine and check whether the issue is gone?
|
By: Ben pellegrini
RE: Forcing use of 32 bit cc [ reply ] 2010-12-07 10:14
|
Hi,
So its a very weird environment, uses Bitnami stack (live a virtual environment - inc 32 bit ruby) running on 64 bit linux red hat.
The strace command returns load of lines of format :
times(NULL) = -1930357195
times(NULL) = -1930357195
times(NULL) = -1930357195
strace, ltrace, pstack and gdb commands are not found.
I have tried upgrading the bitnami stack to 64bit and installed ruby ok and it talks to oracle but I cant get oracle enhanced adapter working with it.
We are also sort of tied into 32 bit for connection to a another db - TERADATA via unixodbc.
Here is the last 100 lines of mkmf.log ...
"gcc -m32 -o conftest -I. -I/appl/apache/dev/development/ruby/lib/ruby/1.8/i686-linux -I/data/bpf/share/dev_systems/ben_dev_systems/RB-2.6/vendor/gem_files/ruby-oci8-2.0.4/ext/oci8 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -D_FILE_OFFSET_BITS=64 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -I/appl/apache/dev/development/common/include -I/appl/oracle/client/10.2.0/rdbms/public -Wall conftest.c -L. -L/appl/apache/dev/development/ruby/lib -Wl,-R/appl/apache/dev/development/ruby/lib -L. -L/appl/apache/dev/development/common/lib -rdynamic -Wl,-export-dynamic -L/appl/oracle/client/10.2.0/lib32 -Wl,-rpath,/appl/oracle/client/10.2.0/lib32 -lclntsh -lruby-static -L/appl/oracle/client/10.2.0/lib32 -Wl,-rpath,/appl/oracle/client/10.2.0/lib32 -lclntsh -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function âtâ:
conftest.c:3: warning: implicit declaration of function âlocaltime_râ
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { localtime_r(); return 0; }
/* end */
--------------------
have_header: checking for intern.h... -------------------- yes
"gcc -E -I. -I/appl/apache/dev/development/ruby/lib/ruby/1.8/i686-linux -I/data/bpf/share/dev_systems/ben_dev_systems/RB-2.6/vendor/gem_files/ruby-oci8-2.0.4/ext/oci8 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -D_FILE_OFFSET_BITS=64 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -I/appl/apache/dev/development/common/include -I/appl/oracle/client/10.2.0/rdbms/public -Wall conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <intern.h>
/* end */
--------------------
have_header: checking for util.h... -------------------- yes
"gcc -E -I. -I/appl/apache/dev/development/ruby/lib/ruby/1.8/i686-linux -I/data/bpf/share/dev_systems/ben_dev_systems/RB-2.6/vendor/gem_files/ruby-oci8-2.0.4/ext/oci8 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -D_FILE_OFFSET_BITS=64 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -I/appl/apache/dev/development/common/include -I/appl/oracle/client/10.2.0/rdbms/public -Wall conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <util.h>
/* end */
--------------------
have_type: checking for rb_encoding in ruby/ruby.h,ruby/encoding.h... -------------------- no
"gcc -m32 -I. -I/appl/apache/dev/development/ruby/lib/ruby/1.8/i686-linux -I/data/bpf/share/dev_systems/ben_dev_systems/RB-2.6/vendor/gem_files/ruby-oci8-2.0.4/ext/oci8 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -D_FILE_OFFSET_BITS=64 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -I/appl/apache/dev/development/common/include -I/appl/oracle/client/10.2.0/rdbms/public -Wall -c conftest.c"
conftest.c:1:23: error: ruby/ruby.h: No such file or directory
conftest.c:2:27: error: ruby/encoding.h: No such file or directory
conftest.c:5: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âconftest_typeâ
conftest.c:6: error: âconftest_typeâ undeclared here (not in a function)
checked program was:
/* begin */
1: #include <ruby/ruby.h>
2: #include <ruby/encoding.h>
3:
4: /*top*/
5: typedef rb_encoding conftest_type;
6: int conftestval[sizeof(conftest_type)?1:-1];
/* end */
--------------------
have_var: checking for ruby_errinfo in ruby.h... -------------------- yes
"gcc -m32 -I. -I/appl/apache/dev/development/ruby/lib/ruby/1.8/i686-linux -I/data/bpf/share/dev_systems/ben_dev_systems/RB-2.6/vendor/gem_files/ruby-oci8-2.0.4/ext/oci8 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -D_FILE_OFFSET_BITS=64 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -I/appl/apache/dev/development/common/include -I/appl/oracle/client/10.2.0/rdbms/public -Wall -c conftest.c"
checked program was:
/* begin */
1: #include <ruby.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { const volatile void *volatile p; p = &(&ruby_errinfo)[0]; return 0; }
/* end */
--------------------
have_func: checking for rb_errinfo() in ruby.h... -------------------- no
"gcc -m32 -o conftest -I. -I/appl/apache/dev/development/ruby/lib/ruby/1.8/i686-linux -I/data/bpf/share/dev_systems/ben_dev_systems/RB-2.6/vendor/gem_files/ruby-oci8-2.0.4/ext/oci8 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -D_FILE_OFFSET_BITS=64 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -I/appl/apache/dev/development/common/include -I/appl/oracle/client/10.2.0/rdbms/public -Wall conftest.c -L. -L/appl/apache/dev/development/ruby/lib -Wl,-R/appl/apache/dev/development/ruby/lib -L. -L/appl/apache/dev/development/common/lib -rdynamic -Wl,-export-dynamic -L/appl/oracle/client/10.2.0/lib32 -Wl,-rpath,/appl/oracle/client/10.2.0/lib32 -lclntsh -lruby-static -L/appl/oracle/client/10.2.0/lib32 -Wl,-rpath,/appl/oracle/client/10.2.0/lib32 -lclntsh -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function âtâ:
conftest.c:5: error: ârb_errinfoâ undeclared (first use in this function)
conftest.c:5: error: (Each undeclared identifier is reported only once
conftest.c:5: error: for each function it appears in.)
checked program was:
/* begin */
1: #include <ruby.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { void ((*volatile p)()); p = (void ((*)()))rb_errinfo; return 0; }
/* end */
"gcc -m32 -o conftest -I. -I/appl/apache/dev/development/ruby/lib/ruby/1.8/i686-linux -I/data/bpf/share/dev_systems/ben_dev_systems/RB-2.6/vendor/gem_files/ruby-oci8-2.0.4/ext/oci8 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -D_FILE_OFFSET_BITS=64 -DAI_ADDRCONFIG=0 -I/appl/apache/dev/development/common/include -I/appl/apache/dev/development/common/include -I/appl/oracle/client/10.2.0/rdbms/public -Wall conftest.c -L. -L/appl/apache/dev/development/ruby/lib -Wl,-R/appl/apache/dev/development/ruby/lib -L. -L/appl/apache/dev/development/common/lib -rdynamic -Wl,-export-dynamic -L/appl/oracle/client/10.2.0/lib32 -Wl,-rpath,/appl/oracle/client/10.2.0/lib32 -lclntsh -lruby-static -L/appl/oracle/client/10.2.0/lib32 -Wl,-rpath,/appl/oracle/client/10.2.0/lib32 -lclntsh -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function âtâ:
conftest.c:5: warning: implicit declaration of function ârb_errinfoâ
/tmp/ccIxGEYB.o: In function `t':
conftest.c:(.text+0x20): undefined reference to `rb_errinfo'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include <ruby.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { rb_errinfo(); return 0; }
/* end */
--------------------
|
By: Kubo Takehiro
RE: Forcing use of 32 bit cc [ reply ] 2010-12-04 22:59
|
What platform do you use?
If it is linux, post the results of following commands:
* run 'top' command and check whether the hung process is consuming CPU.
* run 'strace -p PID_OF_HUNG_PROCESS' and stop it by Control-C after 10 seconds.
* run 'ltrace -p PID_OF_HUNG_PROCESS' and stop it by Control-C after 10 seconds.
* run 'pstack PID_OF_HUNG_PROCESS'. If pstack is not found, run 'gdb `which ruby` PID_OF_HUNG_PROCESS' and then type 'bt' and 'quit'.
|
By: Ben pellegrini
RE: Forcing use of 32 bit cc [ reply ] 2010-12-04 13:41
|
Hi Kubo,
Many thanks for the reply - this has now compiled ok but when I try to use oci8 it just hangs...
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'oci8'
Anyideas where I can look,
Many thanks
Ben
|
By: Kubo Takehiro
RE: Forcing use of 32 bit cc [ reply ] 2010-12-03 06:36
|
Did you use ruby compiled on 32 bit platform?
mkmf.rb gets compiler options from rbconfig.rb in archdir.
ruby -r rbconfig -e "puts Config::CONFIG['archdir']"
Change CC entry in rbconfig.rb as follows:
CONFIG["CC"] = "gcc -m32"
|
By: Ben pellegrini
Forcing use of 32 bit cc [ reply ] 2010-11-30 10:00
|
Hi,
Whilst running make I get :
Error Message:
C compiler doesn't work correctly.
I have 32 oracle client installed, 32 bit ruby and 64 bit machine. Looking at mkmf.log I see this :
/usr/bin/ld: skipping incompatible libruby-static.a when searching for -lruby-static.
I pulled out command to check cc and get same error, if I manually add -m32 flag to gcc it works.
How can I force the make to build in 32 bit mode ?
Nay help / tips gratefully received, struggling to move forward at the moment.
many thanks
Ben
|
|
 |