-
Notifications
You must be signed in to change notification settings - Fork 113
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 staticlib #120
base: main
Are you sure you want to change the base?
Use staticlib #120
Conversation
@cxtuttle Thanks for the PR :) |
I found this useful when trying to compile a binary for an older platform, e.g. Debian Buster and not wanting to bundle |
@disq We ship a precompiled static version of DuckDB that is used by default if you run |
@marcboeker The precompiled static version doesn't seem to have other dependencies so linking becomes an issue with unknown symbols popping up everywhere, at least on the latest releases. I had to do this to be able to compile it "fully statically" (using the staticlib feature in this PR):
This was done because my aim was to compile it on a current system and then run it on an older debian (Buster) |
@disq I agree. It would be sensible to ship a fully static precompiled version with go-duckdb, eliminating the need for users to build their own. Can you please share the list of unknown symbols from your system so that I can reproduce this. |
From my understanding, there are two (related) points here.
What is the status of this PR? As there has not been any activity in a while. |
FWIW would love to have this to improve the portability of my programs. |
Any word on the status of this? |
@KoduIsGreat Unfortunately not. Maybe @taniabogatsch has some more information on this? |
Unfortunately, no - I think this PR is stale - maybe some of the people commenting are interested in picking it up? I am not really in the matter of (cross) compiling this with different builds of duckdb, is this PR related to #279 (and other issues around static linking)? Potentially, we also saw some related issues, e.g., #330? |
Adds the ability to compile everything statically with an installed duckdb libs.
I tend to compile similar to the following, but I mostly need the parquet extension:
export CGO_LDFLAGS="-lduckdb_static -lduckdb_re2 -lduckdb_pg_query -lduckdb_fmt -lduckdb_utf8proc -lduckdb_hyperloglog -lduckdb_miniz -lduckdb_fastpforlib -licu_extension -lparquet_extension -lvisualizer_extension -ljemalloc_extension -lduckdb_mbedtls -lduckdb_fsst -ldl -lm -lstdc++"
go build --tags=duckdb_use_staticlib cmd/test_duck.go