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 reloc for dynamic symbol close #404

Closed
jackhu1990 opened this issue Mar 29, 2017 · 11 comments
Closed

unexpected reloc for dynamic symbol close #404

jackhu1990 opened this issue Mar 29, 2017 · 11 comments

Comments

@jackhu1990
Copy link

yesterday I upgrade xcode
then

command-line-arguments

github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol close
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol access
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol getcwd
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol stat$INODE64
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fstat$INODE64
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol ftruncate
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fcntl
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol read
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol pread
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol write
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol pwrite
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fchmod
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol unlink
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol mkdir
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol rmdir
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol fchown
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol geteuid
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol mmap
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol munmap
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol readlink
github.com/mattn/go-sqlite3(__DATA/__data): unexpected reloc for dynamic symbol lstat$INODE64
/usr/local/go/pkg/tool/darwin_amd64/link: too many errors

@jackhu1990
Copy link
Author

before upgrade, it's worked。
anybody help me?

@mattn
Copy link
Owner

mattn commented Mar 29, 2017

seem to be golang/go#8211

@jackhu1990
Copy link
Author

env

go version go1.8 darwin/amd64

MacBook Pro (15-inch, Late 2016) 10.12.4 (16E195)

@jackhu1990
Copy link
Author

jackhu1990 commented Mar 30, 2017

@mattn thanks, I don't find the solution from goland/go#8211
😭😭😭😭😭😭😭😭😭😭😭😭

@mattn
Copy link
Owner

mattn commented Mar 30, 2017

Since I don't have macOS, I don't make sure, it caused by version of xcode.

golang/go#19772

@rsc
Copy link

rsc commented Mar 30, 2017

Are you somehow using -linkmode=internal explicitly in your build?
The linker should default to -linkmode=external for code using this package.
If you're setting -linkmode=internal, please don't.
It's not guaranteed to work for any uses of cgo except the standard library.

This is unrelated to golang/go#19772 except that they both seem to be due to the new Xcode toolchain.

@mattn
Copy link
Owner

mattn commented Mar 31, 2017

I don't specify the flags explicitly in this package. @jackhu1990 did you build with appended something flags especially?

@solcates
Copy link

Sorry to bother on a closed issue, but @jackhu1990 were you able to get Gogland to not use the internal linkmode? I ran into the same problem trying to debug, and was hoping to not have to stand up a more dedicated DB(postgres, or mysql) for this beego project i'm working on.

@jackhu1990
Copy link
Author

jackhu1990 commented Apr 21, 2017

@solcates if you user gogland to debug. you can

1、brew install sqlite3
2、in gogland debug tools config args --tags "libsqlite3 darwin"

image

then everthing is ok!
image

@jackhu1990
Copy link
Author

after brew install sqlite3, you can use go build to build mac'application.
if you want go build other os and arch like linuxarm linuxamd64 .. in mac
you can use karalabe/xgo

image

@tonymtz
Copy link

tonymtz commented May 11, 2017

I have the same issue. @jackhu1990's solution worked for me. Thanks!

gjrtimmer added a commit to gjrtimmer/go-sqlite3 that referenced this issue May 26, 2018
Compile Section Closes mattn#175
Compile Section Closes mattn#201
Compile Section Closes mattn#206
Compile Section Closes mattn#404
Compile Section Closes mattn#217
Compile Section Closes mattn#224
Compile Section Closes mattn#234
Compile Section Closes mattn#242
Feature table Closes mattn#255
Description Section Closes mattn#232
Golang:1.6 not supported Closes mattn#272
Golang:1.5 not supported + compilation section Closes mattn#283
usleep Implemented Closes mattn#285
FAQ Section Closes mattn#289
Compile Section closes mattn#295
FAQ Section Closes mattn#305
PR339 Closes mattn#318 mattn#321
Compilation Section Closes mattn#341
PR407 Closes mattn#364
Feature `sqlite_vtable` Closes mattn#393
Compile Section Closes mattn#416
sqlite_trace feature Closes mattn#433
Compilation Section Closes mattn#435
Compilation Section Closes mattn#443
Golang:1.6 Not Supported Closes mattn#445
Compilation Section Closes mattn#451
Compilation Section Closes mattn#467
Compilation Section Closes mattn#491
Compilation Section Closes mattn#495
Compilation Section Closes mattn#505
Compilation Section Closes mattn#557
Compilation Section Closes mattn#560
gjrtimmer added a commit to gjrtimmer/go-sqlite3 that referenced this issue May 26, 2018
Compile Section Closes mattn#175
Compile Section Closes mattn#201
Compile Section Closes mattn#206
Compile Section Closes mattn#404
Compile Section Closes mattn#217
Compile Section Closes mattn#224
Compile Section Closes mattn#234
Compile Section Closes mattn#242
Feature table Closes mattn#255
Description Section Closes mattn#232
Golang:1.6 not supported Closes mattn#272
Golang:1.5 not supported + compilation section Closes mattn#283
usleep Implemented Closes mattn#285
FAQ Section Closes mattn#289
Compile Section closes mattn#295
FAQ Section Closes mattn#305
PR339 Closes mattn#318 mattn#321
Compilation Section Closes mattn#341
PR407 Closes mattn#364
Feature `sqlite_vtable` Closes mattn#393
Compile Section Closes mattn#416
sqlite_trace feature Closes mattn#433
Compilation Section Closes mattn#435
Compilation Section Closes mattn#443
Golang:1.6 Not Supported Closes mattn#445
Compilation Section Closes mattn#451
Compilation Section Closes mattn#467
Compilation Section Closes mattn#491
Compilation Section Closes mattn#495
Compilation Section Closes mattn#505
Compilation Section Closes mattn#557
Compilation Section Closes mattn#560
[ci skip]
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

5 participants