-
Notifications
You must be signed in to change notification settings - Fork 110
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
Question about static linking #116
Comments
On a Fedora box, your code above compiles to a static executable: CGO_ENABLED=1 CGO_LDFLAGS="-L/usr/lib" go build --ldflags="-extldflags=-static" -tags osusergo,netgo . $ ldd ./hello
not a dynamic executable That being said, there is a warning as
Perhaps it would be useful to bring this up to the duckdb devs? |
Thank you for the incantation! (Also, for Marc, assuming we get the DuckDB devs to help out with the dlopen warning, can we get this incantation to be the default build mode?) I'll ping someone from DuckDB to see. |
Yes, there is by default a glibc dependency from DuckDB. We also have another discussion around this going on in #54. If someone wants to discuss this with the DuckDB devs would be great, as I do not have much free time at the moment. |
Hey Marc! I am taking a look at this repo for the first time in a bit. Here's the sample code I'm trying.
While based on the file size, it seems like static linking worked, when I run
ldd
it seems to show dynamically linked libraries (though not necessarily duckdb).Whereas when I build a basic Go program:
So is there a way to build with go-duckdb that actually produces a static binary? Thanks!
The text was updated successfully, but these errors were encountered: