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_deps issue on R-devel OSX #1530

Closed
colearendt opened this issue Jun 20, 2017 · 10 comments
Closed

install_deps issue on R-devel OSX #1530

colearendt opened this issue Jun 20, 2017 · 10 comments
Assignees
Labels
bug an unexpected problem or unintended behavior install

Comments

@colearendt
Copy link

Hello,

I am using Travis CI to test the xlsx package on OSX with R-devel. The build has been successful on all combinations of OS / versions of R except (OSX, R-devel). The failing step seems to be related to devtools::install_deps, which seems to somehow be missing and not installing the packages that are currently in Depends.

Both packages are available from CRAN (rJava and xlsxjars) and again, the build is successful elsewhere (even R-devel on UNIX), which suggests to me that this is something perhaps to be addressed in the new version of R on OSX.

Not sure how to be of any assistance with this other than providing the log:

and the failing step:

[0K$ Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'

missing: rJava, xlsxjars
@hadley hadley added bug an unexpected problem or unintended behavior install labels Aug 1, 2017
@hadley
Copy link
Member

hadley commented Aug 1, 2017

@jimhester can you please have a look at this travis issue?

@jimhester
Copy link
Member

jimhester commented Aug 2, 2017

The build log doesn't provide any clues unfortunately, but this may be due to you running R CMD javareconf on MacOS, try removing that and see if the build passes.

@hadley hadley closed this as completed Aug 2, 2017
@colearendt
Copy link
Author

Same issue after removing R CMD javareconf.

$ Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'
missing: rJava, xlsxjars

The command "Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .

Is there any way to add additional verbosity to the log that would be helpful? Or a way to test this out locally? I am happy to contribute, but am ignorant of how to test these sorts of builds locally. If this is an issue with devtools, I would love to figure it out before the next R release.

Config on most recent build:

{
  "language": "r",
  "os": "osx",
  "sudo": true,
  "cache": "packages",
  "r": "devel",
  "before_script": [
    "java -version",
    "echo PATH=$PATH",
    "echo JAVA_HOME=$JAVA_HOME"
  ],
  "after_success": [
    "Rscript -e 'covr::codecov()'"
  ]
}

@jimhester
Copy link
Member

Try just using a install block for those dependencies explicitly and remove devtools out of the equation entirely.

install: 
  - R -e 'install.packages(c("rJava", "xlsxjars"))'

@colearendt
Copy link
Author

The install block (required all dependencies) was a successful workaround for the devtools issue. I am out of ideas for what might be the root issue, as it does not look like devtools even tries to install the packages before failing. I also tried moving the packages from Depends to Imports, unfortunately to no avail. Not sure if there is something about these dependencies in particular that is a problem. Perhaps it would be worth building a test package that allows more easily declaring various dependencies to see where the root cause is. Is this concerning in any regard from a devtools perspective; enough to warrant re-opening? Might it be something related to building from source or the version of R that packages are built with on CRAN? (i.e. if it does not look like the packages are on CRAN because it is running on R 3.5?)

It is definitely less than ideal to have to maintain a list of all dependencies in DESCRIPTION, as well as in .travis.yml, when devtools works great on all other OS / version combinations.

@colearendt
Copy link
Author

@jimhester I am fairly concerned this might be a devtools bug that is worth re-opening. I created a basic package with RStudio, and the build on osx with R 3.5 is failing with the same problems. I tested rJava by itself, as well as dplyr by itself. Both failed with the same error message, suggesting that the packages are not the problem.

It seems that for some reason, devtools is not installing dependencies appropriately on osx / R 3.5. The hope is that this would only be due to it being a "devel" release at present and perhaps something about how CRAN is built, but it might be worth doing some deeper digging to be sure. I am unsure of the best way to do so or what next steps might be beneficial.

@colearendt
Copy link
Author

Related to #1370, perhaps, although this problem is only on OSX and the devel version of R, so not sure whether there is any relationship.

@colearendt
Copy link
Author

@hadley @jimhester I think this ought to be reopened and addressed, as it suggests a universal problem with devtools properly installing dependencies on devel / OSX. I would think it is preferable to resolve the issue before R 3.5 is released. (Again - build failure with a dependency only on dplyr)

@colearendt
Copy link
Author

More OSX R-devel build failures on otherwise good builds... not sure if this is related or not. Maybe R-devel is having problems on OSX and devtools just did not handle it nicely... (or handled it too nicely to give a nice warning / error)

curl -fLo /tmp/R.pkg https://r.research.att.com/mavericks/R-devel/R-devel-mavericks-signed.pkg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
The command "eval curl -fLo /tmp/R.pkg https://r.research.att.com/mavericks/R-devel/R-devel-mavericks-signed.pkg " failed. Retrying, 2 of 3.

Confirmed that the same failure occurred on my previous test (fail is on R install now, before devtools goes to work). Here is to hoping that R-3.5 is the problem and not devtools!

@lock
Copy link

lock bot commented Sep 17, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Sep 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior install
Projects
None yet
Development

No branches or pull requests

3 participants