-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Labels
fixUsed for auto generate changelogUsed for auto generate changeloggood first issueGood for newcomersGood for newcomers
Description
Playing with building a statically linked program that embeds duckdb.
When I build duckdb, it produces build/release/src/libduckdb.so and build/release/src/libduckdb_static.a (amongst other things).
Then I build libduckdb-sys ("manually", without vcpkg):
$ DUCKDB_LIB_DIR=/home/bru/code/3p/duckdb/build/release/src DUCKDB_STATIC=1 cargo build --no-default-features
[...]
error: could not find native static library `duckdb`, perhaps an -L flag is missing?
I can fix it with a symlink:
$ ln -s $DUCKDB_LIB_DIR/libduckdb_static.a $DUCKDB_LIB_DIR/libduckdb.a
$ DUCKDB_LIB_DIR=/home/bru/code/3p/duckdb/build/release/src DUCKDB_STATIC=1 cargo build --no-default-features
<success!>
If you agree with the issue, I can contribute a fix to the build script. But then I want to nuke lib_name()/env_prefix() to make emitted directives more explicit.
Metadata
Metadata
Assignees
Labels
fixUsed for auto generate changelogUsed for auto generate changeloggood first issueGood for newcomersGood for newcomers