Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to build on cygwin 32bit #121

Closed
txdv opened this issue Mar 16, 2016 · 2 comments
Closed

Trying to build on cygwin 32bit #121

txdv opened this issue Mar 16, 2016 · 2 comments

Comments

@txdv
Copy link

txdv commented Mar 16, 2016

I am trying to build the gem on a Windows 7 64bit, cygwin 32bit system, ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-cygwin], I downloaded the 10.2.0.5.0 basic, sdk and sqlplus packages, I got around a few errors, but I'm hitting a wall with OCIEnvCreate:


SQL*Plus: Release 10.2.0.5.0 - Production on Wed Mar 16 11:46:01 2016
have_func: checking for OCIEnvCreate() in oci.h... -------------------- no

"gcc -o conftest.exe -I/usr/include/ruby-2.2.0 -I/usr/include/ruby-2.2.0/ruby/backward -I/usr/include/ruby-2.2.0 -I.    -ggdb -O2 -pipe -Wimplicit-function-declaration   "-I/home/andrius.bentkus/oracle/instantclient_10_2//OCI/INCLUDE" -D_int64="long long" conftest.c  -L. -L/usr/lib -L. -fstack-protector     -L/usr/lib -L. -lOCI -lruby220  -L/usr/lib -L. -lOCI -lpthread -lgmp -ldl -lcrypt  "
/tmp/ccw4fIp1.o: In function `t':
/home/andrius.bentkus/.gem/ruby/gems/ruby-oci8-2.2.1/ext/oci8/conftest.c:15: undefined reference to `OCIEnvCreate'
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
 1: #include "ruby.h"
 2:
 3: #include <oci.h>
 4:
 5: /*top*/
 6: extern int t(void);
 7: int main(int argc, char **argv)
 8: {
 9:   if (argc > 1000000) {
10:     printf("%p", &t);
11:   }
12:
13:   return 0;
14: }
15: int t(void) { void ((*volatile p)()); p = (void ((*)()))OCIEnvCreate; return 0; }
/* end */

"gcc -o conftest.exe -I/usr/include/ruby-2.2.0 -I/usr/include/ruby-2.2.0/ruby/backward -I/usr/include/ruby-2.2.0 -I.    -ggdb -O2 -pipe -Wimplicit-function-declaration   "-I/home/andrius.bentkus/oracle/instantclient_10_2//OCI/INCLUDE" -D_int64="long long" conftest.c  -L. -L/usr/lib -L. -fstack-protector     -L/usr/lib -L. -lOCI -lruby220  -L/usr/lib -L. -lOCI -lpthread -lgmp -ldl -lcrypt  "
conftest.c: In function ‘t’:
conftest.c:15:15: error: too few arguments to function ‘OCIEnvCreate’
 int t(void) { OCIEnvCreate(); return 0; }
               ^
In file included from /home/andrius.bentkus/oracle/instantclient_10_2//OCI/INCLUDE/oci.h:2713:0,
                 from conftest.c:3:
/home/andrius.bentkus/oracle/instantclient_10_2//OCI/INCLUDE/ociap.h:6424:9: note: declared here
 sword   OCIEnvCreate (OCIEnv **envp, ub4 mode, dvoid *ctxp,
         ^
checked program was:
/* begin */
 1: #include "ruby.h"
 2:
 3: #include <oci.h>
 4:
 5: /*top*/
 6: extern int t(void);
 7: int main(int argc, char **argv)
 8: {
 9:   if (argc > 1000000) {
10:     printf("%p", &t);
11:   }
12:
13:   return 0;
14: }
15: int t(void) { OCIEnvCreate(); return 0; }
/* end */
--------------------

It just cant find OCIEnvCreate, although it is defined in the oci.h:

#define OCIEnvCreate               ocienvct

Maybe it doesn't find the pointer first because it is a define? The other time the amount of arugments is just not right os it just fails.

Any insights on the error and how I can circumvent it?

@kubo
Copy link
Owner

kubo commented Mar 16, 2016

Could you check OCI.def created by oraconf.rb whether it includes OCIEnvCreate?

I got around a few errors

What errors did you get around? It might be, perhaps, important.

After you get around the OCIEnvCreate issue, you will hit a next wall reported by #113.
You need to replace three files in the trunk.

@kubo
Copy link
Owner

kubo commented Jan 9, 2017

close this issue because of no response.

@kubo kubo closed this as completed Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants