r-lib/ragg

install error

Closed this issue Β· 4 comments

I am facing the below error when installing ragg:

β†’ Will download 1 package with unknown size.

  • ragg 1.2.2 β†’ 1.2.6.9000 πŸ‘·πŸ½β€β™€οΈπŸ”§ ⬇ (GitHub: 9cb92fd)
    ? Do you want to continue (Y/n) y
    β„Ή Getting 1 pkg with unknown size
    βœ” Got ragg 1.2.6.9000 (source) (734.17 kB)
    βœ” Downloaded 1 package (734.17 kB)in 5.1s
    β„Ή Packaging ragg 1.2.6.9000
    βœ” Packaged ragg 1.2.6.9000 (2.5s)
    β„Ή Building ragg 1.2.6.9000
    βœ– Failed to build ragg 1.2.6.9000
    Error:
    ! error in pak subprocess
    Caused by error in stop_task_build(state, worker):
    ! Failed to build source package 'ragg'
    Type .Last.error to see the more details.

Any hint?

ragg has just been updated but binaries has not yet been build. So pak is trying to install the source version which requires a number of system libraries that I guess is not available on your system. Either force binaries during install (will currently not install the latest version, wait a few days for cran to serve the newest binaries, or install the required system libraries as given in the DESCRIPTION file

Evening
It seems I have the same issue:
using command: Rscript -e 'withr::with_libpaths(new = "/opt/conda/envs/env_name/lib/R/library", pak::pak("r-lib/ragg@v1.2.0"))' or versions v1.2.5, v1.2.6 or not specifying one I get:
Using bundled GitHub PAT. Please add your own PAT using gitcreds::gitcreds_set().
βœ” Updated metadata database: 2.81 MB in 8 files.
βœ” Updating metadata database ... done

β†’ Will update 1 package.
β†’ Will download 1 package with unknown size.

  • ragg 1.2.5 β†’ 1.2.0 [bld][cmp][dl] (GitHub: abbd24c) + βœ” libfreetype6-dev, βœ” libjpeg-dev, βœ” libpng-dev, βœ” libtiff-dev
    βœ” All system requirements are already installed.

β„Ή Getting 1 pkg with unknown size
βœ” Got ragg 1.2.0 (source) (2.41 MB)
β„Ή Packaging ragg 1.2.0
βœ” Packaged ragg 1.2.0 (5s)
β„Ή Building ragg 1.2.0
βœ– Failed to build ragg 1.2.0
Error:
! error in pak subprocess
Caused by error in stop_task_build(state, worker):
! Failed to build source package 'ragg'
Full installation output:

  • installing source package β€˜ragg’ ...
    staged installation is only possible with locking
    ** using non-staged installation
    Found pkg-config cflags and libs!
    Using PKG_CFLAGS=-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu
    Using PKG_LIBS=-lfreetype -lpng16 -lm -lz -lm -lz -ltiff -lwebp -lzstd -llzma -ljbig -ljpeg -lz -lm
    -----------------------------[ ANTICONF ]-------------------------------
    Configuration failed to find one of freetype2 libpng libtiff-4. Try installing:
  • deb: libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev (Debian, Ubuntu, etc)
  • rpm: freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel (Fedora, CentOS, RHEL)
  • csw: libfreetype_dev libpng16_dev libtiff_dev libjpeg_dev (Solaris)
    If freetype2 libpng libtiff-4 is already installed, check that 'pkg-config' is in your
    PATH and PKG_CONFIG_PATH contains a freetype2 libpng libtiff-4.pc file. If pkg-config
    is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
    R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
    -------------------------- [ERROR MESSAGE] ---------------------------
    In file included from /opt/conda/envs//x86_64-conda-linux-gnu/sysroot/usr/include/features.h:361,
    from /opt/conda/envs/env_name/x86_64-conda-linux-gnu/sysroot/usr/include/limits.h:27,
    from /opt/conda/envs/env_name/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/limits.h:205,
    from /opt/conda/envs/env_name/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/syslimits.h:7,
    from /opt/conda/envs/env_name/lib/gcc/x86_64-conda-linux-gnu/13.2.0/include/limits.h:34,
    from /usr/include/libpng16/pngconf.h:31,
    from /usr/include/libpng16/png.h:339,
    from :2:
    /usr/include/x86_64-linux-gnu/sys/cdefs.h:482:49: error: missing binary operator before token "("
    482 | #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
    | ^
    In file included from /opt/conda/envs/env_name/x86_64-conda-linux-gnu/sysroot/usr/include/stdio.h:932,
    from /usr/include/libpng16/pngconf.h:46:
    /usr/include/x86_64-linux-gnu/bits/stdio2.h:228:17: error: missing binary operator before token "("
    228 | #if __GLIBC_USE (DEPRECATED_GETS)
    | ^

ERROR: configuration failed for package β€˜ragg’

  • removing β€˜/tmp/Rtmp0WKHaK/pkg-lib4b11528370/ragg’

Backtrace:

  1. withr::with_libpaths(new = "/opt/conda/envs/etl_qa_characterise_omop/lib/R/library", …
  2. base::force(code)
  3. pak::pak("r-lib/ragg@v1.2.0")
  4. pak::pkg_install(pkg, ...)
  5. pak:::remote(function(...) get("pkg_install_do_plan", asNamespace("pak"))(...), …
  6. err$throw(res$error)

Subprocess backtrace:

  1. base::withCallingHandlers(cli_message = function(msg) { …
  2. get("pkg_install_do_plan", asNamespace("pak"))(...)
  3. proposal$install()
  4. pkgdepends::install_package_plan(plan, lib = private$library, num_workers = nw, …
  5. base::withCallingHandlers({ …
  6. pkgdepends:::handle_events(state, events)
  7. pkgdepends:::handle_event(state, i)
  8. pkgdepends:::stop_task(state, worker)
  9. pkgdepends:::stop_task_build(state, worker)
  10. base::throw(new_pkg_build_error("Failed to build source package {pkg}", …
  11. | base::signalCondition(cond)
  12. global (function (e) …
    Execution halted

Any ideas?

I do not know how conda works but it seems that people in general install conda specific packages when they want to use it. In any regards this is a conda issue not a ragg issue

jxu commented

Did you try installing the libraries it recommended in the error message? What OS are you on?