-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
doesn't compile using gomobile (for android/ios) #201
Comments
Please remove LDFLAGS -lpthread from sqlite3_other.go, See golang/go#10584 for the why android doesn't need |
I removed the link it but even when the contrived example i get the same errors
|
This is golang/go#9510.
|
@minux do you mean: remove -lpthread |
I mean you can remove -lpthread on every platform. Cgo will automatically
link pthread if necessary.
|
@minux okay, thanks. |
Perhaps I'm a little slow, but I don't know how to fix the compilation issue with a dummy c file per golang/go#9510 Could any of you fine folks explain what i need to do? I'm sort of blocked. Thanks! |
Unfortunately there is no workaround for golang/go#9510.
|
golang/go#9510 is related issue of go-sqlite3? |
It is related to the gomobile stuff. Which sucks, because it's a Suck :( On 4/29/15, mattn notifications@github.com wrote:
|
* Based on pure-Go BoltDB * Initial motivation: failure to build sqlite3 for android with recent Go mobile versions (mattn/go-sqlite3#201) * Set to be used on all but Windows (where sqlite3 is in production) for maximum test exposure
Android Native Application (works)If you use an Android native project, e.g. Then run on an ARM device or ARM emulator:
Android SDK Library (aar) (works, when allowing duplicate symbols)Edit for Go 1.6: Should work since golang/go@754f707 is merged. Go 1.5 Workaround: Trying to build an aar using If you pass some compiler-args to allow duplicate symbols, it at least compiles without errors. And also works on Android 4 (Tested on API 19). It will not work with go1.5.1 on API 23 right now, since one has to wait until a new go version with the fix in golang/go#12890 comes out. To create a library project with go-sqlite3 library do:
Passing the compiler args might not be needed in the future. See comments in issue 9510 See: |
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
First there is an issue with pthread that I can get past, but then it seems to struggle linking with symbol conflicts. I know sqlite and go both work on android, so i'm not sure why there is symbol duplication here.
example
Trying to bind without any patches
Making this change (turning off pthread for android, as the link is not required)
Gets me past the android link issue. Now i'm having symbol conflicts, though
Any ideas? It seems it's a cgo link issue, but I'm not sure what it is.
The text was updated successfully, but these errors were encountered: