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

unexpected R_X86_64_64 relocation for dynamic symbol #111

Closed
chr4 opened this issue Feb 18, 2014 · 12 comments
Closed

unexpected R_X86_64_64 relocation for dynamic symbol #111

chr4 opened this issue Feb 18, 2014 · 12 comments

Comments

@chr4
Copy link

chr4 commented Feb 18, 2014

When using go build or go get in my project on linux amd64, I get the following

go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol close
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol access
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol getcwd
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol ftruncate64
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol fcntl
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol read
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol write
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol fchmod
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol unlink
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol mkdir
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol rmdir
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol mmap64
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol munmap
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unexpected R_X86_64_64 relocation for dynamic symbol mremap
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unhandled relocation for close (type 25 rtype 120)
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unhandled relocation for access (type 25 rtype 120)
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unhandled relocation for getcwd (type 25 rtype 120)
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): stat64: not defined
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): fstat64: not defined
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unhandled relocation for ftruncate64 (type 25 rtype 120)
go/pkg/linux_amd64/github.com/mattn/go-sqlite3.a(sqlite3.o)(.data.rel): unhandled relocation for fcntl (type 25 rtype 120)

While on osx, everything works fine.
Any ideas?

@mattn
Copy link
Owner

mattn commented Feb 18, 2014

Do you cross-comiling? #106 (comment)
Then, please set correct title.

@chr4
Copy link
Author

chr4 commented Feb 18, 2014

I tried cross-compiling first, when it failed, I tried it on the target machine natively.

@mattn
Copy link
Owner

mattn commented Feb 18, 2014

Do you use clang?

@chr4
Copy link
Author

chr4 commented Feb 18, 2014

I tried clang and gcc like so:

CC=clang go build
CC=gcc go build

Both with exactly the same results.

@mattn
Copy link
Owner

mattn commented Feb 18, 2014

Please show me go env?

BTW, Sorry for my jump to wrong.

@chr4
Copy link
Author

chr4 commented Feb 18, 2014

No worries.

Here you go:

GOROOT="/usr/lib/go"
GOBIN=""
GOARCH="amd64"
GOCHAR="6"
GOOS="linux"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CGO_ENABLED="1"

@mattn
Copy link
Owner

mattn commented Feb 19, 2014

@chr4
Copy link
Author

chr4 commented Feb 19, 2014

Yes I did. Does your package require a certian go version?

@mattn
Copy link
Owner

mattn commented Feb 19, 2014

I'm using tip on hg. I'm compiling on following environments.

Windows

go version devel +63af41fd1829 Mon Feb 17 21:34:58 2014 -0500 windows/386

Linux

go version devel +490e62ef6da8 Tue Dec 03 17:08:51 2013 -0800 linux/amd64

@chr4
Copy link
Author

chr4 commented Feb 19, 2014

Mmh, nevermind. I'm using in-memory storage, which fits better to my current requirement.
Thanks for your support!

@andres-erbsen
Copy link

I have a very similar problem: https://pastebin.com/8QcT2fEw Source code: https://pastebin.com/nZHxD3Kz

@mattn
Copy link
Owner

mattn commented Nov 14, 2014

Maybe same as #92

@mattn mattn closed this as completed Nov 14, 2014
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

3 participants