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

Unable to install gifski on Debian 10 Buster with R 4 #15

Closed
ckuenne opened this issue Mar 6, 2021 · 4 comments
Closed

Unable to install gifski on Debian 10 Buster with R 4 #15

ckuenne opened this issue Mar 6, 2021 · 4 comments

Comments

@ckuenne
Copy link

ckuenne commented Mar 6, 2021

i'm trying to to install gifski on Debian 10 with R 4.0.4 and get the following error.

> install_github("r-rust/gifski")
Downloading GitHub repo r-rust/gifski@HEAD
✔  checking for file ‘/tmp/Rtmp2SvLR3/remotes49e24bdf53d8/r-rust-gifski-46b1260/DESCRIPTION’ (656ms)
─  preparing ‘gifski’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘gifski_0.8.7.tar.gz’

* installing *source* package ‘gifski’ ...
** using staged installation
cargo 1.42.1
Using /usr/bin/cargo
** libs
gcc -I"/mnt/software/x86_64/packages/r/4.0.4-buster-local/lib/R/include" -DNDEBUG   -I/usr/local/include  -pthread -fvisibility=hidden -fpic  -g -O2  -c wrapper.c -o wrapper.o
PATH="/home/ckuenne/.cargo/bin:/mnt/software/x86_64/packages/r/4.0.4-buster-local/bin:/mnt/software/x86_64/packages/java/open_jdk_13.0.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" cargo build --release --manifest-path=myrustlib/Cargo.toml
    Updating crates.io index
  Downloaded gifski v0.8.7
  Downloaded error-chain v0.12.4
  Downloaded gif v0.10.3
  Downloaded glob v0.2.11
  Downloaded gif-dispose v2.4.2
  Downloaded natord v1.0.9
  Downloaded imagequant v2.13.0
  Downloaded imgref v1.7.1
  Downloaded lodepng v2.7.3
  Downloaded pbr v1.0.4
  Downloaded clap v2.33.3
  Downloaded wild v2.0.4
  Downloaded rayon v1.5.0
  Downloaded rgb v0.8.25
  Downloaded resize v0.3.1
  Downloaded unicode-width v0.1.8
  Downloaded color_quant v1.1.0
  Downloaded backtrace v0.3.56
  Downloaded lzw v0.10.0
  Downloaded ansi_term v0.11.0
  Downloaded textwrap v0.11.0
  Downloaded version_check v0.9.2
  Downloaded vec_map v0.8.2
  Downloaded atty v0.2.14
  Downloaded strsim v0.8.0
  Downloaded bitflags v1.2.1
  Downloaded crossbeam-channel v0.5.0
  Downloaded time v0.1.44
  Downloaded imagequant-sys v2.13.1
  Downloaded libc v0.2.86
  Downloaded either v1.6.1
  Downloaded rustc-demangle v0.1.18
  Downloaded bytemuck v1.5.1
  Downloaded autocfg v1.0.1
  Downloaded rayon-core v1.9.0
  Downloaded object v0.23.0
  Downloaded cfg-if v1.0.0
  Downloaded addr2line v0.14.1
  Downloaded num_cpus v1.13.0
  Downloaded lazy_static v1.4.0
  Downloaded cc v1.0.67
  Downloaded crossbeam-deque v0.8.0
  Downloaded miniz_oxide v0.4.4
  Downloaded gimli v0.23.0
  Downloaded adler v1.0.2
  Downloaded crossbeam-utils v0.8.3
  Downloaded crossbeam-epoch v0.9.3
  Downloaded memoffset v0.6.1
  Downloaded scopeguard v1.1.0
   Compiling autocfg v1.0.1
   Compiling libc v0.2.86
   Compiling cfg-if v1.0.0
   Compiling lazy_static v1.4.0
   Compiling bytemuck v1.5.1
   Compiling rayon-core v1.9.0
   Compiling cc v1.0.67
   Compiling scopeguard v1.1.0
   Compiling gimli v0.23.0
   Compiling version_check v0.9.2
   Compiling adler v1.0.2
   Compiling bitflags v1.2.1
   Compiling lzw v0.10.0
   Compiling unicode-width v0.1.8
   Compiling color_quant v1.1.0
   Compiling object v0.23.0
   Compiling rustc-demangle v0.1.18
   Compiling vec_map v0.8.2
   Compiling strsim v0.8.0
   Compiling ansi_term v0.11.0
   Compiling imgref v1.7.1
   Compiling either v1.6.1
   Compiling glob v0.2.11
   Compiling natord v1.0.9
error[E0658]: subslice patterns are unstable
   --> /tmp/RtmpuAPSo7/R.INSTALL27217aed716a/gifski/src/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.23.0/src/read/mod.rs:162:41
    |
162 |             [0x7f, b'E', b'L', b'F', 1, ..] => FileKind::Elf32,
    |                                         ^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/62254
...
error: aborting due to 11 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `object`.
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makevars:13: myrustlib/target/release/libmyrustlib.a] Error 101
ERROR: compilation failed for package ‘gifski’
* removing ‘/mnt/software/x86_64/packages/r/4.0.4-buster-local/lib/R/library/gifski’
Error: Failed to install 'gifski' from GitHub:
  (converted from warning) installation of package ‘/tmp/Rtmp2SvLR3/file49e228f34f3e/gifski_0.8.7.tar.gz’ had non-zero exit status

then i checked the rust error.

rustc --explain E0658
An unstable feature was used.

Erroneous code example:

#[repr(u128)] // error: use of unstable library feature 'repr128'
enum Foo {
    Bar(u64),
}

If you're using a stable or a beta version of rustc, you won't be able to use
any unstable features. In order to do so, please switch to a nightly version of
rustc (by using rustup).

If you're using a nightly version of rustc, just add the corresponding feature
to be able to use it:

#![feature(repr128)]

#[repr(u128)] // ok!
enum Foo {
    Bar(u64),
}

the current debian 10 buster rustc is version 1.41.1 and there is no native way to install rustup. so i guess the way forward for now would be to remove the stable debian rustc package and manually install an unstable version instead. which does not seem optimal.

do you see a better way to solve this? can you maybe adapt your code considering "unstable subslice patterns"? here is an explanation for that: rust-lang/rust#67712

@jeroen
Copy link
Member

jeroen commented Mar 6, 2021

That is unfortunate, I'll have a look. In the mean time you can install the previous version of gifski (there are no real changes):

install.packages("https://cran.r-project.org/src/contrib/Archive/gifski/gifski_0.8.6.tar.gz", repos = NULL)

@ckuenne
Copy link
Author

ckuenne commented Mar 6, 2021

that worked perfectly. thx!

@jeroen jeroen closed this as completed in ecc9542 Mar 6, 2021
@jeroen
Copy link
Member

jeroen commented Mar 8, 2021

This is fixed in gifski 0.8.7.1 which is now on CRAN:

install.packages("gifski", repos = "https://cran.r-project.org")

@ckuenne
Copy link
Author

ckuenne commented Mar 8, 2021

ok, thx again.

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