ankane / ruby-polars

Blazingly fast DataFrames for Ruby
MIT License
852 stars 33 forks source link

Error while installing using force_ruby_platform #55

Closed woodhull closed 7 months ago

woodhull commented 7 months ago

Bundle install fails when gem is included using force_ruby_platform option, which should force local compilation.

gem 'polars-df', require: false, force_ruby_platform: true

Output of bundle install:

error: multiple input filenames provided (first two filenames are ext/polars/src/lib.rs and RUSTFLAGS=-C)

error: could not compile polars (lib) due to 1 previous error make: *** [target/release/libpolars.dylib] Error 101

make failed, exit code 2

Gem files will remain installed in /Users/nathanwoodhull/.rvm/gems/ruby-3.3.0@nashville/gems/polars-df-0.9.0 for inspection. Results logged to /Users/nathanwoodhull/.rvm/gems/ruby-3.3.0@nashville/extensions/arm64-darwin-23/3.3.0/polars-df-0.9.0/gem_make.out

ankane commented 7 months ago

Hi @woodhull, I'm not able to reproduce. What Rust version are you running, and what are the contents of gem_make.out?

woodhull commented 7 months ago

rustc 1.77.1 (7cf61ebde 2024-03-27) (Homebrew) current directory: /Users/nathanwoodhull/.rvm/gems/ruby-3.3.0@nashville/gems/polars-df-0.9.0/ext/polars /Users/nathanwoodhull/.rvm/rubies/ruby-3.3.0/bin/ruby extconf.rb RUSTFLAGS\=-C target-feature\=-crt-static checking for gcc... yes checking for g++ -std=gnu++11... no checking for /Library/Developer/CommandLineTools/usr/bin/ar... yes checking for cargo... yes

current directory: /Users/nathanwoodhull/.rvm/gems/ruby-3.3.0@nashville/gems/polars-df-0.9.0/ext/polars make DESTDIR\= sitearchdir\=./.gem.20240331-27807-tckw5a sitelibdir\=./.gem.20240331-27807-tckw5a clean

current directory: /Users/nathanwoodhull/.rvm/gems/ruby-3.3.0@nashville/gems/polars-df-0.9.0/ext/polars make DESTDIR\= sitearchdir\=./.gem.20240331-27807-tckw5a sitelibdir\=./.gem.20240331-27807-tckw5a generating target/release/libpolars.dylib (release) cargo rustc --manifest-path ./Cargo.toml --target-dir target --lib --profile release RUSTFLAGS=-C target-feature=-crt-static -- -C linker=gcc -L native=/Users/nathanwoodhull/.rvm/rubies/ruby-3.3.0/lib -L native=/opt/homebrew/opt/libyaml/lib -L native=/opt/homebrew/opt/libksba/lib -L native=/opt/homebrew/opt/readline/lib -L native=/opt/homebrew/opt/zlib/lib -L native=/opt/homebrew/opt/openssl@1.1/lib -C link-arg=-Wl,-undefined,dynamic_lookup -l pthread Downloading crates ... Downloaded argminmax v0.6.1 Downloaded polars-lazy v0.38.1 Downloaded polars-plan v0.38.1 Downloaded polars-parquet v0.38.1 Downloaded polars-arrow v0.38.1 Downloaded chrono v0.4.31 Downloaded polars-utils v0.38.1 Downloaded polars-compute v0.38.1 Downloaded polars-error v0.38.1 Downloaded polars-core v0.38.1 Downloaded polars-time v0.38.1 Downloaded polars-row v0.38.1 Downloaded polars-pipe v0.38.1 Downloaded polars-io v0.38.1 Downloaded polars v0.38.1 Downloaded polars-sql v0.38.1 Downloaded polars-json v0.38.1 Downloaded polars-ops v0.38.1 Compiling libc v0.2.151 Compiling proc-macro2 v1.0.74 Compiling unicode-ident v1.0.12 Compiling version_check v0.9.4 Compiling cfg-if v1.0.0 Compiling autocfg v1.1.0 Compiling serde v1.0.194 Compiling memchr v2.7.1 Compiling crossbeam-utils v0.8.18 Compiling regex-syntax v0.8.2 Compiling libm v0.2.8 Compiling once_cell v1.19.0 Compiling ahash v0.8.7 Compiling num-traits v0.2.17 Compiling aho-corasick v1.1.2 Compiling zerocopy v0.7.32 Compiling regex-automata v0.4.3 Compiling crossbeam-epoch v0.9.17 Compiling getrandom v0.2.11 Compiling jobserver v0.1.27 Compiling cc v1.0.83 Compiling quote v1.0.35 Compiling rayon-core v1.12.1 Compiling crossbeam-deque v0.8.4 Compiling syn v2.0.46 Compiling static_assertions v1.1.0 Compiling either v1.9.0 Compiling siphasher v0.3.11 Compiling allocator-api2 v0.2.16 Compiling serde_json v1.0.110 Compiling phf_shared v0.11.2 Compiling equivalent v1.0.1 Compiling rand_core v0.6.4 Compiling crc32fast v1.3.2 Compiling rayon v1.9.0 Compiling futures-core v0.3.30 Compiling ryu v1.0.16 Compiling pin-project-lite v0.2.13 Compiling itoa v1.0.10 Compiling rand v0.8.5 Compiling slab v0.4.9 Compiling futures-sink v0.3.30 Compiling regex v1.10.2 Compiling core-foundation-sys v0.8.6 Compiling pkg-config v0.3.28 Compiling target-features v0.1.5 Compiling phf_generator v0.11.2 Compiling snap v1.1.1 Compiling rle-decode-fast v1.0.3 Compiling libflate_lz77 v1.2.0 Compiling phf_codegen v0.11.2 Compiling parse-zoneinfo v0.3.0 Compiling zstd-sys v2.0.9+zstd.1.5.5 Compiling futures-channel v0.3.30 Compiling phf v0.11.2 Compiling array-init-cursor v0.2.0 Compiling futures-io v0.3.30 Compiling futures-task v0.3.30 Compiling crc-catalog v1.1.1 Compiling thiserror v1.0.56 Compiling syn v1.0.109 Compiling adler32 v1.2.0 Compiling pin-utils v0.1.0 Compiling fallible-streaming-iterator v0.1.9 Compiling libflate v1.4.0 Compiling crc v2.1.0 Compiling chrono-tz-build v0.2.1 Compiling planus v0.3.1 Compiling iana-time-zone v0.1.59 Compiling lz4-sys v1.9.4 Compiling hashbrown v0.14.3 Compiling smartstring v1.0.1 Compiling simdutf8 v0.1.4 Compiling zstd-safe v7.0.0 Compiling chrono-tz v0.8.5 Compiling polars-utils v0.38.1 Compiling sysinfo v0.30.3 Compiling lexical-util v0.8.5 Compiling polars-arrow v0.38.1 Compiling atoi v2.0.0 Compiling lock_api v0.4.11 Compiling fast-float v0.2.0 Compiling ethnum v1.5.0 Compiling foreign_vec v0.1.0 Compiling dyn-clone v1.0.16 Compiling strength_reduce v0.2.4 Compiling itoap v1.0.1 Compiling parking_lot_core v0.9.9 Compiling serde_derive v1.0.194 Compiling futures-macro v0.3.30 Compiling thiserror-impl v1.0.56 Compiling bytemuck_derive v1.5.0 Compiling atoi_simd v0.15.6 Compiling futures-util v0.3.30 Compiling bytemuck v1.14.0 Compiling streaming-iterator v0.1.9 Compiling smallvec v1.11.2 Compiling scopeguard v1.2.0 Compiling rustversion v1.0.14 Compiling lexical-parse-integer v0.8.6 Compiling lexical-write-integer v0.8.5 Compiling hashbrown v0.13.2 Compiling ppv-lite86 v0.2.17 Compiling ref-cast v1.0.22 Compiling rand_chacha v0.3.1 Compiling lexical-write-float v0.8.5 Compiling parking_lot v0.12.1 Compiling lexical-parse-float v0.8.5 Compiling multiversion-macros v0.7.3 Compiling ref-cast-impl v1.0.22 Compiling futures-executor v0.3.30 Compiling float-cmp v0.9.0 Compiling futures v0.3.30 Compiling polars-compute v0.38.1 Compiling glob v0.3.1 Compiling heck v0.4.1 Compiling lexical-core v0.8.5 Compiling clang-sys v1.7.0 Compiling polars-core v0.38.1 Compiling strum_macros v0.25.3 Compiling async-trait v0.1.77 Compiling strum v0.25.0 Compiling log v0.4.20 Compiling alloc-no-stdlib v2.0.4 Compiling unicode-width v0.1.11 Compiling alloc-stdlib v0.2.2 Compiling polars-ops v0.38.1 Compiling base64 v0.21.5 Compiling xxhash-rust v0.8.8 Compiling rand_distr v0.4.3 Compiling multiversion v0.7.3 Compiling minimal-lexical v0.2.1 Compiling adler v1.0.2 Compiling unicode-segmentation v1.10.1 Compiling nom v7.1.3 Compiling miniz_oxide v0.7.1 Compiling libloading v0.8.1 Compiling brotli-decompressor v2.5.1 Compiling async-stream-impl v0.3.5 Compiling indexmap v2.1.0 Compiling bitflags v2.4.1 Compiling chrono v0.4.31 Compiling polars-arrow-format v0.1.0 Compiling raw-cpuid v11.0.1 Compiling halfbrown v0.2.4 Compiling crossterm v0.27.0 Compiling value-trait v0.8.0 Compiling comfy-table v7.1.0 Compiling unicode-reverse v1.0.8 Compiling avro-schema v0.3.0 Compiling simd-json v0.13.4 Compiling polars-error v0.38.1 Compiling argminmax v0.6.1 Compiling socket2 v0.5.5 Compiling jsonpath_lib_polars_vendor v0.0.1 Compiling num_cpus v1.16.0 Compiling mio v0.8.10 Compiling hex v0.4.3 Compiling seq-macro v0.3.5 Compiling bytes v1.5.0 Compiling bindgen v0.69.1 Compiling tokio v1.35.1 Compiling now v0.1.3 Compiling cexpr v0.6.0 Compiling parquet-format-safe v0.2.4 Compiling brotli v3.4.0 Compiling async-stream v0.3.5 Compiling flate2 v1.0.28 Compiling streaming-decompression v0.1.2 Compiling peeking_take_while v0.1.2 Compiling lazy_static v1.4.0 Compiling rustc-hash v1.1.0 Compiling lazycell v1.3.0 Compiling shlex v1.2.0 Compiling memmap2 v0.7.1 Compiling polars-plan v0.38.1 Compiling shell-words v1.1.0 Compiling home v0.5.9 Compiling percent-encoding v2.3.1 Compiling polars-pipe v0.38.1 Compiling uuid v1.7.0 Compiling enum_dispatch v0.3.12 Compiling crossbeam-channel v0.5.10 Compiling crossbeam-queue v0.3.10 Compiling polars-lazy v0.38.1 Compiling libmimalloc-sys v0.1.35 Compiling rb-sys-env v0.1.2 Compiling tokio-util v0.7.10 Compiling magnus v0.6.2 Compiling sqlparser v0.39.0 Compiling polars v0.38.1 Compiling magnus-macros v0.6.0 Compiling rb-sys-build v0.9.90 Compiling mimalloc v0.1.39 Compiling rb-sys v0.9.90 Compiling lz4 v1.24.0 Compiling zstd v0.13.0 Compiling polars-row v0.38.1 Compiling polars-json v0.38.1 Compiling polars-parquet v0.38.1 Compiling polars-time v0.38.1 Compiling polars-io v0.38.1 Compiling polars-sql v0.38.1 Compiling polars v0.9.0 (/Users/nathanwoodhull/.rvm/gems/ruby-3.3.0@nashville/gems/polars-df-0.9.0/ext/polars) error: multiple input filenames provided (first two filenames are ext/polars/src/lib.rs and RUSTFLAGS=-C)

error: could not compile polars (lib) due to 1 previous error make: *** [target/release/libpolars.dylib] Error 101

make failed, exit code 2

woodhull commented 7 months ago

I figured this out, while trying to get bundle to install I had set the bundle config.

woodhull commented 7 months ago

after unsetting the config, everything works. My apologies.