Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install (ubuntu) fail (cargo install sonic-server) #140

Closed
retf opened this issue May 9, 2019 · 9 comments
Closed

Install (ubuntu) fail (cargo install sonic-server) #140

retf opened this issue May 9, 2019 · 9 comments

Comments

@retf
Copy link

retf commented May 9, 2019

ubuntu@ip-10-0-5-62:~$ cargo install sonic-server

Compiling librocksdb-sys v5.18.3
error: failed to compile sonic-server v1.2.0, intermediate artifacts can be found at /tmp/cargo-installA6m7Zx

Caused by:
failed to run custom build command for librocksdb-sys v5.18.3
process didn't exit successfully: /tmp/cargo-installA6m7Zx/release/build/librocksdb-sys-c9acc21d627f997d/build-script-build (exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=rocksdb/
cargo:rerun-if-changed=snappy/
cargo:rerun-if-changed=lz4/
cargo:rerun-if-changed=zstd/
cargo:rerun-if-changed=zlib/
cargo:rerun-if-changed=bzip2/

--- stderr
thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-.so', 'libclang.so.'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (invalid: [])"', src/libcore/result.rs:997:5
note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace.

@valeriansaliou
Copy link
Owner

Did you install libc-dev?

@valeriansaliou
Copy link
Owner

valeriansaliou commented May 9, 2019

And also build-essential

@retf
Copy link
Author

retf commented May 9, 2019

Yes, but libc6-dev, see:

ubuntu@ip-10-0-5-62:~$ sudo apt-get install libc-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libc6-dev' instead of 'libc-dev'
libc6-dev is already the newest version (2.23-0ubuntu11).
The following packages were automatically installed and are no longer required:
linux-aws-headers-4.4.0-1066 linux-aws-headers-4.4.0-1069 linux-aws-headers-4.4.0-1070
linux-aws-headers-4.4.0-1072 linux-aws-headers-4.4.0-1074 linux-headers-4.4.0-1066-aws
linux-headers-4.4.0-1069-aws linux-headers-4.4.0-1070-aws linux-headers-4.4.0-1072-aws
linux-headers-4.4.0-1074-aws linux-image-4.4.0-1066-aws linux-image-4.4.0-1069-aws
linux-image-4.4.0-1070-aws linux-image-4.4.0-1072-aws linux-image-4.4.0-1074-aws
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.


ubuntu@ip-10-0-5-62:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
The following packages were automatically installed and are no longer required:
linux-aws-headers-4.4.0-1066 linux-aws-headers-4.4.0-1069 linux-aws-headers-4.4.0-1070
linux-aws-headers-4.4.0-1072 linux-aws-headers-4.4.0-1074 linux-headers-4.4.0-1066-aws
linux-headers-4.4.0-1069-aws linux-headers-4.4.0-1070-aws linux-headers-4.4.0-1072-aws
linux-headers-4.4.0-1074-aws linux-image-4.4.0-1066-aws linux-image-4.4.0-1069-aws
linux-image-4.4.0-1070-aws linux-image-4.4.0-1072-aws linux-image-4.4.0-1074-aws
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.

@valeriansaliou
Copy link
Owner

Can you try building it on Debian then?

@retf
Copy link
Author

retf commented May 9, 2019

I do not have Debian box!

@valeriansaliou
Copy link
Owner

valeriansaliou commented May 9, 2019

Can you try installing the following packages:

- g++-5
- llvm-3.9-dev
- libclang-3.9-dev
- clang-3.9

And try again building Sonic?

@valeriansaliou
Copy link
Owner

I cannot guarantee Sonic builds w/o those packages required by rust-rocksdb. Otherwise you can try using the Docker version.

@retf
Copy link
Author

retf commented May 9, 2019

After install

  • g++-5
  • llvm-3.9-dev --> sudo apt install llvm-3.9-dev
  • libclang-3.9-dev --> sudo apt install libclang-3.9-dev
  • clang-3.9 --> sudo apt install clang

Success!

ubuntu@ip-10-0-5-62:~$ cargo install sonic-server
// ...
Installing /home/ubuntu/.cargo/bin/sonic

ubuntu@ip-10-0-5-62:~$ ls /home/ubuntu/.cargo/bin/
cargo cargo-clippy cargo-fmt cargo-miri clippy-driver rls rustc rustdoc rustfmt rust-gdb rust-lldb rustup sonic

thanks

@valeriansaliou
Copy link
Owner

Perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants