6

I want to install GenomicAlignments R package, however the installation crushes because it can't install one of the dependancies which is RCurl. When I try to install RCurl alone by running install.packages("RCurl"), I get the following error:

ld: file not found: /usr/lib/system/libsystem_darwin.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [RCurl.so] Error 1
ERROR: compilation failed for package ‘RCurl’
* removing ‘/usr/local/lib/R/3.4/site-library/RCurl’
Warning in install.packages :
  installation of package ‘RCurl’ had non-zero exit status

This is the sessionInfo():

R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin16.7.0 (64-bit)
Running under: macOS Sierra 10.12.6

I traced it down to faulty Xcode 9 version which I installed recently. So, any ideas on how to fix this? Going back to Xcode 8.3.3 would probably fix the problem, but I have no idea how to do this.

Thanks in advance, TP

ThePresident
  • 301
  • 6
  • 16
  • To build packages generally you don't actually need Xcode, you need the Developer Tools (which include compilers) that come with it. Even if you install Xcode, you need to tell it to install the Command Line Tools (there's a menu item, I believe). Alternately, you can [just install CLT by themselves](https://stackoverflow.com/q/9329243/4497050) and not spend 11Gb of your disk on an IDE you never use. – alistaire Oct 13 '17 at 04:12
  • I installed Command Line Tools for Xcode 9 and I still get the same error. Also ran xcode-select --install (got message that Development Tools are already installed), and also ran softwareupdate --install -a (got a message that everything is up to date). Deleting Xcode 9 and going back to Xcode 8.3.3, we'll how that goes. – ThePresident Oct 14 '17 at 02:37

2 Answers2

2

In case people are wondering: uninstalling Xcode 9 and installing Xcode 8.3.3 solved the problem for RCurl package and the related GenomicsAlignments package in R.

** testing if installed package can be loaded
* DONE (RCurl)

TP

ThePresident
  • 301
  • 6
  • 16
0

Yep uninstalling Xcode 9 and installing 8.3.3 worked for me to: How to downgrade XCode to previous version?

In fact - I just uninstalled Xcode 9 completely and just reinstalled the older version of CLT.

jrlewi
  • 486
  • 3
  • 8