sunchao / parquet-rs

Apache Parquet implementation in Rust
Apache License 2.0
149 stars 20 forks source link

Cannot run parquet-read binary #76

Closed andygrove closed 6 years ago

andygrove commented 6 years ago

I cloned the repo, ran cargo clean then cargo build but then cannot run the parquet-read binary.

andy@freedom:~/git/parquet-rs$ cargo build
   Compiling cc v1.0.9
   Compiling libc v0.2.40
   Compiling cfg-if v0.1.2
   Compiling void v1.0.2
   Compiling alloc-no-stdlib v1.2.0
   Compiling num-traits v0.2.2
   Compiling integer-encoding v1.0.5
   Compiling lazy_static v1.0.0
   Compiling byteorder v1.2.2
   Compiling parquet v0.1.0 (file:///home/andy/git/parquet-rs)
   Compiling try_from v0.2.2
   Compiling byteorder v0.5.3
   Compiling quick-error v1.2.1
   Compiling x86intrin v0.4.5
   Compiling log v0.4.1
   Compiling unreachable v0.1.1
   Compiling brotli-decompressor v1.2.1
   Compiling snap v0.2.4
   Compiling num_cpus v1.8.0
   Compiling rand v0.4.2
   Compiling num-traits v0.1.43
   Compiling log v0.3.9
   Compiling ordered-float v0.5.0
   Compiling threadpool v1.7.1
   Compiling miniz-sys v0.1.10
   Compiling thrift v0.0.4
   Compiling brotli v1.2.0
   Compiling flate2 v0.2.20
    Finished dev [unoptimized + debuginfo] target(s) in 23.33 secs

andy@freedom:~/git/parquet-rs$ ./target/debug/parquet-read 
./target/debug/parquet-read: error while loading shared libraries: libstd-990ef2cc9d91a9e2.so: cannot open shared object file: No such file or directory

I do not have this libstd library. The closest I have are:

$ find /usr -name "libstd*.so"
/usr/lib/x86_64-linux-gnu/coreutils/libstdbuf.so
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.so
sadikovi commented 6 years ago

I had this problem, you just need to update LD_LIBRARY_PATH / DYLIB_LIBRARY_PATH. This also happens when you run cargo install and try using parquet-read or parquet-schema.

One way of doing it is running cargo run --bin parquet-read XYZ.parquet.

Another is setting export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib or appropriate env variable on OSX. After that ./parquet-read file.parquetshould work.

sunchao commented 6 years ago

Close this now and filed #111 to update README.