rana/ora

Error during go get

wegoodwin opened this issue · 6 comments

Hi,

Have a windows 7 64 bit machine. I am trying to install the ora library with the following command:

go get gopkg.in/rana/ora.v4

I get the following error:

gopkg.in/rana/ora.v4

C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/instantclient_12_2/sdk/lib/msvc/oci.lib when searching for -loci
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/instantclient_12_2/sdk/lib/msvc/oci.lib when searching for -loci
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/instantclient_12_2/sdk/lib/msvc\oci.lib when searching for -loci
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -loci
collect2.exe: error: ld returned 1 exit status

Any help would be greatly appreciated.

I don't know the asnwer, it seems that the pkg-config skips the installed InstantClient 's oci.lib.
Maybe you have a 32bit InstantClient, and want to compile a 64bit ora ?

Use gopkg.in/goracle.v2, that compiles without InstantClient, finds it at runtime. And maintained.

@tgulacsi

I have issues with goracle so that is why I am trying to use another library. I removed the instant client directories and re-downloaded the 64 bit versions. I followed the advice of the following url:

https://medium.com/@darkgaizers/how-to-connect-go-to-oracle-64-bit-9ab03fc0f0c

and now I am getting the error:

image

I feel like I am pretty close to getting this issue resolved. Have you seen this error before?

@tgulacsi
I am also getting this warning when I do a build:

gcc: warning: C:\instantclient_12_2\sdk\include: linker input file unused because linking not done

There must be some OCI.dll in your path that is an old one, without OCIBindByName2.

I removed several other oracle paths from my path and I put C:\instantclient_12_2 at the beginning of my path. However I am still getting the same error. Does the warning:

gcc: warning: C:\instantclient_12_2\sdk\include: linker input file unused because linking not done

mean anything at all?

@tgulacsi

I finally got it to compile. I simply did a restart and that seemed to work. Interesting because I thought if you modify the path or environment variables in windows you didn't need to do a restart, you only had to close and reopen the command prompt.