jashubbard / edfR

an R package for importing EDF files from Eyelink eyetrackers
23 stars 4 forks source link

Installation problem #15

Open DougieBarrett opened 3 years ago

DougieBarrett commented 3 years ago

Library looks great, but can't install it using RStudio. R - 4.0.1 (2020-06-06) -- "See Things Now" RStudio - Version 1.1.414 OS - Catalina 10.15.7

I have devtools installed. Any fixes or ideas, gratefully received! Thanks.


library(devtools)
Loading required package: usethis
Warning messages:
1: package ‘devtools’ was built under R version 4.0.2 
2: package ‘usethis’ was built under R version 4.0.2 
> install_github('jashubbard/edfR')
Downloading GitHub repo jashubbard/edfR@HEAD
✓  checking for file ‘/private/var/folders/8d/9595xpf54g76l8n78x4vsyvw000cxc/T/RtmpDAtXMr/remotesdb32ad40d6/jashubbard-edfR-16e4c24/DESCRIPTION’ ...
─  preparing ‘edfR’:
✓  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘edfR_0.1.tar.gz’

Installing package into ‘/Users/djkb1/Library/R/4.0/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘edfR’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Users/djkb1/Library/R/4.0/library/Rcpp/include' -I'/Users/djkb1/Library/R/4.0/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /Users/djkb1/Library/R/4.0/library/RcppArmadillo/include/RcppArmadillo.h:34:
In file included from /Users/djkb1/Library/R/4.0/library/Rcpp/include/Rcpp.h:57:
/Users/djkb1/Library/R/4.0/library/Rcpp/include/Rcpp/DataFrame.h:136:18: warning: unused variable 'data' [-Wunused-variable]
            SEXP data = Parent::get__();
                 ^
1 warning generated.
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Users/djkb1/Library/R/4.0/library/Rcpp/include' -I'/Users/djkb1/Library/R/4.0/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c edf_api.cpp -o edf_api.o
In file included from edf_api.cpp:4:
./edf.h:51:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
#include "edf_data.h"
         ^
./edf_data.h:292:9: note: previous '#pragma pack' directive that modifies alignment is here
#pragma pack(1)
        ^
edf_api.cpp:4:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
#include "edf.h"
         ^
./edf_data.h:292:9: note: previous '#pragma pack' directive that modifies alignment is here
#pragma pack(1)
        ^
edf_api.cpp:227:34: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
    edf_set_trial_identifier(ef, "TRIALID", "TRIAL OK");
                                 ^
edf_api.cpp:227:45: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
    edf_set_trial_identifier(ef, "TRIALID", "TRIAL OK");
                                            ^
edf_api.cpp:325:13: warning: unused variable 'CurrentMsg' [-Wunused-variable]
      char* CurrentMsg;
            ^
edf_api.cpp:326:21: warning: unused variable 'rcount' [-Wunused-variable]
      int ecount(0),rcount(0),scount(0);
                    ^
edf_api.cpp:472:35: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
      edf_set_trial_identifier(ef,"TRIALID","TRIAL OK");
                                  ^
edf_api.cpp:472:45: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
      edf_set_trial_identifier(ef,"TRIALID","TRIAL OK");
                                            ^
edf_api.cpp:491:13: warning: unused variable 'JumpResults' [-Wunused-variable]
        int JumpResults= edf_jump_to_trial(ef, iTrial);
            ^
edf_api.cpp:494:13: warning: unused variable 'GoodJump' [-Wunused-variable]
        int GoodJump= edf_get_trial_header(ef, Header);
            ^
10 warnings generated.
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Users/djkb1/Library/R/4.0/library/Rcpp/include' -I'/Users/djkb1/Library/R/4.0/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c process_eyedata.cpp -o process_eyedata.o
In file included from process_eyedata.cpp:2:
In file included from /Users/djkb1/Library/R/4.0/library/RcppArmadillo/include/RcppArmadillo.h:34:
In file included from /Users/djkb1/Library/R/4.0/library/Rcpp/include/Rcpp.h:57:
/Users/djkb1/Library/R/4.0/library/Rcpp/include/Rcpp/DataFrame.h:136:18: warning: unused variable 'data' [-Wunused-variable]
            SEXP data = Parent::get__();
                 ^
1 warning generated.
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o edfR.so RcppExports.o edf_api.o process_eyedata.o -framework edfapi -F/Library/Frameworks/ -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/djkb1/Library/R/4.0/library/00LOCK-edfR/00new/edfR/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Warning messages:
1: package ‘RcppArmadillo’ was built under R version 4.0.2 
2: package ‘data.table’ was built under R version 4.0.2 
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Warning: package ‘RcppArmadillo’ was built under R version 4.0.2
Warning: package ‘data.table’ was built under R version 4.0.2
Error: package or namespace load failed for ‘edfR’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/djkb1/Library/R/4.0/library/00LOCK-edfR/00new/edfR/libs/edfR.so':
  dlopen(/Users/djkb1/Library/R/4.0/library/00LOCK-edfR/00new/edfR/libs/edfR.so, 6): Library not loaded:  @executable_path/../Frameworks/edfapi.framework/Versions/A/edfapi
  Referenced from: /Users/djkb1/Library/R/4.0/library/00LOCK-edfR/00new/edfR/libs/edfR.so
  Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/djkb1/Library/R/4.0/library/edfR’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/8d/9595xpf54g76l8n78x4vsyvw000cxc/T//RtmpDAtXMr/filedbf58fe8f/edfR_0.1.tar.gz’ had non-zero exit status
DougieBarrett commented 3 years ago

Install problems have been raised before but the issue was closed. If anyone has installed edfR on R 4.0, please post the solution here.

https://github.com/jashubbard/edfR/issues/9

jgeller112 commented 3 years ago

I captured edfR in my CodeOcean capsule (https://codeocean.com/capsule/4600160/tree/v1). Watch this video showing how to access it: https://www.youtube.com/watch?v=5IQmP9Yrh1k. It is not the best, but you can process your files using edfR from the capsule and export the files. Sorry there is not an easier solution.

zinongli commented 2 months ago

I'm having similar problem with installation. It won't install even though I already have the APIs installed and available for R. I wouldn't have made my repo public if the code in it simply doesn't work.

tmalsburg commented 2 months ago

@zinongli, I recommend reading the first paragraph in the README, copied here for your convenience:

NOTE: This package may not install correctly on Mac and there is no support for Windows. See https://github.com/jashubbard/edfR/issues/12 and https://github.com/jashubbard/edfR/issues/15 for details. If someone has a fix, we’d be happy to include it. Linux should work okay.

I just tried the package on Linux and it works as expected.

Also note that the authors of this code don't owe you anything. Your sense of entitlement is therefore entirely misplaced.

zinongli commented 2 months ago

@tmalsburg My apologies for lashing out my frustration earlier. I'm sorry for imposing my standards on others. Indeed I should have considered that this works for Linux. I blame myself for expecting its compatibility with MacOS.

jgeller112 commented 2 months ago

@zinongli

I captured edfR in my CodeOcean capsule (https://codeocean.com/capsule/4600160/tree/v1). Watch this video showing how to access it: https://www.youtube.com/watch?v=5IQmP9Yrh1k. It is not the best, but you can process your files using edfR from the capsule and export the files. Sorry there is not an easier solution.