Skip to content

Build error: The file is not a DuckDB extension. The metadata at the end of the file is invalid #299

@saul-data

Description

@saul-data

What happens?

I need to build v1.2.0 duckdb postgres extension because our environment is air tight and we need to install from source (cannot download the built binaries).

After following the build notes, I get the following error message.

root ➜ /workspace (main) $ ./build/release/duckdb -unsigned
v1.2.1-dev102 8d5079066c
Enter ".help" for usage hints.

D LOAD 'build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension';

Invalid Input Error:
Failed to load 'build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension', The file is not a DuckDB extension. The metadata at the end of the file is invalid
D LOAD './build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension';
Invalid Input Error:

Failed to load './build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension', The file is not a DuckDB extension. The metadata at the end of the file is invalid

To Reproduce

I followed the steps to build from source to v1.2.0 as follows:

Updated .gitmodules

[submodule "duckdb"]
	path = duckdb
	url = https://github.com/duckdb/duckdb.git
	branch = v1.2-histrionicus
[submodule "extension-ci-tools"]
	path = extension-ci-tools
	url = https://github.com/duckdb/extension-ci-tools.git
	branch = v1.2.0

Pull the correct version in the submodules

git submodule init
git pull --recurse-submodules

git submodule update --remote
git submodule status

Build the extension

make

To run, run the bundled duckdb shell:

 ./build/release/duckdb -unsigned  # allow unsigned extensions

Then, load the Postgres extension like so:

LOAD 'build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension';

OS:

Debian Bullseye

PostgreSQL Version:

17.2

DuckDB Version:

1.2.0

DuckDB Client:

DuckDB CLI

Full Name:

Saul Frank

Affiliation:

Lloyds Banking Group

Have you tried this on the latest main branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions