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

GitHub version of markovmix 0.1.2 has broken recognition of available dependencies #1

Open
barracuda156 opened this issue May 28, 2023 · 2 comments

Comments

@barracuda156
Copy link

Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-markovmix/R-markovmix/work/markovmix-0.1.2" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-markovmix/R-markovmix/work/destroot/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library 
ℹ Using R 4.3.0 (lockfile was generated with R 4.0.5)
ERROR: dependencies ‘dplyr’, ‘forcats’, ‘pillar’, ‘purrr’, ‘Rcpp’, ‘rlang’, ‘tibble’, ‘tidyr’ are not available for package ‘markovmix’

At the same time, CRAN version is fine:

Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-markovmix/R-markovmix/work/markovmix" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-markovmix/R-markovmix/work/destroot/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library 
* installing *source* package ‘markovmix’ ...
** package ‘markovmix’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++-mp-12 (MacPorts gcc12 12.2.0_2) 12.2.0’
Warning in system2("xcrun", "--show-sdk-path", TRUE, TRUE) :
  running command ''xcrun' --show-sdk-path 2>&1' had status 64
using SDK: ‘NA’‘NA’‘NA’‘NA’‘NA’‘NA’
/opt/local/bin/g++-mp-12 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/Rcpp/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c RcppExports.cpp -o RcppExports.o
@zhuxr11
Copy link
Owner

zhuxr11 commented May 31, 2023

Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-markovmix/R-markovmix/work/markovmix-0.1.2" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-markovmix/R-markovmix/work/destroot/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library 
ℹ Using R 4.3.0 (lockfile was generated with R 4.0.5)
ERROR: dependencies ‘dplyr’, ‘forcats’, ‘pillar’, ‘purrr’, ‘Rcpp’, ‘rlang’, ‘tibble’, ‘tidyr’ are not available for package ‘markovmix’

At the same time, CRAN version is fine:

Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-markovmix/R-markovmix/work/markovmix" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-markovmix/R-markovmix/work/destroot/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library 
* installing *source* package ‘markovmix’ ...
** package ‘markovmix’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++-mp-12 (MacPorts gcc12 12.2.0_2) 12.2.0’
Warning in system2("xcrun", "--show-sdk-path", TRUE, TRUE) :
  running command ''xcrun' --show-sdk-path 2>&1' had status 64
using SDK: ‘NA’‘NA’‘NA’‘NA’‘NA’‘NA’
/opt/local/bin/g++-mp-12 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/Rcpp/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c RcppExports.cpp -o RcppExports.o

Hi @barracuda156 ,

Thanks for taking interest in my package. It is suggested that you download from CRAN, since it is the latest stable version of this package.

For your issue: If I remember it correct, R CMD INSTALL (or install.packages() function in R) handles dependencies when installing from CRAN, but not when installing from URL or local tar.gz files. If feasible, you may try remotes::install_github("zhuxr11/markovmix") or remotes::install_local("<path_to_your_local_tar.gz>"), which should handle the dependencies for you (update CRAN packages before proceeding to meet the version requirements).

Here is another error-proof solution: If you use renv for project package management, you may also try restoring renv.lock packages before installing this package, which should settle dependencies with the very same setup as the package developer does.

# Download renv.lock file
curl::curl_download("https://raw.githubusercontent.com/zhuxr11/markovmix/master/renv.lock", "renv2.lock")
# Restore packages into current project (you may look for any downgrades in prompt messages, and exclude them using the `exclude` argument)
renv::restore(lockfile = "renv2.lock", exclude = c(<package_names_to_downgrade>))
# Install package (use "./" to denote that this is a path to a file)
renv::install("./markovmix-0.1.2.tar.gz")

Hope these may help.

Best regards,
Xiurui Zhu

@barracuda156
Copy link
Author

@zhuxr11 Thank you for responding.

I was adding markovmix to Macports, and normally I prefer GitHub versions to CRAN, therefore that was the first one to try (and hence this ticket). R, at least in Macports, handles dependencies correctly – among 2500+ R packages tested so far, I encountered this kind of error, I think, 3–4 time maximum.
Unfortunately, I have no idea, what causes it.

For the time-being, I set the port to use CRAN: https://ports.macports.org/port/R-markovmix

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