Mac OS Big Sur R compilation error: ld: framework not found CoreFoundation

Viewed 1735

After my Xcode automatically updated itself to 12.4, my Rstudio package compilation breaks and throws the following error:

    ld: framework not found CoreFoundation
    collect2: error: ld returned 1 exit status

I have tried reinstalling Xcode command-line tool; disabling csrutil and then manually creating links, but these attempts were to no avail. I would really appreciate any help!

2 Answers

add -F/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ into LDFLAGS

Related