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

Motherduck compatibility #252

Open
JichaoS opened this issue Jan 5, 2024 · 3 comments
Open

Motherduck compatibility #252

JichaoS opened this issue Jan 5, 2024 · 3 comments

Comments

@JichaoS
Copy link

JichaoS commented Jan 5, 2024

I'm running into an issue querying from motherduck with the url md:?motherduck_token=XXXXXX

Invalid Input Error: Initialization function \"motherduck_init\" from file \"/Users/jichao/.duckdb/extensions/v0.9.2/osx_arm64/motherduck.duckdb_extension\" threw an exception: \"IO Error: Extension \"/Users/jichao/.duckdb/extensions/v0.9.2/osx_arm64/motherduck.v1.15.5.duckdb_extension\" could not be loaded: dlopen(/Users/jichao/.duckdb/extensions/v0.9.2/osx_arm64/motherduck.v1.15.5.duckdb_extension, 0x0006): symbol not found in flat namespace '__ZN6duckdb24LogicalExtensionOperator21ResolveColumnBindingsERNS_21ColumnBindingResolverERNS_6vectorINS_13ColumnBindingELb1EEE

Any idea what could be causing this? CLI is working so I suspect some build issues with libduckdb-sys

@sgrebnov
Copy link

sgrebnov commented Apr 13, 2024

I've encountered with the same issue when using duckdb-rs version 0.9.2 and md extension:

DuckDBError: Invalid Input Error: Initialization function "motherduck_init" from file "/Users/sg/.duckdb/extensions/v0.9.2/osx_arm64/motherduck.duckdb_extension" threw an exception: "IO Error: Extension "/Users/sg/.duckdb/extensions/v0.9.2/osx_arm64/motherduck.v1.15.25.duckdb_extension" could not be loaded: dlopen(/Users/sg/.duckdb/extensions/v0.9.2/osx_arm64/motherduck.v1.15.25.duckdb_extension, 0x0006): symbol not found in flat namespace '__ZN6duckdb24LogicalExtensionOperator21ResolveColumnBindingsERNS_21ColumnBindingResolverERNS_6vectorINS_13ColumnBindingELb1EEE'"

@JichaoS - were you able to resolve the issue?

@JichaoS
Copy link
Author

JichaoS commented Apr 16, 2024

I did get a response but haven't tried it out. Reposting from MD slack channel here

Sorry for the delay! We investigated and the issue is that the Rust compiler optimizes away unused code in the bundled DuckDB binary provided by duckdb-rs on which the MotherDuck extension depends. A workaround is to disable dead code elimination with RUSTFLAGS="-C link-dead-code" cargo run A pretty big hammer and results in a larger binary but AFAIK there isn’t a more granular way to preserve the DuckDB binary only.

@sgrebnov
Copy link

@JichaoS - thank you a lot!

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

2 participants