0

I am having trouble installing the devtools package in R, and it looks like the issue has already been encountered on Mac. I am using the command line

install.packages(“devtools”)

but always get error messages when it tries installing dependencies.

Key error messages are following:

ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture x86_64:

configure: error: C compiler cannot create executables

ERROR: compilation failed for package ‘fs’

Warning in install.packages :
  installation of package ‘fs’ had non-zero exit status

checking whether the C compiler works... no

I can also put the entire error message if needed. Which ends up in the dependancies not being installed and failure to install devtools.

I have tried uninstalling Xcode and reinstalling it, installing the CommandLineTool independently, installing the dependencies independently. I checked the path /Library/Developer/CommandLineTools/SDKs which contains MacOSX.sdk but also MacOSX.sdk 1, MacOSX10.14.sdk and MacOSX10.15.sdk

Yunus Temurlenk
  • 4,085
  • 4
  • 18
  • 39
Lisa
  • 81
  • 8
  • Have you seen this? https://stackoverflow.com/questions/22844522/os-x-10-9-2-checking-whether-the-c-compiler-works-no – Roman Luštrik Mar 06 '20 at 09:57
  • @roman-luštrik I have tried xcode-select --install but it is already installed, I checked gcc version using : `gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin` I tried updating gcc, installing gcc5... – Lisa Mar 06 '20 at 12:48

1 Answers1

0

I finally managed to install devtools after a clean install of Catalina (I guess this works with any OS), and it then asked to install Git, then to update the Command Line Tool from Xcode. After that I could install devtools and the dependancies. However, I don't have any solution to solve the problem without the clean install.

Lisa
  • 81
  • 8