Closed BGireesh closed 2 months ago
Try git submodule update --init --recursive
and also make sure you have all the prerequisite packages:
https://github.com/duckdb/pg_duckdb/blob/main/.github/workflows/build_and_test.yaml#L62-L64
I've installed the prerequisite packages but do face the same issue reported above.
fatal error: duckdb.hpp: No such file or directory
This is fixed by git submodule update --init --recursive
. There was an attempt to automatically run this in the Makefile, but it seems to not be working.
fatal error: postgres.h: No such file or directory
This means you do not have the Postgres dev / header package installed, apt install postgresql-server-dev-16
(or 17).
fatal error: duckdb.hpp: No such file or directory
This is fixed by
git submodule update --init --recursive
. There was an attempt to automatically run this in the Makefile, but it seems to not be working.fatal error: postgres.h: No such file or directory
This means you do not have the Postgres dev / header package installed,
apt install postgresql-server-dev-16
(or 17).
It kinda worked! But ran into another issue
ckdb_detoast.o src/pgduckdb_detoast.cpp
src/pgduckdb_detoast.cpp:9:10: fatal error: lz4.h: No such file or directory
9 | #include <lz4.h>
| ^~~~~~~
compilation terminated.
make: *** [<builtin>: src/pgduckdb_detoast.o] Error 1
#
fatal error: duckdb.hpp: No such file or directory
This is fixed by
git submodule update --init --recursive
. There was an attempt to automatically run this in the Makefile, but it seems to not be working.fatal error: postgres.h: No such file or directory
This means you do not have the Postgres dev / header package installed,
apt install postgresql-server-dev-16
(or 17).It kinda worked! But ran into another issue
ckdb_detoast.o src/pgduckdb_detoast.cpp src/pgduckdb_detoast.cpp:9:10: fatal error: lz4.h: No such file or directory 9 | #include <lz4.h> | ^~~~~~~ compilation terminated. make: *** [<builtin>: src/pgduckdb_detoast.o] Error 1 #
apt-get install liblz4-dev
☝️ does the magic
Nice to have this into the README.md
I do agree with @isaiasanchez , both of these packages don't seem to be either mentioned on the README.md nor on the build_and_test.yml (https://github.com/duckdb/pg_duckdb/blob/main/.github/workflows/build_and_test.yaml#L62-L64).
What do you think @wuputah ?
I realize that building the project is the only option right now, but this is a temporary thing. Because build instructions such as required packages are OS-, distro-, and distro-release-specific, I'm not planning on maintaining exact build instructions. Some of that will come out of building and releasing binaries, at which point most users should not need to compile. At that point, the expectation that building will principally be for developers, and that you can debug these types of issues on your own (or with the assist of Google, etc).
We could certainly add liblz4-dev
to the list of packages that the CI installs, though I'm not sure why CI succeeds without it; most likely it's already installed in Github's base image due to some other piece of software that Github installs by default.
The Postgres dev package is covered under the precondition that you have the "standard set of build tools for building Postgres extensions." This is not needed in CI because Postgres is being compiled from source. The specific package you will need will depend on the version of Postgres you are using and how it is packaged.
What would be a good PR is fixing this issue is this, which is specific to this project:
There was an attempt to automatically run this in the Makefile, but it seems to not be working.
This appears to be a "dependency chain" issue, where the main compilation tries to start running before the code in the submodule is finished being checked out.
OS Details
Postgres version details
Error Logs: