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 fails : use of unstable library feature 'ptr_cast' #6

Open
arcenik opened this issue May 23, 2020 · 0 comments
Open

Build fails : use of unstable library feature 'ptr_cast' #6

arcenik opened this issue May 23, 2020 · 0 comments

Comments

@arcenik
Copy link

arcenik commented May 23, 2020

Hi,

When building the current version using Docker it fails due to this error:

Step 1/9 : FROM ekidd/rust-musl-builder:1.36.0 as builder
 ---> 199e6dcf7c1c
...
Step 4/9 : RUN make
 ---> Running in 6c5eeea56895
cargo build -vv --release
...
   Compiling itoa v0.4.5
     Running `CARGO_PKG_VERSION_MINOR=4 CARGO_MANIFEST_DIR=/home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.5 CARGO_PKG_VERSION_PATCH=5 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_PRE= CARGO_PKG_VERSION=0.4.5 LD_LIBRARY_PATH
='/home/rust/src/target/release/deps:/home/rust/.rustup/toolchains/1.36.0-x86_64-unknown-linux-gnu/lib:/home/rust/.rustup/toolchains/1.36.0-x86_64-unknown-linux-gnu/lib' CARGO_PKG_DESCRIPTION='Fast functions for printing integer primitives to 
an io::Write' CARGO_PKG_HOMEPAGE= CARGO_PKG_NAME=itoa CARGO_PKG_AUTHORS='David Tolnay <[email protected]>' CARGO_PKG_REPOSITORY='https://github.com/dtolnay/itoa' CARGO=/home/rust/.rustup/toolchains/1.36.0-x86_64-unknown-linux-gnu/bin/cargo rus
tc --crate-name itoa /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/itoa-0.4.5/src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=89ec0
5bcb7a58bf5 -C extra-filename=-89ec05bcb7a58bf5 --out-dir /home/rust/src/target/x86_64-unknown-linux-musl/release/deps --target x86_64-unknown-linux-musl -L dependency=/home/rust/src/target/x86_64-unknown-linux-musl/release/deps -L dependency=
/home/rust/src/target/release/deps --cap-lints warn`
error[E0658]: use of unstable library feature 'ptr_cast'
  --> /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.19.0/src/pod.rs:35:30
   |
35 |     let val = unsafe { &*ptr.cast() };
   |                              ^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/60602

error[E0658]: use of unstable library feature 'ptr_cast'
  --> /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.19.0/src/pod.rs:53:52
   |
53 |     let slice = unsafe { slice::from_raw_parts(ptr.cast(), count) };
   |                                                    ^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/60602

error[E0658]: use of unstable library feature 'ptr_cast'
  --> /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.19.0/src/pod.rs:65:66
   |
65 |     unsafe { slice::from_raw_parts(slice::from_ref(val).as_ptr().cast(), size) }
   |                                                                  ^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/60602

Using the latest version of ekidd/rust-musl-builder (1.43.1) fixes the issue.

The complete build log for both versions:
build-1.36.0.log
build-1.43.1.log

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

1 participant