pola-rs / polars

Dataframes powered by a multithreaded, vectorized query engine, written in Rust
https://docs.pola.rs
Other
30.23k stars 1.95k forks source link

Could not compile `polars-core` V0.29.0 under WSL2 #9061

Closed danczw closed 1 year ago

danczw commented 1 year ago

Polars version checks

Issue description

Compile errors on polars-core. Cannot compile crate V0.29.0 (same results with V0.28.0) on WSL2 - Windows 11, even with minimal project setup.

Reproducible example

Simple new repository with minimal setup, running cargo build under WSL2 on Win 11 with only polars as dependency.

System

- Windows 11 22H2 - WSL2 version: 1.2.5.0 Kernel version: 5.15.90.1 - stable-x86_64-unknown-linux-gnu - Up to date : 1.69.0 (84c898d65 2023-04-16) - rustup - Up to date : 1.26.0

Cargo.toml & main.rs

``` [package] name = "my_package" version = "0.1.0" edition = "2021" [dependencies] polars = "0.29.0" ``` ``` fn main() { println!("Hello, world!"); } ```

Traceback

``` user@my_device:~/GitHub/my_project $ cargo build Compiling cfg-if v1.0.0 Compiling libc v0.2.144 Compiling static_assertions v1.1.0 Compiling scopeguard v1.1.0 Compiling libm v0.2.7 Compiling jobserver v0.1.26 Compiling cc v1.0.79 Compiling num-traits v0.2.15 Compiling getrandom v0.2.9 Compiling lexical-util v0.8.5 Compiling zstd-sys v2.0.8+zstd.1.5.5 Compiling memchr v2.5.0 Compiling crossbeam-utils v0.8.15 Compiling memoffset v0.8.0 Compiling futures-core v0.3.28 Compiling futures-sink v0.3.28 Compiling once_cell v1.17.1 Compiling pin-project-lite v0.2.9 Compiling futures-channel v0.3.28 Compiling crossbeam-epoch v0.9.14 Compiling slab v0.4.8 Compiling futures-task v0.3.28 Compiling lexical-parse-integer v0.8.6 Compiling lexical-write-integer v0.8.5 Compiling lz4-sys v1.9.4 Compiling futures-io v0.3.28 Compiling either v1.8.1 Compiling pin-utils v0.1.0 Compiling futures-util v0.3.28 Compiling serde v1.0.163 Compiling lexical-write-float v0.8.5 Compiling lexical-parse-float v0.8.5 Compiling crossbeam-deque v0.8.3 Compiling num-integer v0.1.45 Compiling target-features v0.1.4 Compiling log v0.4.17 Compiling crossbeam-channel v0.5.8 Compiling num_cpus v1.15.0 Compiling iana-time-zone v0.1.56 Compiling array-init-cursor v0.2.0 Compiling planus v0.3.1 Compiling chrono v0.4.24 Compiling rayon-core v1.11.0 Compiling multiversion-macros v0.7.2 Compiling lexical-core v0.8.5 Compiling ahash v0.8.3 Compiling futures-executor v0.3.28 Compiling aho-corasick v1.0.1 Compiling regex-syntax v0.7.2 Compiling bytemuck v1.13.1 Compiling multiversion v0.7.2 Compiling futures v0.3.28 Compiling rayon v1.7.0 Compiling regex v1.8.3 Compiling arrow-format v0.8.1 Compiling mio v0.8.6 Compiling signal-hook-registry v1.4.1 Compiling strength_reduce v0.2.4 Compiling dyn-clone v1.0.11 Compiling regex-syntax v0.6.29 Compiling ethnum v1.3.2 Compiling simdutf8 v0.1.4 Compiling smallvec v1.10.0 Compiling hash_hasher v2.0.3 Compiling foreign_vec v0.1.0 Compiling parking_lot_core v0.9.7 Compiling thiserror v1.0.40 Compiling signal-hook v0.3.15 Compiling lock_api v0.4.9 Compiling rand_core v0.6.4 Compiling ppv-lite86 v0.2.17 Compiling parking_lot v0.12.1 Compiling rand_chacha v0.3.1 Compiling signal-hook-mio v0.2.3 Compiling smartstring v1.0.1 Compiling sysinfo v0.28.4 Compiling bitflags v1.3.2 Compiling crossterm v0.26.1 Compiling polars-utils v0.29.0 Compiling rand v0.8.5 Compiling hashbrown v0.13.2 Compiling unicode-width v0.1.10 Compiling strum v0.24.1 Compiling hashbrown v0.12.3 Compiling comfy-table v6.2.0 Compiling indexmap v1.9.3 Compiling rand_distr v0.4.3 Compiling xxhash-rust v0.8.6 Compiling argminmax v0.6.1 Compiling now v0.1.3 Compiling atoi v2.0.0 Compiling socket2 v0.4.9 Compiling tokio v1.28.1 Compiling lexical v6.1.1 Compiling memmap2 v0.5.10 Compiling home v0.5.5 Compiling bytes v1.4.0 Compiling fast-float v0.2.0 Compiling itoa v1.0.6 Compiling ryu v1.0.13 Compiling glob v0.3.1 Compiling serde_json v1.0.96 Compiling sqlparser v0.30.0 Compiling lz4 v1.24.0 Compiling zstd-safe v6.0.5+zstd.1.5.4 Compiling zstd v0.12.3+zstd.1.5.2 Compiling arrow2 v0.17.1 Compiling polars-error v0.29.0 Compiling polars-arrow v0.29.0 Compiling polars-row v0.29.0 Compiling polars-core v0.29.0 error: could not compile `polars-core` Caused by: process didn't exit successfully: `rustc --crate-name polars_core --edition=2021 /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/polars-core-0.29.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=156 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="abs"' --cfg 'feature="chrono"' --cfg 'feature="comfy-table"' --cfg 'feature="cross_join"' --cfg 'feature="cum_agg"' --cfg 'feature="default"' --cfg 'feature="docs"' --cfg 'feature="dtype-date"' --cfg 'feature="dtype-datetime"' --cfg 'feature="dtype-duration"' --cfg 'feature="dtype-time"' --cfg 'feature="fmt"' --cfg 'feature="is_in"' --cfg 'feature="lazy"' --cfg 'feature="private"' --cfg 'feature="rand"' --cfg 'feature="rand_distr"' --cfg 'feature="random"' --cfg 'feature="regex"' --cfg 'feature="round_series"' --cfg 'feature="rows"' --cfg 'feature="strings"' --cfg 'feature="temporal"' --cfg 'feature="zip_with"' -C metadata=b5dce32b0961fb9a -C extra-filename=-b5dce32b0961fb9a --out-dir /home/user/GitHub/my_project/target/debug/deps -L dependency=/home/user/GitHub/my_project/target/debug/deps --extern ahash=/home/user/GitHub/my_project/target/debug/deps/libahash-3570fd7d448f4626.rmeta --extern arrow=/home/user/GitHub/my_project/target/debug/deps/libarrow2-6478b205f649043c.rmeta --extern bitflags=/home/user/GitHub/my_project/target/debug/deps/libbitflags-82cc2d155c6eb112.rmeta --extern chrono=/home/user/GitHub/my_project/target/debug/deps/libchrono-4aed145558ad2ef9.rmeta --extern comfy_table=/home/user/GitHub/my_project/target/debug/deps/libcomfy_table-8ceb1d089158bec0.rmeta --extern either=/home/user/GitHub/my_project/target/debug/deps/libeither-650b1f78e6d6b724.rmeta --extern hashbrown=/home/user/GitHub/my_project/target/debug/deps/libhashbrown-ef55395995045b20.rmeta --extern indexmap=/home/user/GitHub/my_project/target/debug/deps/libindexmap-4a7e2da62b4b6cd1.rmeta --extern num_traits=/home/user/GitHub/my_project/target/debug/deps/libnum_traits-dbc39aa820cc21a2.rmeta --extern once_cell=/home/user/GitHub/my_project/target/debug/deps/libonce_cell-f612d2e59a7f3606.rmeta --extern polars_arrow=/home/user/GitHub/my_project/target/debug/deps/libpolars_arrow-b23263c57e6f8d96.rmeta --extern polars_error=/home/user/GitHub/my_project/target/debug/deps/libpolars_error-a7047a1f399487e4.rmeta --extern polars_row=/home/user/GitHub/my_project/target/debug/deps/libpolars_row-2dfd5d0d911d1013.rmeta --extern polars_utils=/home/user/GitHub/my_project/target/debug/deps/libpolars_utils-2a3a127df70f5561.rmeta --extern rand=/home/user/GitHub/my_project/target/debug/deps/librand-9f19e15717bd93ea.rmeta --extern rand_distr=/home/user/GitHub/my_project/target/debug/deps/librand_distr-c07bd8e3095ed1ab.rmeta --extern rayon=/home/user/GitHub/my_project/target/debug/deps/librayon-677f7627cc46e804.rmeta --extern regex=/home/user/GitHub/my_project/target/debug/deps/libregex-4fa1b30c3e16cae6.rmeta --extern smartstring=/home/user/GitHub/my_project/target/debug/deps/libsmartstring-a0e264eaec7e6357.rmeta --extern thiserror=/home/user/GitHub/my_project/target/debug/deps/libthiserror-8ab6d6d16e376291.rmeta --extern xxhash_rust=/home/user/GitHub/my_project/target/debug/deps/libxxhash_rust-9fb79824aab1a7a7.rmeta --cap-lints allow -L native=/home/user/GitHub/my_project/target/debug/build/lz4-sys-aab106828e9835bc/out -L native=/home/user/GitHub/my_project/target/debug/build/zstd-sys-bf97f0a7a09f2161/out` (signal: 9, SIGKILL: kill) warning: build failed, waiting for other jobs to finish... ```

Expected behavior

Compile local package with its dependency polars 0.29.0 (0.28.0).

Installed versions

- V0.29.0 - also tested with V0.28.0: same result
ritchie46 commented 1 year ago

You got killed by you system. Probably OOM.

danczw commented 1 year ago

You got killed by you system. Probably OOM.

Interesting. I'll see if I can verify by increasing the available memory for wsl. What gave it away?

ritchie46 commented 1 year ago

SIGKILL

danczw commented 1 year ago

SIGKILL

Indeed it seems to be a memory issue. Much thanks for the quick reply.

Shariffintech commented 1 year ago

Same issue happened for me and im running polars in a Replit env. Ignore the low RAM, this was after the SIGKILL ended my build. Capture