r-rust / gifski

R wrapper for the 'gifski' Rust Cargo crate.
Other
73 stars 4 forks source link

Installation error #19

Closed mtennekes closed 2 years ago

mtennekes commented 2 years ago

Hi @jeroen

I got this installation error on Ubuntu:

   Compiling resize v0.7.2
   Compiling gif-dispose v3.1.1
error[E0658]: use of unstable library feature 'float_to_from_bytes'
   --> /tmp/RtmpjG5N8c/R.INSTALL6a932062ea99/gifski/src/.cargo/registry/src/github.com-1ecc6299db9ec823/resize-0.7.2/src/lib.rs:317:59
    |
317 |             let key = (end - start, (filter_scale as f32).to_ne_bytes(), (start as f32 - x1 as f32).to_ne_bytes());
    |                                                           ^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/60446

error[E0658]: use of unstable library feature 'float_to_from_bytes'
   --> /tmp/RtmpjG5N8c/R.INSTALL6a932062ea99/gifski/src/.cargo/registry/src/github.com-1ecc6299db9ec823/resize-0.7.2/src/lib.rs:317:101
    |
317 |             let key = (end - start, (filter_scale as f32).to_ne_bytes(), (start as f32 - x1 as f32).to_ne_bytes());
    |                                                                                                     ^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/60446

error[E0658]: use of unstable library feature 'inner_deref': newly added
  --> /tmp/RtmpjG5N8c/R.INSTALL6a932062ea99/gifski/src/.cargo/registry/src/github.com-1ecc6299db9ec823/gif-dispose-3.1.1/src/screen.rs:60:29
   |
60 |         self.blit(local_pal.as_deref(), frame.dispose,
   |                             ^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/50264

error[E0658]: use of unstable library feature 'inner_deref': newly added
  --> /tmp/RtmpjG5N8c/R.INSTALL6a932062ea99/gifski/src/.cargo/registry/src/github.com-1ecc6299db9ec823/gif-dispose-3.1.1/src/screen.rs:73:52
   |
73 |         let mut pal = local_pal.or(self.global_pal.as_deref()).ok_or(Error::NoPalette)?;
   |                                                    ^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/50264

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0658`.
error: aborting due to 2 previous errors

error: could not compile `resize`.
warning: build failed, waiting for other jobs to finish...
For more information about this error, try `rustc --explain E0658`.
error: could not compile `gif-dispose`.
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 ‘/usr/local/lib/R/site-library/gifski’

The downloaded source packages are in
    ‘/tmp/Rtmpy1qG5D/downloaded_packages’
Warning message:
In install.packages("gifski") :
  installation of package ‘gifski’ had non-zero exit status

I got this error when I try to install from CRAN and from remotes::install_github. If you need more information, let me know.

Groeten, Martijn

jeroen commented 2 years ago

Which version of ubuntu are you on? I'm not getting this on my ubuntu 20.04. Also CRAN's debian servers don't show any problems: https://cran.r-project.org/web/checks/check_results_gifski.html

mtennekes commented 2 years ago

Also 20.04:

 setting  value
 version  R version 4.1.2 (2021-11-01)
 os       Ubuntu 20.04.4 LTS
 system   x86_64, linux-gnu
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/Amsterdam
 date     2022-03-09
 rstudio  2022.02.0+443 Prairie Trillium (desktop)
 pandoc   2.17.1.1 @ /usr/lib/rstudio/bin/quarto/bin/ (via rmarkdown)

Which linux libraries does the installation depend on, that are worth checking?

jeroen commented 2 years ago

The only thing it depends on is cargo. What is your cargo --version ? I get:

cargo --version
cargo 1.57.0
mtennekes commented 2 years ago

It's been installed now!

I had an older version 1.39. Then I tried to upgrade but failed due to a problem of a missing Cargo.toml. I removed the .cargo folder and apparently that did the trick.

Thanks!