Open Goiageshiketa opened 7 years ago
It solved. I changed CXX in Makevars. Thanks
Great...I was doing some research to figure it. It looked like an issue with your compiler not having the right c++ libraries.
Sean
On Thursday, October 12, 2017, Goiageshiketa notifications@github.com wrote:
It solved. I changed CXX in Makevars. Thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/slucey/RpathDev/issues/4#issuecomment-336041066, or mute the thread https://github.com/notifications/unsubscribe-auth/AFUeDqbgV7K30BI5Gq1N8EeRarQccKNkks5srbuOgaJpZM4P0_7k .
-- Sean M. Lucey Fisheries Biologist Ecosystem Dynamics and Assessment Branch U. S. Dept. of Commerce/NOAA/NMFS Northeast Fisheries Science Center 166 Water Street, Woods Hole, MA 02543 508-495-2011 (voice) 508-495-2232 (fax)
Hello, I get the exact same error as above, though hard time in understanding the solution. Could anyone be a little more specific on how to solve the problem? That would highly appreciated. Thanks! Virginie
Typing: "devtools::install_github('slucey/RpathDev/Rpath', ref = 'Public', build_vignettes = TRUE)"
returns:
In file included from ecosim.cpp:2:
./ecosim.h:33:4: error: no matching function for call to 'transform'
std::transform(base.begin(), base.end(),
^~~~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:1932:1: note: candidate template ignored: couldn't infer template argument '_BinaryOperation'
transform(_InputIterator1 first1, _InputIterator1 __last1, _InputIterator2 first2,
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:1922:1: note: candidate function template not viable: requires 4 arguments, but 5 were provided
transform(_InputIterator first, _InputIterator __last, _OutputIterator result, _UnaryOperation __op)
^
1 error generated.
make: *** [ecosim.o] Error 1
ERROR: compilation failed for package 'Rpath'
HI, below is my Makevars environment.
CC=clang CXX=/opt/local/bin/c++-mp-4.6
It works macOS 10.12.6. Makevars is found in ~/.R I hope this help you.
@Goiageshiketa As a work around, I was able to install RPath inside a Docker image on my Mac. I used this tutorial. However, I got an error message unless I turned off the building vignettes.
https://github.com/slucey/RpathDev/issues/4#issuecomment-342329459 Hi Goiageshiketa , I don't understand how to change the Makevars environment ... Can you explain step by step how it is working...
Thank you very much
Leonardo
Hi, Leonardo
Hope this help you.
Thank you very much Goiageshiketa. But Rpath still doesn't work.
I'm using OSX High Sierra, 10.13.6. R version 3.5.1 (2018-07-02) I installed XCODE and Command Line Tools. I changed CXX in Makevars.
R studio returns: devtools::install_github('slucey/RpathDev/Rpath', ref = 'Public', build_vignettes = T) Downloading GitHub repo slucey/RpathDev@Public from URL https://api.github.com/repos/slucey/RpathDev/zipball/Public Installing Rpath '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore \ --quiet CMD build \ '/private/var/folders/p4/f6_qlcws5bn0t43ytfhf18x00000gn/T/RtmpYHxUo4/devtoolsa6379341c26/slucey-RpathDev-2df2714/Rpath' \ --no-resave-data --no-manual
ERROR: package installation failed Installation failed: Command failed (1)
Leo,
It looks like you are still missing something in your Path for compiling the C++ code that in the underlying engine of the ecosim part of Rpath. If you have an IT person in your institution they may be able to help you troubleshoot it. I don't think this error is on our end.
Sean
Sean M. Lucey Fisheries Biologist Ecosystem Dynamics and Assessment Branch U. S. Dept. of Commerce/NOAA/NMFS Northeast Fisheries Science Center 166 Water Street, Woods Hole, MA 02543 508-495-2011 (voice) 508-495-2232 (fax)
On Wed, Sep 5, 2018 at 1:31 PM, leomarameo7 notifications@github.com wrote:
Thank you very much Goiageshiketa. But Rpath still doesn't work.
I'm using OSX High Sierra, 10.13.6. R version 3.5.1 (2018-07-02) I installed XCODE and Command Line Tools. I changed CXX in Makevars.
R studio returns: devtools::install_github('slucey/RpathDev/Rpath', ref = 'Public', build_vignettes = T) Downloading GitHub repo slucey/RpathDev@Public from URL https://api.github.com/repos/slucey/RpathDev/zipball/Public Installing Rpath '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD build '/private/var/folders/p4/f6_qlcws5bn0t43ytfhf18x00000gn/T/RtmpYHxUo4/ devtoolsa6379341c26/slucey-RpathDev-2df2714/Rpath' --no-resave-data --no-manual
- checking for file ‘/private/var/folders/p4/f6_ qlcws5bn0t43ytfhf18x00000gn/T/RtmpYHxUo4/devtoolsa6379341c26/slucey- RpathDev-2df2714/Rpath/DESCRIPTION’ ... OK
- preparing ‘Rpath’:
- checking DESCRIPTION meta-information ... OK
- cleaning src
installing the package to build vignettes
- installing source package ‘Rpath’ ... ** libs /opt/local/bin/c++-mp-4.6 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/ Resources/library/Rcpp/include" -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o /bin/sh: /opt/local/bin/c++-mp-4.6: No such file or directory make: *** [RcppExports.o] Error 127 ERROR: compilation failed for package ‘Rpath’
removing ‘/private/var/folders/p4/f6_qlcws5bn0t43ytfhf18x00000gn/T/ Rtmp2tItb5/Rinsta9e11aee778/Rpath’
ERROR: package installation failed Installation failed: Command failed (1)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/slucey/RpathDev/issues/4#issuecomment-418814622, or mute the thread https://github.com/notifications/unsubscribe-auth/AFUeDhMY1-Nr4GtMMaAcBiS65PvH6ryRks5uYApegaJpZM4P0_7k .
Hi Leo,
What kind of c and c++ compiler are you using?
"/opt/local/bin/c++-mp-4.6: No such file or directory"
Maybe you are not using c++ compiler named mp-4.6, this is my case in my environment. So you need to find the cc and c++ compiler names and directory where they are installed.
To find the version of compilers, open terminal and type "gcc -c". It returns version of c compilers. Let me know the results
Gaia
Goiageshiketa, I type the command "gcc--version" because "gcc -c" returns gcc -cclang: error: no input files
MacBook-Air-di-Leonardo:~ leonardocapitani$ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Leonardo,
How about CXX=clang ?
I try with CC=clang CXX= clang As Sean says, It seems that It is still missing something for the Ecosim part.
devtools::install_github('slucey/RpathDev/Rpath', ref = 'Public', build_vignettes = T) Downloading GitHub repo slucey/RpathDev@Public from URL https://api.github.com/repos/slucey/RpathDev/zipball/Public Installing Rpath '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore \ --quiet CMD build \ '/private/var/folders/p4/f6_qlcws5bn0t43ytfhf18x00000gn/T/Rtmp7GBIrP/devtools13f92353db73/slucey-RpathDev-2df2714/Rpath' \ --no-resave-data --no-manual
ERROR: package installation failed Installation failed: Command failed (1)
How about try cxx = /usr/include/c++ ?
devtools::install_github('slucey/RpathDev/Rpath', ref = 'Public', build_vignettes = T) Downloading GitHub repo slucey/RpathDev@Public from URL https://api.github.com/repos/slucey/RpathDev/zipball/Public Installing Rpath '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD build \ '/private/var/folders/p4/f6_qlcws5bn0t43ytfhf18x00000gn/T/Rtmpn9X9MA/devtools18bf57c069fe/slucey-RpathDev-2df2714/Rpath' \ --no-resave-data --no-manual
ERROR: package installation failed Installation failed: Command failed (1)
Can you find c++-4.2 in /usr/include/ ? You can move to /usr/include by typing shit + command + g on finder. If it is located ther, try
cxx = /usr/include/c++-4.2
I find the folder "C++" in /usr/include/ . In this folder there's another folder called 4.2.1. But it seems that there's no such file in this folder. When I try CC=clang CXX=/usr/include/c++-4.2
It returns
ERROR: package installation failed Installation failed: Command failed (1)
Hi, Leonard After updating R or Rstudio, or macOS installation was failed on my Mac. Now I'm trying to resolve this problem. Let you know if it is figured out.
Ok, recently I have installed Rpath on clean mac following method.
This worked for me. Hope this help someone.
Ok, recently I have installed Rpath on clean mac following method.
- install gcc from brew. g++ then installed in /usr/local/bin/g++ in default.
- Make "Makevars" file in ~/.R/
- Write in Makevars CC = gcc CXX = /usr/local/bin/g++
- devtools::install_github('slucey/RpathDev/Rpath', ref = 'Public', build_vignettes = TRUE)
This worked for me. Hope this help someone.
Hi Goiageshiketa idon't understand the first step. Now, when I install Rpath, the message is as follow:
ERROR: package installation failed Installation failed: Command failed (1)
Hi, Leo
brew is a library and software management software installed form https://brew.sh. Type /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" on terminal. Then brew will be installed. After that you can install gcc using "brew install gcc". This is the step 1.
Cheers
I have been tried to install Rpath on Mac (10.12.6) with Xcode and Command Line Tools installed. Typing "devtools::install_github('slucey/RpathDev/Rpath', ref = 'Public', build_vignettes = TRUE)" on Rstudio returns,
Downloading GitHub repo slucey/RpathDev@Public from URL https://api.github.com/repos/slucey/RpathDev/zipball/Public Installing Rpath
In file included from ecosim.cpp:2: ./ecosim.h:33:4: error: no matching function for call to 'transform' std::transform(base.begin(), base.end(), ^
~~~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:1932:1: note: candidate template ignored: couldn't infer template argument '_BinaryOperation' transform(_InputIterator1 first1, _InputIterator1 __last1, _InputIterator2 first2, ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:1922:1: note: candidate function template not viable: requires 4 arguments, but 5 were provided transform(_InputIterator first, _InputIterator __last, _OutputIterator result, _UnaryOperation __op) ^ 1 error generated. make: *** [ecosim.o] Error 1 ERROR: compilation failed for package ‘Rpath’removing ‘/Users/takeshigeaigo/Library/R/3.3/library/Rpath’ Error : Command failed (1)
Does anyone help this? Thank you.