Skip to content
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

possible to compile from source and link the json or other extension statically? #104

Closed
beswarm opened this issue Jun 27, 2023 · 1 comment

Comments

@beswarm
Copy link

beswarm commented Jun 27, 2023

Thanks for the golang binding for duckdb.
I have a question related to build the duckdb from source and include the json plugin, so that when I run it docker container, it do not need download the extension from internet.

originally, I use the below line to statically build , it success,
RUN CGO_ENABLED=1 go build -a -ldflags '-extldflags "-static" -w -s' -o app ./cmd

but when run it in docker container, and use json plugin, it will try to download the json extension into the ~/.duckdb directory. it will takes a long time to download , also, it does not work.

so is it possible to link statically the json plugin?
in the duckdb cmake file, it does have the following options, I just do not know how to pass it to customize duckdb build using cgo and link the plugin statically? Is this possible?

option(BUILD_JSON_EXTENSION "Build the JSON extension." FALSE)
option(EXTENSION_STATIC_BUILD
"Extension build linking statically with DuckDB. Required for building linux loadable extensions."
FALSE)

@beswarm
Copy link
Author

beswarm commented Jun 29, 2023

It seems impossible to do this, the source code is not inside libduckdb-src.zip file

@beswarm beswarm closed this as completed Jun 29, 2023
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

1 participant