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

install error #147

Closed
fipoucat opened this issue Oct 11, 2023 · 4 comments
Closed

install error #147

fipoucat opened this issue Oct 11, 2023 · 4 comments

Comments

@fipoucat
Copy link

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?

@thomasp85
Copy link
Member

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

@eBsowka
Copy link

eBsowka commented Oct 17, 2023

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/[email protected]"))' 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/[email protected]")
  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?

@thomasp85
Copy link
Member

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
Copy link

jxu commented Oct 20, 2023

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

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

4 participants