Skip to content

Can amalgamation files be moved back to separate directory? #1020

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

Open
rittneje opened this issue Feb 23, 2022 · 1 comment
Open

Can amalgamation files be moved back to separate directory? #1020

rittneje opened this issue Feb 23, 2022 · 1 comment

Comments

@rittneje
Copy link
Collaborator

rittneje commented Feb 23, 2022

In #294, the sqlite3-binding.c, etc. files were moved out of a sub-directory for better compatibility with tools like godep. This in turn caused issues with the libsqlite3 build tag due to the way cgo works, which necessitated that the amalgamation files be manually patched to include an #ifndef USE_LIBSQLITE3 check. This manual patch then must be re-inserted each time we upgrade SQLite.

As godep, etc. are likely no longer maintained in the wake of go mod, we should revisit this point. If the files are moved back to a sub-directory, will it still work properly with go mod? Can we stop having to manually patch the amalgamation files?

mattn added a commit that referenced this issue Feb 23, 2022
@mattn
Copy link
Owner

mattn commented Feb 24, 2022

I'm experimentally trying if the C code can be moved to amagramation but seems not to be easy.

https://github.com/mattn/go-sqlite3/tree/move-code

c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: $WORK\b001\_x005.o:sqlite3.cgo2.c:(.rdata$.refptr.sqlite3_version[.refptr.sqlite3_version]+0x0): undefined reference to `sqlite3_version'                                                                                                                                                                                       collect2.exe: error: ld returned 1 exit status               

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