alexcrichton / xz2-rs

Bindings to liblzma in Rust (xz streams in Rust)
Apache License 2.0
83 stars 51 forks source link

lzma-sys build fails on OpenSUSE 42 #22

Open alexjh opened 6 years ago

alexjh commented 6 years ago

I'm very new to rust, trying to build the AVR Rust fork, and it's failing when building lzma-sys.

I think the issue is with this package; if not, could you point me in the right direction? I'm following the instructions to build the compiler and it's failing here:

$ make
...
error: could not find native static library `lzma`, perhaps an -L flag is missing?

error: Could not compile `lzma-sys`.
warning: build failed, waiting for other jobs to finish...
error: build failed
...

In OpenSUSE, the lib dir defaults to lib64. If I make a symlink, the build can proceed:

$ cd ./build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/build/lzma-sys-b5e13e4c4ffea1be/out
$ ls -l
total 4
drwxr-xr-x 1 alexh users 160 Jan  8 11:40 build
drwxr-xr-x 1 alexh users  20 Jan  8 11:40 include
drwxr-xr-x 1 alexh users  56 Jan  8 11:40 lib64
drwxr-xr-x 1 alexh users 526 Jan  8 11:40 src
$ ln -s lib64 lib
$ cd -
$ make
...
Compiling lzma-sys v0.1.8
...
alexcrichton commented 6 years ago

Hello! This is indeed a suspicious package for that although it may or may not be the cause. If this happens it may indicate that pkg-config reports that liblzma is installed but it ends up not actually getting found? Know why that may be?