-
Notifications
You must be signed in to change notification settings - Fork 87
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
Use DuckDB amalgamation instead of shared libraries #40
Conversation
Thanks for the PR. I've tested it successfully under macOS with a build time of around 6 minutes. It's really cool to get rid of external dependencies.
I've tried to compile it on a MacBook Pro 2014 running Windows through Bootcamp. But after 12 hours it was still not done. The CPU usage on this Mac was around 20%. I've tried to increase the number of cores via
What is linking against
This is a great suggestion, especially if you want to reduce the initial build time or cross compile for another architecture without having to install several different cross compile chains.
Would it make sense to just download the different DuckDB libs and check them in? Or do you want to compile them separately on your own? One thing I have been thinking about is, that we should explain how to cross compile for other platforms and OSes. I've tried to use a cross compile chain on my M1 Mac for a 64bit linux, but I think your PR is an awesome addition to |
Bundle static libraries and make source and shared libraries optional
CI to build static libraries when upgrading DuckDB version
Hey, sorry for the delay here, but finally had time to work some more on it. Firstly, I've updated the PR with several changes:
Now, to answer your questions:
Remaining next steps (if you like this direction):
|
Thanks for the additional build tags, the fix for the return of an empty row and your answers to my question. So far I've reviewed and tested it on macOS and it looks good to me. I like the new flexibility derived by the build tags a lot. The pipeline has some hiccups with rules which it thinks are missing in the Makefile, but are there. Do you have any idea why? We can ask the DuckDB creators to review the compiler and linker flags and then merge the PR. In my opinion the missing building blocks for Windows can be added after the merge, so that we can get the release out in the hands of testers quickly. What do you think? |
Hey, a few comments:
By the way, I found this HN thread where someone requested a static DuckDB build for Go: https://news.ycombinator.com/item?id=31531219 😄 |
Thanks for the adjustments. I've tested the latest version on macOS successfully. Are you fine with merging the current state so that further development is based on the new static builds? That HN thread is very interesting. Great to see, that there is now a solution to this problem. |
Yeah, it'd be great to merge this initial functionality! |
Awesome, it's merged now. Thank you for this great contribution, which makes using this driver much easier! |
Nice – and thank you for building and maintaining this useful driver! |
See issue #38 for context.
This is a minimal PR that uses the DuckDB amalgamation to compile from source instead of relying upon a shared library. A few notes:
go-sqlite3
).Next steps:
duckdb.go
.libduckdb
instead of compiling from source.rogchap/v8go
does (seedeps
folder). That would still get rid of the build flags and produce a static binary, but you wouldn't have to wait for DuckDB to compile from source on most systems.