Weiming-Hu / AnalogsEnsemble

The C++ and R packages for parallel ensemble forecasts using Analog Ensemble
https://weiming-hu.github.io/AnalogsEnsemble/
MIT License
18 stars 5 forks source link

Issue with swift and Xcode #105

Closed SGPeckham closed 4 years ago

SGPeckham commented 4 years ago

Installing RAnEn on Rstudio version

The BH and Rcpp packages installed without issue.

Installing next the RAnEn package. The following is the command at the ">" prompt and the reply.

install.packages("https://github.com/Weiming-Hu/AnalogsEnsemble/raw/master/RAnalogs/releases/RAnEn_latest.tar.gz", repos = NULL) trying URL 'https://github.com/Weiming-Hu/AnalogsEnsemble/raw/master/RAnalogs/releases/RAnEn_latest.tar.gz' Content type 'application/octet-stream' length 113682 bytes (111 KB)

downloaded 111 KB

make: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!

make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch checking whether the C++ compiler works... no configure: error: in /private/var/folders/2f/pfcn2jx173vgdftdrthhtzbm9tsskm/T/Rtmp7FHuFE/R.INSTALL225563877ac9/RAnEn': configure: error: C++ compiler cannot create executables Seeconfig.log' for more details ERROR: configuration failed for package ‘RAnEn’


Mac us running Mojave 10.14.6.

Also get the same results using the R-base interactive window.

Weiming-Hu commented 4 years ago

Aha. Mojave. Have you checked out this issue? I guess you need to install xcode developer tools.

Basically, you need to:

  1. Open Xcode and see whether you have any automatic updates showing up.
  2. Run xcode-select --install in a terminal to check for developer tools
  3. Run /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg to complete the developing environment according to this
SGPeckham commented 4 years ago

I tried going down this path, but hit a couple of snags right off.

  1. Xcode would only update to the latest version if I was running the latest OS. Work requires that I not use the latest OS. Can not use the latest version of Xcode.
  2. Tried running this command and the computer replied that I had the latest version.

My solution was to delete Xcode and download the application from the developer's site. After the reinstall the RAnEn package installed.

Problem: The next package in tutorial exercise 1 is:RnAnExtra. When running the exercise on my computer using Rstudio (now with HB, Rcpp and RAnEn packages installed) the code execution stops at the next package load. The message is:

Error in library(RAnEnExtra) : there is no package called ‘RAnEnExtra’

I loaded RnAen package with the command

install.packages("https://github.com/Weiming-Hu/AnalogsEnsemble/raw/master/RAnalogs/releases/RAnEn_latest.tar.gz", repos = NULL)

Did a dependency get missed?

Weiming-Hu commented 4 years ago

Ooooops, you need this. I should have put this in the documentation. Thanks for the headsup.

devtools::install_github("Weiming-Hu/RAnEnExtra")

SGPeckham commented 4 years ago

Actually, since this is a new installation of Rstudio, the devtools package has to be installed first.

Then, after the devtools command is available, can the RAnEnExtra package be installed.

Weiming-Hu commented 4 years ago

That sounds good.