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

Build failed on ubuntu 14.04.1 #37

Closed
kamyuentse opened this issue Jun 23, 2017 · 5 comments
Closed

Build failed on ubuntu 14.04.1 #37

kamyuentse opened this issue Jun 23, 2017 · 5 comments

Comments

@kamyuentse
Copy link

Build this crate failed on ubuntu 14.04.1:

Host info:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

Build command: cargo build --release --bin front_service --manifest-path ./core/Cargo.toml --verbose

Build log:

   Compiling zookeeper v0.3.0
     Running `rustc --crate-name zookeeper /root/.cargo/registry/src/github.com-1ecc6299db9ec823/zookeeper-0.3.0/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=18afff2b8efa19af -C extra-filename=-18afff2b8efa19af --out-dir /home/ubuntu/web_service/target/release/deps -L dependency=/home/ubuntu/web_service/target/release/deps --extern log=/home/ubuntu/web_service/target/release/deps/liblog-c73672fbee7ce8e5.rlib --extern mio=/home/ubuntu/web_service/target/release/deps/libmio-1e63d8e5040d2907.rlib --extern snowflake=/home/ubuntu/web_service/target/release/deps/libsnowflake-9e3c0622cb044461.rlib --extern lazy_static=/home/ubuntu/web_service/target/release/deps/liblazy_static-593470b8b1e9df82.rlib --extern zookeeper_derive=/home/ubuntu/web_service/target/release/deps/libzookeeper_derive-c12483d6b5c097d3.so --extern byteorder=/home/ubuntu/web_service/target/release/deps/libbyteorder-b7e41c93a912a264.rlib --extern bytes=/home/ubuntu/web_service/target/release/deps/libbytes-9e91f13708218df5.rlib --cap-lints allow`
rustc: /checkout/src/llvm/lib/Analysis/ValueTracking.cpp:1594: void computeKnownBits(const llvm::Value*, llvm::APInt&, llvm::APInt&, unsigned int, const {anonymous}::Query&): Assertion `(KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"' failed.
error: Could not compile `zookeeper`.
@bonifaido
Copy link
Owner

For me this looks like a compiler issue, could you please describe rust version, architecture, etc... and if you could just compile the library itself?

@fulmicoton
Copy link

As commented on the rustc issue it seems to be a bug in the compiler.
A minimal snippet to reproduce would be as follows : https://github.com/fulmicoton/bug_known_bits/blob/master/src/lib.rs.

In the zookeeper codebase, this is induced by the Permission enum that has a repr(32).

The enum is probably not a good idea there, as we can produce values that are not defined in the enum
by combining two permissions.
I am unsure of the use of the Not operations too.

A light change would be to use a struct Permission(u32) instead.

A possible fix is available here : https://github.com/fulmicoton/rust-zookeeper

@fulmicoton
Copy link

is there a date for 0.4 ?

@bonifaido
Copy link
Owner

Why not now? :) I just released 0.4.0 with the latest fix you submitted: https://crates.io/crates/zookeeper/0.4.0

@fulmicoton
Copy link

Awesome

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

3 participants