linux - "/bin/sh: XX: command not found" error when trying to install development version of R fst package from github -
i'm trying install development version of fst package github. (i want development version because maintains column classes when saving data frames, whereas current released version not.)
initially, installation failed due lack of openmp support. resolved (i think) following steps here r 3.4.0 on osx.
however, i'm getting following error: /bin/sh: xx: command not found. i've set supposed appropriate paths in ~/.r/makevars file, i'm not sure next resolve error.
here's code , output:
first attempt install fst, before adding openmp support
devtools::install_github("fstpackage/fst", ref = "develop") * installing *source* package ‘fst’ ...
** libs
clang++ -std=gnu++11 -i/library/frameworks/r.framework/resources/include -dndebug -fopenmp -i. -ifstcore -ifstcore/lz4 -ifstcore/zstd -ifstcore/zstd/common -ifstcore/zstd/decompress -ifstcore/zstd/compress -i"/library/frameworks/r.framework/versions/3.4/resources/library/rcpp/include" -i/usr/local/opt/gettext/include -i/usr/local/opt/llvm/include -fpic -wall -g -o2 -c faststore.cpp -o faststore.o
clang: error: unsupported option '-fopenmp'
make: *** [faststore.o] error 1
error: compilation failed package ‘fst’
adding openmp support
to add openmp support, followed steps here r 3.4.0, including installing gfortran 6.1 here , clang using pre-built osx gui installer provided here. then, instructed, added following ~/.r/makevars file:
cc=/usr/local/clang4/bin/clang cxx=/usr/local/clang4/bin/clang++ cxx11=$cxx cxx14=$cxx cxx17=$cxx cxx1x=$cxx ldflags=-l/usr/local/clang4/lib second attempt install fst
i ran installation code again , got following error:
devtools::install_github("fstpackage/fst", ref = "develop") * installing *source* package ‘fst’ ...
** libs
xx -std=gnu++11 -i/library/frameworks/r.framework/resources/include -dndebug -fopenmp -i. -ifstcore -ifstcore/lz4 -ifstcore/zstd -ifstcore/zstd/common -ifstcore/zstd/decompress -ifstcore/zstd/compress -i"/library/frameworks/r.framework/versions/3.4/resources/library/rcpp/include" -i/usr/local/include -fpic -wall -g -o2 -c faststore.cpp -o faststore.o
/bin/sh: xx: command not found
make: *** [faststore.o]
error 127 error: compilation failed package ‘fst’
in addition errors, can see installation output begins clang++ -std=gnu++11 ... in first attempt , xx -std=gnu++11 ... in second attempt. i'm guessing need tell r (or other program) path clang, i'm not sure path needed or put (and isn't makevars file supposed take care of that?), or whether there other issues need fixed well.
here of particulars system:
macbook pro, osx sierra (version 10.12.5)
rstudio version 1.0.153
r session info
r version 3.4.1 (2017-06-30) platform: x86_64-apple-darwin15.6.0 (64-bit) running under: macos sierra 10.12.5 matrix products: default blas: /system/library/frameworks/accelerate.framework/versions/a/frameworks/veclib.framework/versions/a/libblas.dylib lapack: /library/frameworks/r.framework/versions/3.4/resources/lib/librlapack.dylib locale: [1] en_us.utf-8/en_us.utf-8/en_us.utf-8/c/en_us.utf-8/en_us.utf-8 attached base packages: [1] stats graphics grdevices utils datasets methods base loaded via namespace (and not attached): [1] httr_1.2.1 compiler_3.4.1 r6_2.2.2 tools_3.4.1 withr_1.0.2 [6] curl_2.8.1 memoise_1.1.0 git2r_0.19.0 digest_0.6.12 devtools_1.13.2 update: based on @markplotnick's comment, changed makevars following:
cc=/usr/local/clang4/bin/clang cxx=/usr/local/clang4/bin/clang++ cxx11=$(cxx) cxx14=$(cxx) cxx17=$(cxx) cxx1x=$(cxx) ldflags=-l/usr/local/clang4/lib this resulted in following error:
* installing source package ‘fst’ ...
** libs /users/eipi10/.r/makevars:7: *** recursive variable `cxx' references (eventually). stop.
error: compilation failed package ‘fst’
Comments
Post a Comment