duckdb / duckdb-rs

Ergonomic bindings to duckdb for Rust
MIT License
467 stars 96 forks source link

duckdb-rs 0.10 is failing on macOS Venture (13.5.2) with code 14 #270

Open keltia opened 6 months ago

keltia commented 6 months ago

Hello, trying to compile v0.10.0 on my mac, I get a lot of errors from the c++ compiler (from xcode 14) about missing includes.

  cargo:warning=ToolExecError: Command env -u IPHONEOS_DEPLOYMENT_TARGET "/opt/homebrew/bin/sccache" "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "--target=arm64-apple-darwin" "-mmacosx-version-min=13.3" "-I" "duckdb" "-I" "duckdb/third_party/fmt/include" "-I" "duckdb/third_party/mbedtls/include" "-I" "duckdb/extension/parquet/include" "-I" "duckdb/third_party/tdigest" "-I" "duckdb/third_party/concurrentqueue" "-I" "duckdb/third_party/httplib" "-I" "duckdb/third_party/miniz" "-I" "duckdb/third_party/pcg" "-I" "duckdb/third_party/jaro_winkler/details" "-I" "duckdb/third_party/re2" "-I" "duckdb/third_party/parquet" "-I" "duckdb/third_party/hyperloglog" "-I" "duckdb/src/include" "-I" "duckdb/third_party/utf8proc/include" "-I" "duckdb/third_party/fastpforlib" "-I" "duckdb/third_party/zstd/include" "-I" "duckdb/third_party/thrift" "-I" "duckdb/third_party/snappy" "-I" "duckdb/third_party/mbedtls/library" "-I" "duckdb/third_party/mbedtls" "-I" "duckdb/third_party/jaro_winkler" "-I" "duckdb/third_party/fsst" "-I" "duckdb/third_party/libpg_query" "-I" "duckdb/third_party/skiplist" "-I" "duckdb/third_party/utf8proc" "-I" "duckdb/third_party/libpg_query/include" "-I" "duckdb/third_party/fast_float" "-std=c++11" "-stdlib=libc++" "-stdlib=libstdc++" "-w" "-DDUCKDB_EXTENSION_PARQUET_LINKED=1" "-DDUCKDB_EXTENSION_AUTOINSTALL_DEFAULT=1" "-DDUCKDB_EXTENSION_AUTOLOAD_DEFAULT=1" "-o" "/Users/roberto/Src/Rust/src/fetiche-rs/target/debug/build/libduckdb-sys-ea9d0cc43862ad60/out/239a61d5cb207136-ub_src_parser.o" "-c" "duckdb/ub_src_parser.cpp" with args "c++" did not execute successfully (status code exit status: 1).cargo:warning=In file included from duckdb/ub_src_core_functions_aggregate_nested.cpp:1:
  cargo:warning=In file included from duckdb/src/core_functions/aggregate/nested/list.cpp:1:
  cargo:warning=duckdb/src/include/duckdb/common/pair.hpp:11:10: fatal error: 'utility' file not found
  cargo:warning=#include <utility>
  cargo:warning=         ^~~~~~~~~
  cargo:warning=1 error generated.
  cargo:warning=In file included from duckdb/ub_src_common_enums.cpp:1:
  cargo:warning=In file included from duckdb/src/common/enums/catalog_type.cpp:1:
  cargo:warning=In file included from duckdb/src/include/duckdb/common/enums/catalog_type.hpp:11:
  cargo:warning=duckdb/src/include/duckdb/common/constants.hpp:11:10: fatal error: 'memory' file not found
  cargo:warning=#include <memory>
  cargo:warning=         ^~~~~~~~
  cargo:warning=1 error generated.

duckdb is installed through Homebrew. Using rust 1.76/1.78-nightly. These errors seem weird.

digizeph commented 6 months ago

Not using xcode. For what it's worth, it works fine on macOS 14.3.1 with bundled feature for me.

cargo new test-duckdb
cd test-duckdb
cargo add duckdb --features bundled
cargo build --release

Finished building in 1m 27s:

   Finished release [optimized] target(s) in 1m 27s

Cargo.toml content

[package]
name = "test-duckdb"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
duckdb = { version = "0.10.0", features = ["bundled"] }

Rust versionL 1.76.0

rustc --version
rustc 1.76.0 (07dca489a 2024-02-04)
keltia commented 6 months ago

I'm still running macOS Ventura aka 13.3.1 so I guess I need Sonoma. This was not in the release notes… bundled makes no difference here.