-
Notifications
You must be signed in to change notification settings - Fork 20
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
Installation fails due to compilation error: "format not a string literal and no format arguments [-Werror=format-security]" #123
Comments
The error does not appear when installing from source: remotes::install_github("https://github.com/Bioconductor/S4Vectors.git") |
You're installing from source in both case. However, in the first case, you're not showing what command you're using to install the package. You're also not showing your Make sure to always use |
Thanks for the hint, here it is:
I'm installing a package I made with However, in that case the dependency resolves to an older version of BioConductor (3.18):
Manually running
This last bit is reasonable, since BiocManager is on that version:
I don't know why there is a difference between devtools and BiocManager installs, nor how to specify the proper BioConductor version in my DESCRIPTION file. |
Hi @naikymen BiocManager::install(version = "devel") If you need to install Bioconductor dependencies for your package, use remotes::install_local("./myPackage", repos = BiocManager::repositories(), dependencies = TRUE) (Presumably you have a local checkout of the package that you are developing.) PS. Bioconductor 3.18 uses R 4.3.0 so that is not compatible with your installation. Best regards, |
I've sometimes seen the advice to add
I'm guessing that this comes from the remotes package https://github.com/r-lib/remotes/blob/5b7eb08f70ecc4f885f2c75330ce77f87e7dd14e/R/bioc-standalone.R#L217. Looking at the code makes it seem like it will do something close to the right thing, looking first in a hard-coded map and then parsing bioconductor.org/config.yaml if necessary. @LiNk-NY is the logic in the remotes package incorrect? @naikymen what command were you using when trying to install with devtools? Can you make a simple reproducible example (e.g., if it is your own package, pointing to a public repository)? |
Hello Marcel and mtmorgan, thank you for the responses. Do you mean that I want to provide my users with a simple way to install my package. So far I had been using Now the problem seems to be that The following is an acceptable solution for me (thanks!). However, I'd like to check if it is the proper way for users to install my package (or any R package at GitHub) with the latest versions of BioConductor dependencies: install.packages("BiocManager")
remotes::install_github("darksideoftheshmoo/rcell2-magick", repos = BiocManager::repositories()) Should I still include
The commands that fail are: devtools::install() # Install from the current directory.
remotes::install_github("darksideoftheshmoo/rcell2-magick") # Install from GitHub. Here is the repository: https://github.com/darksideoftheshmoo/rcell2-magick And here is a reprex with a dummy package: https://github.com/darksideoftheshmoo/reprex remotes::install_github("darksideoftheshmoo/reprex") # Install from GitHub. That command uses Bioc 3.18 and fails during compilation. Adding |
This is what strikes me. I'm on R 4.4.0, so why would |
Closing this, as it is not related to S4Vectors at all. Raised an issue in Thank you for your help! |
FWIW I would install CRAN or GitHub packages that directly or indirectly depend on Bioconductor packages with something like pkgs <- setdiff(c("BiocManager", "remotes"), rownames(installed.packages()))
install.packages(pkgs, repos = "https://cloud.R-project.org")
BiocManager::install("darksideoftheshmoo/reprex") The instructions in section 2.3 of the BiocManager vignette would lead to this solution (trying without first installing remotes would lead to a prompt describing how to install remotes). |
Hi! I'm having trouble installing the package on Arch Linux.
Error message:
R version:
The text was updated successfully, but these errors were encountered: