I've managed to get the installation of go-oci8 down to a fairly simple 
shell script. But it is difficult to get going at first. Here's a few 
pointers (off the top of my head - I'm not at work and don't have the 
actual script at hand)


   - Get Msys2 for windows, install it and update it with pacman -Syyu.
   - In a Msys2 shell, install (via pacman) the msys gcc 64bit compiler 
   suite, git (so you can run go get from msys), vim/emacs/[other editor of 
   choice], and importantly for go-oci, pkgconfig
   - Ensure that your GOROOT variable is in the Msys2 path - export 
   PATH=$PATH:$GOROOT/bin - in ~/.bashrc or ~/.bash_profile
   - Download the oracle instant client basic AND sdk, extract the Basic to 
   a folder, and the SDK to the same folder to merge it.
   - You need to set your INCLUDE_PATH and your LIBRARY_PATH to add in the 
   include and lib folders for your instantclient (I think they're in 
   instantclient_12_2/sdk or something like that
   - Then run go get github.com/mattn/go-oci8 and it'll attempt to install 
   and it will fail.
   - copy the oci8.pc file from GOPATH/src/github.com/mattn/go-oci8 to 
   /usr/share/pkgconfig and amend it according to what's in the installation 
   readme
      - Essentially you need to amend the pkgconfig to add in the correct 
      refs to the includes and libs
   - Now re run go get GitHub.com/mattn/go-oci8 and all being good, it 
   should compile.

Note: You will need a number of the instant client dll's alongside your 
executable, and you may need msvcrt120.dll (I think) or at the very least 
in the system path when you deploy it.

Once you've got this working, I suggest you also look at rana/ora as well 
for Oracle.

This should give you a little to be going on with - I can probably update 
this a bit more formally once I've looked at my auto install script when 
I'm back in work tomorrow

Hope this helps

Calum


On Saturday, 18 November 2017 16:09:46 UTC, san...@banerji.in wrote:
>
> First, let me thank the person who has written the Oracle (oci8) package 
> for Go (preferred over the other Oracle package).
>
>
> However, it seems difficult to install, on Windows at least.  Google-ing 
> for help did not give a solution.  I am less than 7 hours old in Go, so 
> perhaps after soldering on, I will eventually get to install it.
>
> If Go would like to entrench itself even more, perhaps appealing to 
> corporate users would be a good idea.  This means that installing linkages 
> to databases used by corporates, such as Oracle, should be a breeze.
>
>
> Next, looking at the functions in oci8, they seem a bit kludgy.  Coming 
> from the Perl world, Go/oci8 does not look as easy as Perl/Oracle. Perhaps 
> I have not internalised the "Go way" as yet.
>
>
> I am sending this hoping for help in oci8 installation.  And for eventual 
> revamp of the package for easier installation.
>
>
> Sanjay
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to