 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Kubo Takehiro
RE: oci8 cygwin make error both gem and make [ reply ] 2010-09-04 06:16
|
Add '#undef boolean' between '#include "oci8.h"' and '#include <windows.h>' to ext/oci8/win32.c as follows:
#include "oci8.h"
#undef boolean /******* Add this line *******/
#include <windows.h>
Latest windows.h in cygwin defines boolean as unsigned char, but Oracle defines it as int. The conflict blocked the compilation.
|
By: Don Hill
oci8 cygwin make error both gem and make [ reply ] 2010-09-03 19:10
|
I am trying to gem install ruby-oci8 and amd getting the following error. Here are the values as required to troubleshoot. Th error seems to be
------------------------------------------------
gcc -I. -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/tmp/ruby-oci8-2.0.4/ext/oci8 -DRUBY_EXTCONF_H=\"extconf.h\" -g -O2 "
-I/cygdrive/D/apps/oraclexe/app/oracle/product/10.2.0/server/OCI/INCLUDE" -D_int64="long long" -Wall -c oranumber_util.
c
gcc -I. -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/tmp/ruby-oci8-2.0.4/ext/oci8 -DRUBY_EXTCONF_H=\"extconf.h\" -g -O2 "
-I/cygdrive/D/apps/oraclexe/app/oracle/product/10.2.0/server/OCI/INCLUDE" -D_int64="long long" -Wall -c win32.c
In file included from /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/objbase.h:4,
from /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/ole2.h:9,
from /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/windows.h:114,
from win32.c:8:
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/rpcndr.h:52: error: two or more data types in declaration s
pecifiers
win32.c: In function `enum_homes_real':
win32.c:87: warning: pointer targets in passing argument 5 of `RegQueryValueExA' differ in signedness
win32.c:94: warning: pointer targets in passing argument 5 of `RegQueryValueExA' differ in signedness
make[1]: *** [win32.o] Error 1
make[1]: Leaving directory `/tmp/ruby-oci8-2.0.4/ext/oci8'
'system make ' failed
Try 'ruby setup.rb --help' for detailed usage.
make: *** [setup] Error 1
------------------------------------------------
$ tail -100 ext/oci8/mkmf.log
/* end */
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/tmp/ruby-oci8-2.0.4/ext/oci8 -g -O2 "-I/cygdrive/D/apps/or
aclexe/app/oracle/product/10.2.0/server/OCI/INCLUDE" -D_int64="long long" -Wall conftest.c -L. -L/usr/lib -L. -L. -
lOCI -lruby-static -L. -lOCI -ldl -lcrypt "
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/usr/lib/ruby/1.8/i386-cygwin -I/tmp/ruby-oci8-2.0.4/ext/oci8 -g -O2 "-I/cygdrive/D/apps/oraclexe/ap
p/oracle/product/10.2.0/server/OCI/INCLUDE" -D_int64="long long" -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/usr/lib/ruby/1.8/i386-cygwin -I/tmp/ruby-oci8-2.0.4/ext/oci8 -g -O2 "-I/cygdrive/D/apps/oraclexe/ap
p/oracle/product/10.2.0/server/OCI/INCLUDE" -D_int64="long long" -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 -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/tmp/ruby-oci8-2.0.4/ext/oci8 -g -O2 "-I/cygdrive/D/apps/oraclexe/app/o
racle/product/10.2.0/server/OCI/INCLUDE" -D_int64="long long" -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 -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/tmp/ruby-oci8-2.0.4/ext/oci8 -g -O2 "-I/cygdrive/D/apps/oraclexe/app/o
racle/product/10.2.0/server/OCI/INCLUDE" -D_int64="long long" -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 -o conftest -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/tmp/ruby-oci8-2.0.4/ext/oci8 -g -O2 "-I/cygdrive/D/apps/or
aclexe/app/oracle/product/10.2.0/server/OCI/INCLUDE" -D_int64="long long" -Wall conftest.c -L. -L/usr/lib -L. -L. -
lOCI -lruby-static -L. -lOCI -ldl -lcrypt "
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 -o conftest -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/tmp/ruby-oci8-2.0.4/ext/oci8 -g -O2 "-I/cygdrive/D/apps/or
aclexe/app/oracle/product/10.2.0/server/OCI/INCLUDE" -D_int64="long long" -Wall conftest.c -L. -L/usr/lib -L. -L. -
lOCI -lruby-static -L. -lOCI -ldl -lcrypt "
conftest.c: In function `t':
conftest.c:5: warning: implicit declaration of function `rb_errinfo'
/tmp/ccR5QsC8.o: In function `t':
/tmp/ruby-oci8-2.0.4/ext/oci8/conftest.c:5: 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 */
--------------------
$ ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
$ ruby -r rbconfig -e "p Config::CONFIG['host']"
"i686-pc-cygwin"
$ ruby -r rbconfig -e "p Config::CONFIG['CC']"
"gcc"
$ ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']"
"-g -O2 "
$ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']"
"gcc -shared -s"
$ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']"
"-L. "
$ruby -r rbconfig -e "p Config::CONFIG['DLDLAGS']"
nil
$ruby -r rbconfig -e "p Config::CONFIG['LIBS']"
"-ldl -lcrypt "
$ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']"
"yes"
-------------------------------------------------
$ gcc --print-prog-name=ld
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld.exe
$gcc --print-prog-name=as
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/as.exe
-----------------------------------------------
|
|
 |