samhforbes / PupillometryR

An R package for preparing and analysing pupillometry data
Other
42 stars 4 forks source link

Developer version install #12

Closed paulinepalma closed 4 years ago

paulinepalma commented 4 years ago

I am having difficulties with the developer version of the package (running on R 4.0.0 on mac os 10.12.6). Basically, I ran the following line: devtools::install_github("samhforbes/PupillometryR")

And I ran into the following error:

Downloading GitHub repo samhforbes/PupillometryR@master ✓ checking for file ‘/private/var/folders/3q/4p41_jds5gdd_g0kjjtgvsnm0000gp/T/Rtmp8JVrje/remotes342215f87e9/samhforbes-PupillometryR-67c292b/DESCRIPTION’ (1.2s) ─ preparing ‘PupillometryR’: ✓ checking DESCRIPTION meta-information ... ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories NB: this package now depends on R (>= 3.5.0) WARNING: Added dependency on R >= 3.5.0 because serialized objects in serialize/load version 3 cannot be read in older versions of R. File(s) containing such objects: ‘PupillometryR/data/pupil_data.RData’ ─ building ‘PupillometryR_0.0.2.9000.tar.gz’

dyld: lazy symbol binding failed: Symbol not found: _utimensat Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13) Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _utimensat Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13) Expected in: /usr/lib/libSystem.B.dylib

/Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34: 1251 Done echo 'tools:::.install_packages()' 1252 Abort trap: 6 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --no-echo --args ${args} Error: Failed to install 'PupillometryR' from GitHub: (converted from warning) installation of package ‘/var/folders/3q/4p41_jds5gdd_g0kjjtgvsnm0000gp/T//Rtmp8JVrje/file3426d3e31d/PupillometryR_0.0.2.9000.tar.gz’ had non-zero exit status

My OS version is pretty old, so I think the problem may be on my end. I had no issue with the released version. Although the line "vignette('PupillometryR')" from the Readme doc does not work (not sure if the vignette is included in the released version). I had to copy/paste the code from the vignette into R.

samhforbes commented 4 years ago

Hi @paulinepalma, this is a tricky one. It looks like it might be an issue further up the food chain. I have a few thoughts that might be a help:

  1. does devtools::install_github() work with any other repository? You can check if it works with devtools::has_devel() - possibly related to issue 3 below.
  2. R 4.0.0 looks like it only supports macOS 10.13 upwards (I don't know if you've encountered any further issues with this?
  3. (I think this might be most likely) it could be an issue with XCode, which I think didn't ship with OX 10.12.

Please let me know if any of these help.

paulinepalma commented 4 years ago

Hi @samhforbes, thank you for the suggestions! I tried looking more into this:

  1. The problem does not look like it comes from devtools, as devtools::has_devel() returns the message "Your system is ready to build packages!".
  2. I updated to R 4.0.0 recently and did not run into any issue so far.
  3. I don't think I have XCode installed on my laptop (I never developed an R package, so I never installed it). I checked and it seems I would need a pretty old version of XCode, because the latests are not compatible with OSX 10.12. Fortunately, my laptop is recent enough that I can upgrade to the latest OSX version (Catalina). I'll try again when the update is complete and keep you posted!
samhforbes commented 4 years ago

Sorry for the fuss. If I had to guess from the bits and pieces of similar issues that people have, it looks like the compiler used in R 4.0.0 might have changed to needing XCode shipped with 10.13, but I can't see verification of this anywhere. An older version of R might also work, but I can't be certain.

paulinepalma commented 4 years ago

Hi Sam! No worries. I have now tested the developer version of your package on both Mac OS Catalina and on Windows 10 under the latest version of R (4.0.1), and everything went very smoothly! It is very possible the problem was with XCode, as I was directly prompted to download it once I opened R after updating the OS, and I had no problem afterwards.

samhforbes commented 4 years ago

Brilliant, thanks so much. I'm glad you got it going again - I suspect you aren't the last with this issue, so it's great to have it documented.