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

pkgload:::generate_db() fails #287

Closed
TimTaylor opened this issue Jun 28, 2024 · 1 comment · Fixed by #288
Closed

pkgload:::generate_db() fails #287

TimTaylor opened this issue Jun 28, 2024 · 1 comment · Fixed by #288

Comments

@TimTaylor
Copy link
Contributor

TimTaylor commented Jun 28, 2024

I'm trying the new compilation database functionality in the 1.4.0 release and it keeps failing with:

Warning message:
! System command 'make' failed 

Digging deeper and running pkgload:::generate_db() directly I get the following, more useful, error

Error in `processx::run("make", c(makevars, "print-compilers"), env = env)`:
! System command 'make' failed
---
Exit status: 2
Stderr:
/usr/lib64/R/etc/Makeconf:10: /usr/lib64/R/share/make/vars.mk: No such file or directory
make: *** No rule to make target '/usr/lib64/R/share/make/vars.mk'.  Stop.

Note I'm running on R 4.4.1 on Fedora Linux 40. For me vars.mk is found in /usr/share/R/make/vars.mk not the address looked for above.

Currently I'm unsure if this is pkgload / processx /R or Fedora related (tagging @Enchufa2 in case of the latter).

@TimTaylor
Copy link
Contributor Author

TimTaylor commented Jun 28, 2024

Further digging. I think this line is incorrect in pkgload

R_SHARE_DIR = fs::path(R.home(), "share")

I guess better first to check whether the environment variable is set and then fall back only if not

R_SHARE_DIR = Sys.getenv("R_SHARE_DIR", unset = fs::path(R.home(), "share") )

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

Successfully merging a pull request may close this issue.

1 participant