Package installation failure hides error message
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
I was trying to restore a snapshot, and I got this output:
Packrat is not installed in the local library -- attempting to bootstrap an installation...
> Installing packrat into project private library:
- 'packrat/lib/x86_64-apple-darwin18.2.0/3.5.3'
* installing *source* package ‘packrat’ ...
** package ‘packrat’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (packrat)
> Attaching packrat
> Restoring library
> Packrat bootstrap successfully completed. Restarting R and entering packrat mode...
Restarting R session...
> packrat::restore()
…
…
Installing git2r (0.24.0) ...
[1] "Command failed (1)\n\nFailed to run system command:\n\n\t'/usr/local/Cellar/r/3.5.3/lib/R/bin/R' --vanilla CMD INSTALL '/private/var/folders/m6/mj4fjkpj2gj4s22zc3wfnchr0000gn/T/RtmpOgB1QR/git2r' --library='/Users/werner/Documents/Projects/best-net/best-net-data-analysis/data-analyze/rscript/packrat/lib/x86_64-apple-darwin18.2.0/3.5.3' --install-tests --no-docs --no-multiarch --no-demo \n\nThe command failed with output:\n* installing *source* package 'git2r' ...\n** package 'git2r' successfully unpacked and MD5 sums checked\nchecking build system type... x86_64-apple-darwin18.5.0\nchecking host system type... x86_64-apple-darwin18.5.0\nchecking for gcc... gcc\nchecking whether the C compiler works... yes\nchecking for C compiler default output file name... a.out\nchecking for suffix of executables... \nchecking whether we are cross compiling... no\nchecking for suffix of object files... o\nchecking whether we are using the GNU C compiler... yes\nchecking whether gcc accepts -g... yes\nchecking for gcc option to accept ISO C89... none needed\nchecking for pkg-config... /usr/local/bin/pkg-config\nchecking pkg-config is at least version 0.9.0... yes\nchecking for brew... yes\nchecking whether the libgit2 version will work in git2r... no\n----- Results of the git2r package configure -----\n\n PKG_CFLAGS: \n PKG_LIBS: -lgit2\n\n--------------------------------------------------\nconfigure: error: in `/private/var/folders/m6/mj4fjkpj2gj4s22zc3wfnchr0000gn/T/RtmpOgB1QR/git2r':\nconfigure: error: \n ---------------------------------------------\n The libgit2 library that is required to build git2r was not found.\n\n Please install:\n libgit2-dev (package on e.g. Debian and Ubuntu)\n libgit2-devel (package on e.g. Fedora, CentOS and RHEL)\n libgit2 (Homebrew package on macOS)\n and try again.\n\n If the libgit2 library is installed on your system but the git2r configuration is\n unable to find it, you can specify the include and lib path to libgit2 with:\n R CMD INSTALL git2r --configure-vars='INCLUDE_DIR=path/to/include LIB_DIR=path/to/lib'\n ---------------------------------------------\nSee `config.log' for more details\nERROR: configuration failed for package 'git2r'\n* removing '/Users/werner/Documents/Projects/best-net/best-net-data-analysis/data-analyze/rscript/packrat/lib/x86_64-apple-darwin18.2.0/3.5.3/git2r'"
Error: Command failed (1)
Failed to run system command:
'/usr/local/Cellar/r/3.5.3/lib/R/bin/R' --vanilla CMD INSTALL '/private/var/folders/m6/mj4fjkpj2gj4s22zc3wfnchr0000gn/T/RtmpOgB1QR/git2r' --library='/Users/werner/Documents/Projects/best-net/best-net-data-analysis/data-analyze/rscript/packrat/lib/x86_64-apple-darwin18.2.0/3.5.3' --install-tests --no-docs --no-multiarch --no-demo
The command failed with output:
* installing *source* package 'git2r' ...
** package 'git2r' successfully unpacked and MD5 sums checked
checking build system type... x86_64-apple-darwin18.5.0
checking host system type... x86_64-apple-darwin18.5.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for
In addition: Warning message:
In packrat::restore() :
The most recent snapshot was generated using R version 3.5.2
As you can see, the actual error is not present. I see "failed with output", but it is truncated at "checking for".
The actual error is buried in the string that is printed with Command failed, which includes newline characters etc.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with packrat::restore() and trace the handling of the failed system command output. Check why the reported output stops at "checking for" while the full error is embedded in the Command failed string; done means the actual installation error is shown without truncation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100