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

Problem installing fs #479

Closed
alearrigo opened this issue Nov 16, 2024 · 3 comments
Closed

Problem installing fs #479

alearrigo opened this issue Nov 16, 2024 · 3 comments

Comments

@alearrigo
Copy link

alearrigo commented Nov 16, 2024

Hi,
I'm trying installing fs after upgrading to R 4.4.2 but I get this error if I try to install it in a renv managed project:

 renv::install("fs")
# Downloading packages -------------------------------------------------------
- Downloading fs from CRAN ...                  OK [file is up to date]
Successfully downloaded 1 package in 1.3 seconds.

The following package(s) will be installed:
- fs [1.6.5]
These packages will be installed into "~/Documents/GitHub/VEDA_RG/renv/library/macos/R-4.4/aarch64-apple-darwin20".

Do you want to proceed? [Y/n]: Y

# Installing packages --------------------------------------------------------
- Installing fs ...                             FAILED
Error: Error installing package 'fs':
==============================

* installing *source* package ‘fs’ ...
** package ‘fs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.4)’
using SDK: ‘MacOSX15.1.sdk’
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./libuv-1.44.2/include -I. -pthread  -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp     -fPIC  -falign-functions=64 -Wall -g -O2   -c dir.cc -o dir.o
dir.cc:1:10: fatal error: 'cstring' file not found
    1 | #include <cstring>
      |          ^~~~~~~~~
1 error generated.
make: *** [dir.o] Error 1
ERROR: compilation failed for package ‘fs’
* removing ‘/Users/alessandroarrigo/Documents/GitHub/VEDA_RG/renv/staging/1/fs’
install of package 'fs' failed [error code 1]

No problem instead If I install it the global space outside renv. Any hints on how to solve the problem?

@gaborcsardi
Copy link
Member

You are probably running into this macOS bug: https://trac.macports.org/wiki/SequoiaProblems#CompilingCfails

@alearrigo
Copy link
Author

You are probably running into this macOS bug: https://trac.macports.org/wiki/SequoiaProblems#CompilingCfails

You are probably right, this morning I updated both R and the OS. I temporarily bypassed the problem by copying the old fs folder to the new installation. The really weird thing is that I can install fs (the same problem also happens with gdtools) when I'm working outside renv without any issue. Maybe being renv an isolated environment, it searches for some files in the wrong place.

I close the ticket and I'll open another one in the renv github. Thanks!

@gaborcsardi
Copy link
Member

The really weird thing is that I can install fs (the same problem also happens with gdtools) when I'm working outside renv without any issue.

Because you are probably installing the binary package, so no compilation is needed. I don't know why renv tries to compile it instead of installing the binary.

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