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

collect2.exe: error: ld returned 1 exit status #239

Closed
YaProof opened this issue Dec 20, 2017 · 5 comments
Closed

collect2.exe: error: ld returned 1 exit status #239

YaProof opened this issue Dec 20, 2017 · 5 comments

Comments

@YaProof
Copy link

YaProof commented Dec 20, 2017

Hi.

I'm use Windows 10, x64.

When I try to install a package, I get an error

# gopkg.in/rana/ora.v4
C:/MinGW/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -loci
collect2.exe: error: ld returned 1 exit status

go env
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\GoPath
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\PAVEL~1.VAS\AppData\Local\Temp\go-build605204955=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

Please, tell me, what could be the problem?

@tgulacsi
Copy link
Collaborator

Do you have oci.dll somewhere? Where have you installed InstantClient?
(BTW gopkg.in/goracle.v2 doesn't need Oracle for compilation, only for running).

@YaProof
Copy link
Author

YaProof commented Dec 20, 2017

OracleClient is installed, there is also oci.dll. The path in the environment variable. To the connection there is, checked PL/SQL developer.
OraPath: D:\app\ora12\product\12.1.0\client_1

@tgulacsi
Copy link
Collaborator

ora.v4 uses pkg-config.
What does pkg-config --libs oci8 print out? It should -LD:\app\ora12\product\12.1.0\client_1 -loci.
If not, modify oci8.pc with the correct path.

@tgulacsi
Copy link
Collaborator

#221 helps?

@YaProof
Copy link
Author

YaProof commented Dec 20, 2017

Thanks, I changed the paths in the oci8.pc file, for variables libdir and includedir.

@YaProof YaProof closed this as completed Dec 20, 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