Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Include third_party in DuckDB derivation #292855

Open
rupurt opened this issue Mar 2, 2024 · 0 comments
Open

Include third_party in DuckDB derivation #292855

rupurt opened this issue Mar 2, 2024 · 0 comments
Labels
0.kind: bug Something is broken

Comments

@rupurt
Copy link

rupurt commented Mar 2, 2024

Describe the bug

The current DuckDB derivation can't build extensions that rely on headers in the DuckDB third_party directory.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Clone the template repository https://github.com/rupurt/duckdb-extension-template-zig
  2. Enter the dev shell using duckdb from nixpkgs nix develop .#nixpkgs-duckdb (currently v0.10.0)
  3. Try to build the extension make build
  4. You should see the build error importing third_party headers
> zig build --release=fast
install
└─ install odbc_scanner
   └─ zig build-lib odbc_scanner ReleaseFast native 1 errors
/nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/common/hive_partitioning.hpp:17:10: error: 're2/re2.h' file not found
#include "re2/re2.h"
         ^~~~~~~~~~~~
/home/alex/workspace/rupurt/zodbc-scanner-duckdb-extension/src/bridge.cpp:7:10: note: in file included from /home/alex/workspace/rupurt/zodbc-scanner-duckdb-extension/src/bridge.cpp:7:
#include "duckdb/main/extension_util.hpp"
         ^
/nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/main/extension_util.hpp:14:10: note: in file included from /nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/main/extension_util.hpp:14:
#include "duckdb/main/secret/secret.hpp"
         ^
/nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/main/secret/secret.hpp:13:10: note: in file included from /nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/main/secret/secret.hpp:13:
#include "duckdb/common/serializer/deserializer.hpp"
         ^
/nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/common/serializer/deserializer.hpp:18:10: note: in file included from /nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/common/serializer/deserializer.hpp:18:
#include "duckdb/execution/operator/csv_scanner/options/csv_reader_options.hpp"
         ^
/nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/execution/operator/csv_scanner/options/csv_reader_options.hpp:19:10: note: in file included from /nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/execution/operator/csv_scanner/options/csv_reader_options.hpp:19:
#include "duckdb/common/multi_file_reader_options.hpp"
         ^
/nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/common/multi_file_reader_options.hpp:13:10: note: in file included from /nix/store/xi8f7wsss21aycd5n0h6hvbdk3w2ilvv-duckdb-0.10.0/include/duckdb/common/multi_file_reader_options.hpp:13:
#include "duckdb/common/hive_partitioning.hpp"
         ^
error: the following command failed with 1 compilation errors:

Expected behavior

I should be able to build DuckDB extensions in Nix environments that rely on third_party libraries included in the DuckDB git repository with C & C++ toolchains.

Notify maintainers

@costrouc @cpcloud

Metadata

> nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.00 MiB download, 0.00 MiB unpacked):
  /nix/store/w3cx1ir83mgri4ypsix0121v0mykhqk1-nix-info
copying path '/nix/store/w3cx1ir83mgri4ypsix0121v0mykhqk1-nix-info' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.10-1-MANJARO, Manjaro Linux, noversion, rolling`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.19.2`
 - nixpkgs: `/nix/store/597bbfl5kbg7f6n36xnfkkdmkn9sjy2s-source`

Add a 👍 reaction to issues you find important.

@rupurt rupurt added the 0.kind: bug Something is broken label Mar 2, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant