0

I'm trying to create an amalgamation for duckdb with sqlite_scanner as a static extension. I'm a complete novice to building duckdb. I know that I can build the amalgamation with a command similar to this:

git clone [duckdb]

python3 scripts/amalgamation.py

But this does not include the sqlite_scanner. If I clone the duckdb-sqlite-scanner repo into the extension subdirectory, I can get DuckDB to almost build "in the usual way":

DUCKDB_EXTENSIONS='core_functions;parquet;json;sqlite_scanner' make

Although, it fails like this:

[ 65%] Building CXX object src/main/extension/CMakeFiles/duckdb_generated_extension_loader.dir///__/codegen/src/generated_extension_loader.cpp.o

In file included from /duckdb/build/release/codegen/src/generated_extension_loader.cpp:1:

In file included from /duckdb/src/include/duckdb/main/extension/generated_extension_loader.hpp:17:

/duckdb/build/release/codegen/include/generated_extension_headers.hpp:7:10: fatal error: 'sqlite_scanner_extension.hpp' file not found

Obviously, if I cross my fingers and just try to hammer on the amalgamation script (because I have no idea what I'm doing), it still doesn't drag in to sqlite-scanner functionality. (I'm searching for sqlite_scanner_init() in the generated duckdb.cpp source.)

1 Answer 1

1

I don't think you want to use the amalgamation build, I'd strongly advise against that and encourage you to pursue other avenues to get a static build of duckdb that includes the sqlite scanner.

Using the amalgamation is definitely not your best bet to achieve this goal.

You likely just want to adjust the .github/config/out_of_tree_extensions.cmake file when it comes to the sqlite scanner configuration, and then build with CORE_EXTENSIONS="sqlite_scanner" make release

Sign up to request clarification or add additional context in comments.

1 Comment

thanks for answering. Unfortunately, as of commit 'd80bae78380550e077512f2b8a79fed67cd5a5ec', when trying to build duckdb with sqlite (in any way), I just get an error message about a missing header file "sqlite_scanner_extension.hpp". I dug around online, and I can see that this has been an open issue for a while, with no fix in sight. I do notice that the build instructions for duckdb are a bit ... light. That's why I was hoping for the amalgamation — it's a single file, at that point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.