I'm trying to install the deldir package in R via install.packages("deldir",type = 'source') but am getting the following error message (this is OSX Mavericks):
* installing *source* package ‘deldir’ ...
** package ‘deldir’ successfully unpacked and MD5 sums checked
** libs
gfortran-4.8 -fPIC -g -O2 -c acchk.f -o acchk.o
make: gfortran-4.8: No such file or directory
make: *** [acchk.o] Error 1
ERROR: compilation failed for package ‘deldir’
gfortran 4.8 does seem to be available on my system, however:
> gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin13/4.8.2/lto-wrapper
Target: x86_64-apple-darwin13
Configured with: ../gcc-4.8.2/configure --prefix=/usr/local/gfortran --with-gmp=/Users/fx/devel/gcc/deps-static/x86_64 --enable-languages=c,c++,fortran,objc,obj-c++ --build=x86_64-apple-darwin13
Thread model: posix
gcc version 4.8.2 (GCC)
After symlinking gfortran-4.8 to gfortran I get a bit further but fail nonetheless:
* installing *source* package ‘deldir’ ...
** package ‘deldir’ successfully unpacked and MD5 sums checked
** libs
gfortran-4.8 -fPIC -g -O2 -c acchk.f -o acchk.o
gfortran-4.8 -fPIC -g -O2 -c addpt.f -o addpt.o
gfortran-4.8 -fPIC -g -O2 -c adjchk.f -o adjchk.o
gfortran-4.8 -fPIC -g -O2 -c binsrt.f -o binsrt.o
gfortran-4.8 -fPIC -g -O2 -c circen.f -o circen.o
gfortran-4.8 -fPIC -g -O2 -c cross.f -o cross.o
gfortran-4.8 -fPIC -g -O2 -c delet.f -o delet.o
gfortran-4.8 -fPIC -g -O2 -c delet1.f -o delet1.o
gfortran-4.8 -fPIC -g -O2 -c delout.f -o delout.o
gfortran-4.8 -fPIC -g -O2 -c delseg.f -o delseg.o
gfortran-4.8 -fPIC -g -O2 -c dirout.f -o dirout.o
gfortran-4.8 -fPIC -g -O2 -c dirseg.f -o dirseg.o
gfortran-4.8 -fPIC -g -O2 -c dldins.f -o dldins.o
gfortran-4.8 -fPIC -g -O2 -c initad.f -o initad.o
gfortran-4.8 -fPIC -g -O2 -c insrt.f -o insrt.o
gfortran-4.8 -fPIC -g -O2 -c insrt1.f -o insrt1.o
gfortran-4.8 -fPIC -g -O2 -c intri.f -o intri.o
gfortran-4.8 -fPIC -g -O2 -c locn.f -o locn.o
gfortran-4.8 -fPIC -g -O2 -c master.f -o master.o
gfortran-4.8 -fPIC -g -O2 -c mnnd.f -o mnnd.o
gfortran-4.8 -fPIC -g -O2 -c pred.f -o pred.o
gfortran-4.8 -fPIC -g -O2 -c qtest.f -o qtest.o
gfortran-4.8 -fPIC -g -O2 -c qtest1.f -o qtest1.o
gfortran-4.8 -fPIC -g -O2 -c stoke.f -o stoke.o
gfortran-4.8 -fPIC -g -O2 -c succ.f -o succ.o
gfortran-4.8 -fPIC -g -O2 -c swap.f -o swap.o
gfortran-4.8 -fPIC -g -O2 -c testeq.f -o testeq.o
gfortran-4.8 -fPIC -g -O2 -c triar.f -o triar.o
gfortran-4.8 -fPIC -g -O2 -c trifnd.f -o trifnd.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o deldir.so acchk.o addpt.o adjchk.o binsrt.o circen.o cross.o delet.o delet1.o delout .o delseg.o dirout.o dirseg.o dldins.o initad.o insrt.o insrt1.o intri.o locn.o master.o mnnd.o pred.o qtest.o qtest1.o stoke.o succ.o swap.o testeq.o triar.o trifnd.o -L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 - lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [deldir.so] Error 1
ERROR: compilation failed for package ‘deldir’
Note that /usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.3 exists, /usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 does not
sessionInfo():
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)
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
Sys.getenv():
> Sys.getenv()
__CF_USER_TEXT_ENCODING
"0x1F5:0:0"
__CHECKFIX1436934
"1"
Apple_PubSub_Socket_Render
"/tmp/launch-jCxLku/Render"
DISPLAY
":0"
DYLD_FALLBACK_LIBRARY_PATH
"/Users/<myusername>/lib:/usr/local/lib:/usr/lib::/Library/Frameworks/R.framework/Resources/lib"
EDITOR
"vi"
GIT_ASKPASS
"rpostback-askpass"
HOME
"/Users/<myusername>"
LANG
"en_US.UTF-8"
LC_CTYPE
"en_US.UTF-8"
LN_S
"ln -s"
LOGNAME
"<myusername>"
MAKE
"make"
PAGER
"/usr/bin/less"
PATH
"/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin"
R_BROWSER
"/usr/bin/open"
R_BZIPCMD
"/usr/bin/bzip2"
R_DOC_DIR
"/Library/Frameworks/R.framework/Resources/doc"
R_GZIPCMD
"/usr/bin/gzip"
R_HOME
"/Library/Frameworks/R.framework/Resources"
R_INCLUDE_DIR
"/Library/Frameworks/R.framework/Resources/include"
R_LIBS_SITE
""
R_LIBS_USER
"~/Library/R/3.1/library"
R_PAPERSIZE
"a4"
R_PDFVIEWER
"/usr/bin/open"
R_PLATFORM
"x86_64-apple-darwin13.1.0"
R_PRINTCMD
"lpr"
R_QPDF
"/Library/Frameworks/R.framework/Resources/bin/qpdf"
R_RD4PDF
"times,inconsolata,hyper"
R_SESSION_TMPDIR
"/var/folders/jf/ds4sdyys44xckz_7f9zhrvsh0000gn/T//RtmpXaPpYF"
R_SHARE_DIR
"/Library/Frameworks/R.framework/Resources/share"
R_SYSTEM_ABI
"osx,gcc,gxx,gfortran,?"
R_TEXI2DVICMD
"/usr/bin/texi2dvi"
R_UNZIPCMD
"/usr/bin/unzip"
R_ZIPCMD
"/usr/bin/zip"
RS_RPOSTBACK_PATH
"/Applications/RStudio.app/Contents/MacOS/rpostback"
RS_SHARED_SECRET
<removed>
RSTUDIO
"1"
RSTUDIO_PANDOC
"/Applications/RStudio.app/Contents/MacOS/pandoc"
RSTUDIO_SESSION_PORT
"10153"
RSTUDIO_USER_IDENTITY
"<myusername>"
SED
"/usr/bin/sed"
SHELL
"/bin/bash"
SSH_AUTH_SOCK
"/tmp/launch-Shnu2H/Listeners"
TAR
"/usr/bin/tar"
TMPDIR
"/var/folders/jf/ds4sdyys44xckz_7f9zhrvsh0000gn/T/"
USER
"<myusername>"
I was getting the same error when installing the igraph package in R on Manjaro Linux.
It was due to the absence of a Fortran compiler (gfortran I think). I found out that gfortran package is named as gcc-fortran in Manjaro repo and many other (GNU) Linux repos. So, I just installed gcc-fortran package and then restarted RStudio and igraph package installed without any issues.
I found a solution here: https://support.rstudio.com/hc/communities/public/questions/201688563-Problem-with-Mac-Yosemite-Beta-and-RStudio-not-finding-TeX-distribution
It turns out that Adam Maxwell noted that Yosemite beta has a significant bug in passing environment variables to subprocesses.
After installing gfortran as in OS X package installation depends on gfortran-4.8 .
This works: create an alias in your .bash_profile
alias fixrs="launchctl setenv PATH /usr/texbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"
Then close and open the terminal.
And execute the fixrs command in the terminal before launching RStudio.
Then I could build igraph successfully.
I was using a linux machine and RStudio server. I had a similar problem. I knew already that gfortran was on the machine thanks to the system administrator.
To solve, in the shell, I typed which gfortran, which gave me a path.
Then, following this SO posting, I entered the following in the shell to create a new Makevars file
# create a file called ~/.R/Makevars:
mkdir -p ~/.R
touch ~/.R/Makevars
Then, in that new file, I wrote the following
F77 = /usr/local/bin/gfortran #this was the path that I got from typing which gfortran in the shell
FC = $F77
FLIBS = -L/usr/local/bin/gfortran
From there, I was able to install the package that wasn't compiling properly (in my case vegan instead of igraph using install.packages("vegan")
I had your same problem (in OS X Yosemite), and (unfortunately) painstakingly recreated your symlink "partial solution". Finally, I was able to solve the issue by forgetting about linking or aliasing and just downgrading to gfortran-4.8.
I had installed the newer version with brew, so for me this entailed uninstalling
brew uninstall gcc
and then following the instructions here to install 4.8.2, i.e.
curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /
It still threw up some warnings but at least I got a successful installation of deldir, which I needed to run pgirmess.
Related
I'm getting an issue when I try to install Bioconductor for R. I've searched everywhere for solutions however nothing is really working for me. Please, any advice?
The downloaded binary packages are in
/var/folders/74/y92tqhzj0l98l6syjjl7vtcr0000gn/T//RtmpNYOkbZ/downloaded_packages
Old packages: 'nlme'
Update all/some/none? [a/s/n]:
a
Warning: unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘nlme’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source package ‘nlme’
trying URL 'https://cran.rstudio.com/src/contrib/nlme_3.1-144.tar.gz'
Content type 'application/x-gzip' length 778660 bytes (760 KB)
==================================================
downloaded 760 KB
* installing *source* package ‘nlme’ ...
** package ‘nlme’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fPIC -Wall -g -O2 -c chol.f -o chol.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c corStruct.c -o corStruct.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c gnls.c -o gnls.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c init.c -o init.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c matrix.c -o matrix.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c nlOptimizer.c -o nlOptimizer.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c nlme.c -o nlme.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c nlmefit.c -o nlmefit.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c pdMat.c -o pdMat.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c pythag.c -o pythag.o
gfortran -fPIC -Wall -g -O2 -c rs.f -o rs.o
clang -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 nlme.so chol.o corStruct.o gnls.o init.o matrix.o nlOptimizer.o nlme.o nlmefit.o pdMat.o pythag.o rs.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [nlme.so] Error 1
ERROR: compilation failed for package ‘nlme’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/nlme’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/nlme’
The downloaded source packages are in
‘/private/var/folders/74/y92tqhzj0l98l6syjjl7vtcr0000gn/T/RtmpNYOkbZ/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘nlme’ had non-zero exit status
I've tried to reinstall R and it didn't work.
The code I am using to install bioconductor is:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.10")
I had the same problem. This happens since I updated to R4.0. I've seen that in Mac (and maybe Windows) can be related to missing Rtools. In Linux, I tried to install the package from other mirrors (this solved my problem in the past), but no success. Finally, I realized that the initial error is "make: gfortran: No such file or directory"
Therefore, I installed gcc & gcc-fortran and that solved it!
In Manjaro, Arch linux:
pacman -S gcc
pacman -S gcc-fortran
In Debian or Ubuntu should be:
sudo apt update
sudo apt install build-essential
sudo apt-get install manpages-dev
gcc --version
Check here for more information:
https://linuxize.com/post/how-to-install-gcc-compiler-on-debian-10/
https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/
https://linuxhostsupport.com/blog/how-to-install-gcc-on-ubuntu-18-04/
Because now the new version of Bioconductor is BiocManager, try to use this one: install.packages("BiocManager")
Apparently, it is trying to install package nlme as a dependency and fails doing that. Did you try installing that one manually before installing Bioconductor ? That could give us more info on the issue.
Just as a heads up for someone who encounters similar issue. I was presented with a choice of installing a binary or compiling from scratch. As I chose compilation option, it was failing to install nlme. However, installation of binary was successful and there was a minor version difference between the source and the binary.
I've been corresponding with the package author about an error I'm getting in the HLMdiag package. He suggested that I install the development version [https://github.com/aloy/HLMdiag]. So, I'm trying to install the development version from both GitHub and a local version that he sent me. I'm running into errors for both my work computer and personal computer. I'm hoping someone in the user community who is more knowledgeable about such things can help solve this.
My initial thought was that there might be some security protocol on my work machine that was causing problems, which is why I attempted the install on a personal machine. I am getting different error messages on the different machines; but still unable to install on either. Any help would be very much appreciated.
Sorry in advance for the post length. I wanted to give as much of the error messages / log as possible.
Machine 1 -- personal
sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] devtools_1.6.1 tools_3.1.2
Attempt (A) - direct from GitHub
devtools::install_github("aloy/HLMdiag")
Downloading github repo aloy/HLMdiag#master
Installing HLMdiag
"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" --vanilla CMD INSTALL \
"C:\Users\crossfit_al1985\AppData\Local\Temp\Rtmp8o4p3s\devtools24b871ace19\aloy-HLMdiag-3f7977d" \
--library="C:/Users/crossfit_al1985/Documents/R/win-library/3.1" --install-tests
* installing *source* package 'HLMdiag' ...
** libs
*** arch - i386
C:\RBuildTools\3.1\gcc-4.6.3\bin\nm.exe: cooksd_obs.o: File format not recognized
C:\RBuildTools\3.1\gcc-4.6.3\bin\nm.exe: cooksd_subset.o: File format not recognized
C:\RBuildTools\3.1\gcc-4.6.3\bin\nm.exe: covratio.o: File format not recognized
C:\RBuildTools\3.1\gcc-4.6.3\bin\nm.exe: covtrace.o: File format not recognized
C:\RBuildTools\3.1\gcc-4.6.3\bin\nm.exe: linear_algebra_fnc.o: File format not recognized
C:\RBuildTools\3.1\gcc-4.6.3\bin\nm.exe: mdffits_subset.o: File format not recognized
g++ -m32 -shared -s -static-libgcc -o HLMdiag.dll tmp.def cooksd_obs.o cooksd_subset.o covratio.o covtrace.o linear_algebra_fnc.o mdffits_subset.o -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lRblas -lgfortran -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lR
cooksd_obs.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'HLMdiag'
* removing 'C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag'
* restoring previous 'C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag'
Error: Command failed (1)
Attempt (B) - via install.packages() from local
setwd(...)
install.packages("./HLMdiag_0.3.0.tar.gz", repos = NULL, type = "source")
Installing package into ‘C:/Users/crossfit_al1985/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package 'HLMdiag' ...
** libs
*** arch - i386
cygwin warning:
MS-DOS style path detected: C:/PROGRA~1/R/R-31~1.2/etc/i386/Makeconf
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-31~1.2/etc/i386/Makeconf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c cooksd_obs.cpp -o cooksd_obs.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c cooksd_subset.cpp -o cooksd_subset.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c covratio.cpp -o covratio.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c covtrace.cpp -o covtrace.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c linear_algebra_fnc.cpp -o linear_algebra_fnc.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c mdffits_subset.cpp -o mdffits_subset.o
g++ -m32 -shared -s -static-libgcc -o HLMdiag.dll tmp.def cooksd_obs.o cooksd_subset.o covratio.o covtrace.o linear_algebra_fnc.o mdffits_subset.o -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lRblas -lgfortran -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lR
installing to C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag/libs/i386
*** arch - x64
cygwin warning:
MS-DOS style path detected: C:/PROGRA~1/R/R-31~1.2/etc/x64/Makeconf
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-31~1.2/etc/x64/Makeconf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c cooksd_obs.cpp -o cooksd_obs.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c cooksd_subset.cpp -o cooksd_subset.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c covratio.cpp -o covratio.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c covtrace.cpp -o covtrace.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c linear_algebra_fnc.cpp -o linear_algebra_fnc.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c mdffits_subset.cpp -o mdffits_subset.o
g++ -m64 -shared -s -static-libgcc -o HLMdiag.dll tmp.def cooksd_obs.o cooksd_subset.o covratio.o covtrace.o linear_algebra_fnc.o mdffits_subset.o -LC:/PROGRA~1/R/R-31~1.2/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-31~1.2/bin/x64 -lRblas -lgfortran -Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/PROGRA~1/R/R-31~1.2/bin/x64 -lR
installing to C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag/libs/x64
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Creating a generic function from function 'adjust_lmList' in package 'HLMdiag'
Error in setMethod("lmList", signature(formula = "formula", data = "data.frame"), :
no existing definition for function 'lmList'
Error : unable to load R code in package 'HLMdiag'
ERROR: lazy loading failed for package 'HLMdiag'
* removing 'C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag'
* restoring previous 'C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\crossfit_al1985\Documents\R\win-library\3.1" "./HLMdiag_0.3.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘./HLMdiag_0.3.0.tar.gz’ had non-zero exit status
Attempt (C) - via unzipping and devtools::install()
setwd(...)
devtools::install("HLMdiag")
Installing HLMdiag
"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" --vanilla CMD INSTALL \
"C:\Users\crossfit_al1985\Downloads\HLMdiag" \
--library="C:/Users/crossfit_al1985/Documents/R/win-library/3.1" --install-tests
* installing *source* package 'HLMdiag' ...
** libs
*** arch - i386
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c cooksd_obs.cpp -o cooksd_obs.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c cooksd_subset.cpp -o cooksd_subset.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c covratio.cpp -o covratio.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c covtrace.cpp -o covtrace.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c linear_algebra_fnc.cpp -o linear_algebra_fnc.o
g++ -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c mdffits_subset.cpp -o mdffits_subset.o
g++ -m32 -shared -s -static-libgcc -o HLMdiag.dll tmp.def cooksd_obs.o cooksd_subset.o covratio.o covtrace.o linear_algebra_fnc.o mdffits_subset.o -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lRlapack -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lRblas -lgfortran -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lR
installing to C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag/libs/i386
*** arch - x64
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c cooksd_obs.cpp -o cooksd_obs.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c cooksd_subset.cpp -o cooksd_subset.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c covratio.cpp -o covratio.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c covtrace.cpp -o covtrace.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c linear_algebra_fnc.cpp -o linear_algebra_fnc.o
g++ -m64 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/Rcpp/include" -I"C:/Users/crossfit_al1985/Documents/R/win-library/3.1/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c mdffits_subset.cpp -o mdffits_subset.o
g++ -m64 -shared -s -static-libgcc -o HLMdiag.dll tmp.def cooksd_obs.o cooksd_subset.o covratio.o covtrace.o linear_algebra_fnc.o mdffits_subset.o -LC:/PROGRA~1/R/R-31~1.2/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-31~1.2/bin/x64 -lRblas -lgfortran -Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/PROGRA~1/R/R-31~1.2/bin/x64 -lR
installing to C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag/libs/x64
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Creating a generic function from function 'adjust_lmList' in package 'HLMdiag'
Error in setMethod("lmList", signature(formula = "formula", data = "data.frame"), :
no existing definition for function 'lmList'
Error : unable to load R code in package 'HLMdiag'
ERROR: lazy loading failed for package 'HLMdiag'
* removing 'C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag'
* restoring previous 'C:/Users/crossfit_al1985/Documents/R/win-library/3.1/HLMdiag'
Error: Command failed (1)
Machine 2 -- work
sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.5
loaded via a namespace (and not attached):
[1] digest_0.6.4 evaluate_0.5.5 formatR_0.10 htmltools_0.2.4 httr_0.6.1 knitr_1.6
[7] memoise_0.2.1 parallel_3.1.1 RCurl_1.95-4.1 rmarkdown_0.4.2 stringr_0.6.2 tools_3.1.1
[13] whisker_0.3-2
Attempt (A) -- direct from github
devtools::install_github("aloy/HLMdiag")
Installing github repo HLMdiag/master from aloy
Downloading master.zip from https://github.com/aloy/HLMdiag/archive/master.zip
Installing package from C:\Users\alewit\AppData\Local\Temp\RtmpATVjSy/master.zip
Installing HLMdiag
"C:/PROGRA~1/R/R-31~1.1/bin/x64/R" --vanilla CMD INSTALL \
"C:\Users\alewit\AppData\Local\Temp\RtmpATVjSy\devtoolsc745bf04fbd\HLMdiag-master" \
--library="C:/Users/alewit/Documents/R/win-library/3.1" --install-tests
* installing *source* package 'HLMdiag' ...
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="HLMdiag.dll" OBJECTS="cooksd_obs.o cooksd_subset.o covratio.o covtrace.o linear_algebra_fnc.o mdffits_subset.o"' had status 127
ERROR: compilation failed for package 'HLMdiag'
* removing 'C:/Users/alewit/Documents/R/win-library/3.1/HLMdiag'
* restoring previous 'C:/Users/alewit/Documents/R/win-library/3.1/HLMdiag'
Error: Command failed (1)
Attempt (B) -- via install.packages() from local
setwd(...)
install.packages("./HLMdiag_0.3.0.tar.gz", repos = NULL, type = "source")
Installing package into ‘C:/Users/alewit/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package 'HLMdiag' ...
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="HLMdiag.dll" OBJECTS="cooksd_obs.o cooksd_subset.o covratio.o covtrace.o linear_algebra_fnc.o mdffits_subset.o"' had status 127
ERROR: compilation failed for package 'HLMdiag'
* removing 'C:/Users/alewit/Documents/R/win-library/3.1/HLMdiag'
* restoring previous 'C:/Users/alewit/Documents/R/win-library/3.1/HLMdiag'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-31~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\alewit\Documents\R\win-library\3.1" "C:/Users/alewit/Downloads/HLMdiag_0.3.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/alewit/Downloads/HLMdiag_0.3.0.tar.gz’ had non-zero exit status
Attempt (C) -- via devtools::install()
setwd(...)
install("HLMdiag")
Installing HLMdiag
"C:/PROGRA~1/R/R-31~1.1/bin/x64/R" --vanilla CMD INSTALL "C:\Users\alewit\Downloads\HLMdiag" \
--library="C:/Users/alewit/Documents/R/win-library/3.1" --install-tests
* installing *source* package 'HLMdiag' ...
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="HLMdiag.dll" OBJECTS="cooksd_obs.o cooksd_subset.o covratio.o covtrace.o linear_algebra_fnc.o mdffits_subset.o"' had status 127
ERROR: compilation failed for package 'HLMdiag'
* removing 'C:/Users/alewit/Documents/R/win-library/3.1/HLMdiag'
* restoring previous 'C:/Users/alewit/Documents/R/win-library/3.1/HLMdiag'
Error: Command failed (1)
The .o files in the src directory were messing things up. I submitted a pull request so hopefully Adam will incorporate those fixes soon and your problem should go away. You could test if this works by using
install_github("Dasonk/HLMdiag")
until the pull request is accepted.
Edit: And Adam was quick to merge. Test out installing from github again install_github("aloy/HLMdiag") and it should work for you.
I just stumbled over a linker error when trying to install some R packages which have Rcpp as a dependency. My setup is Mac OS X 10.9.1 (Mavericks), R 3.0.2 installed by Homebrew. Here's the error output:
> install.packages('Rcpp')
trying URL 'http://cran.fhcrc.org/src/contrib/Rcpp_0.10.6.tar.gz'
Content type 'application/x-gzip' length 1985569 bytes (1.9 Mb)
opened URL
==================================================
downloaded 1.9 Mb
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c Date.cpp -o Date.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c Module.cpp -o Module.o
clang -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -c Rcpp_init.c -o Rcpp_init.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c Timer.cpp -o Timer.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c api.cpp -o api.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c attributes.cpp -o attributes.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c barrier.cpp -o barrier.o
clang++ -I/usr/local/Cellar/r/3.0.2/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fPIC -g -O2 -c exceptions.cpp -o exceptions.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o Rcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -F/usr/local/Cellar/r/3.0.2/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
ld: library not found for -lintl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Apparently, libintl is part of the gettext package. I did the following, possibly redundant reinstall to make sure my copy was up-to-date:
$ brew install gettext
Warning: gettext-0.18.3.2 already installed
$ brew reinstall gettext
==> Reinstalling gettext
==> Downloading http://ftpmirror.gnu.org/gettext/gettext-0.18.3.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/gettext-0.18.3.2.tar.gz
==> ./configure --prefix=/usr/local/Cellar/gettext/0.18.3.2 --with-included-gettext --with-included-glib --with-included-libcroco --with-included-libunistring --with-emac
==> make
==> make install
==> Caveats
This formula is keg-only, so it was not symlinked into /usr/local.
OS X provides the BSD gettext library and some software gets confused if both are in the library path.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/gettext/lib
CPPFLAGS: -I/usr/local/opt/gettext/include
It says in the above output that brew doesn't symlink the library, which might explain why install.packages can't find it. What did the trick was adding a library path into ~/.R/Makevars like so:
PKG_LIBS=-L/usr/local/Cellar/gettext/0.18.3.2/lib
This answer is to modify Giupo's answer as it contains a typo but I believe it is important enough to be more prominent than a comment. The solution is a very effective way to install the Rserve package from Homebrew without causing broader problems on OSX:
flags="CPPFLAGS=-I/usr/local/opt/gettext/lib LDFLAGS=-L/usr/local/opt/gettext/include"
install.packages('Rserve', configure.args=flags)
To reduce namespace pollution even more can wrap in local:
local({
flags="CPPFLAGS=-I/usr/local/opt/gettext/lib LDFLAGS=-L/usr/local/opt/gettext/include"
install.packages('Rserve', configure.args=flags)})
I wanna add my 2 cents to the quest by suggesting a less intrusive (meaning: no files/env changes for the user bringing unwanted side-effects in the future)
Take note of LDFLAGS and CPPFLAGS by reinstalling gettext as #cbare did and pass them to install.packages (inside R) with the configure.args param:
flags="LDFLAGS=-L/usr/local/opt/gettext/lib CPPFLAGS=-I/usr/local/opt/gettext/include"
install.packages('Rcpp', configure.args=flags)
This should do the trick (it worked for me while struggling with the same problem installing Rserve).
This worked fine for me:
brew link gettext --force
I am installing lme4 using the README.md file on their github account and I fail during installing the dependencies. I tried to install them separately and still crash at installing the minqa package. I'm using R/3.0.2 on RHEL6. During the build the compiler argues about RScript not existing which as I check it is in the R/bin folder.
Here is the log to the R INSTALL:
$ R CMD INSTALL minqa_1.2.2.tar.gz
* installing to library ‘/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library’
* installing *source* package ‘minqa’ ...
** package ‘minqa’ successfully unpacked and MD5 sums checked
** libs
gfortran -fpic -g -O2 -c altmov.f -o altmov.o
gfortran -fpic -g -O2 -c bigden.f -o bigden.o
gfortran -fpic -g -O2 -c biglag.f -o biglag.o
gfortran -fpic -g -O2 -c bobyqa.f -o bobyqa.o
gfortran -fpic -g -O2 -c bobyqb.f -o bobyqb.o
gfortran -fpic -g -O2 -c lagmax.f -o lagmax.o
g++ -I/gpfs/apps/x86_64-rhel6/R/3.0.2/R/include -DNDEBUG -I/usr/local/include -I"/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/Rcpp/include" -fpic -g -O2 -c minqa.cpp -o minqa.o
gfortran -fpic -g -O2 -c newuoa.f -o newuoa.o
gfortran -fpic -g -O2 -c newuob.f -o newuob.o
gfortran -fpic -g -O2 -c prelim.f -o prelim.o
gfortran -fpic -g -O2 -c rescue.f -o rescue.o
gfortran -fpic -g -O2 -c trsapp.f -o trsapp.o
gfortran -fpic -g -O2 -c trsbox.f -o trsbox.o
gfortran -fpic -g -O2 -c trstep.f -o trstep.o
gfortran -fpic -g -O2 -c uobyqa.f -o uobyqa.o
gfortran -fpic -g -O2 -c uobyqb.f -o uobyqb.o
gfortran -fpic -g -O2 -c update.f -o update.o
gfortran -fpic -g -O2 -c updatebobyqa.f -o updatebobyqa.o
Rscript execution error: No such file or directory
g++ -shared -L/usr/local/lib64 -o minqa.so altmov.o bigden.o biglag.o bobyqa.o bobyqb.o lagmax.o minqa.o newuoa.o newuob.o prelim.o rescue.o trsapp.o trsbox.o trstep.o uobyqa.o uobyqb.o update.o updatebobyqa.o -lgfortran -lm -L/gpfs/apps/x86_64-rhel6/R/3.0.2/R/lib -lR
Rscript execution error: No such file or directory
installing to /gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa/libs/minqa.so':
/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa/libs/minqa.so: undefined symbol: _ZTIN4Rcpp7RObjectE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa’
A similar error also occurs when trying to upgrade lme4 from 1.0-5 to 1.0-6. The error message is something like:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/minqa/libs/minqa.so':
libRcpp.so: cannot open shared object file: No such file or directory
ERROR: lazy loading failed for package ‘lme4’
To resolve this install the packages in the order below:
install.packages('Rcpp')
install.packages('RcppEigen')
install.packages('minqa')
install.packages('lme4')
I guess it's related to RCpp; just upgrade the version from 0.10.6 to 0.11.0 and some ABI break change happens?
Credit from dmbates
/usr/share/R/share/make/shlib.mk:6: recipe for target 'minqa.so' failed make: *** [minqa.so] Error 1
I got the same error when installing minqa (needed for lme4). It was due to modify .First() in /etc/R/Rprofile.site
Desactive .First or use R --vanilla.
I am trying to install an R shiny server on my local Ubuntu 12.04 machine, and I followed the instructions here https://github.com/rstudio/shiny-server/wiki/Ubuntu-step-by-step-install-instructions:
When trying to do a:
install.packages('shiny', repos='http://cran.rstudio.com/')
It goes through the dependencies, but fails to install Rcpp. See error log below:
* installing *source* package 'Rcpp' ...
* package 'Rcpp' successfully unpacked and MD5 sums checked
* libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c Date.cpp -o Date.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c Module.cpp -o Module.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c Rcpp_init.c -o Rcpp_init.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c Timer.cpp -o Timer.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c api.cpp -o api.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c attributes.cpp -o attributes.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c barrier.cpp -o barrier.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -O3 -pipe -g -c exceptions.cpp -o exceptions.o
g++ -shared -o Rcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -L/usr/lib/R/lib -lR
g++ -o libRcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -shared -L/usr/lib/R/lib -lR
ar qc libRcpp.a Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o
cp libRcpp.so ../inst/lib
cp libRcpp.a ../inst/lib
rm libRcpp.so libRcpp.a
installing to /usr/local/lib/R/site-library/Rcpp/libs
* R
* inst
* preparing package for lazy loading
Error : package 'codetools' was built before R 3.0.0: please re-install it
Error : unable to load R code in package 'Rcpp'
ERROR: lazy loading failed for package 'Rcpp'
* removing '/usr/local/lib/R/site-library/Rcpp'
* installing *source* package 'httpuv' ...
* package 'httpuv' successfully unpacked and MD5 sums checked
* libs
g++ -I/usr/share/R/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64 -I"/usr/lib/R/site-library/Rcpp/include" -fpic -O3 -pipe -g -c RcppExports.cpp -o RcppExports.o
RcppExports.cpp:75:10: error: 'uint32_t' was not declared in this scope
RcppExports.cpp: In function 'SEXPREC* httpuv_run(SEXP)':
RcppExports.cpp:79:5: error: 'uint32_t' was not declared in this scope
RcppExports.cpp:79:14: error: expected ';' before 'timeoutMillis'
RcppExports.cpp:80:25: error: 'timeoutMillis' was not declared in this scope
RcppExports.cpp:80:38: error: 'run' cannot be used as a function
make: * [RcppExports.o] Error 1
ERROR: compilation failed for package 'httpuv'
* removing '/usr/local/lib/R/site-library/httpuv'
ERROR: dependency 'httpuv' is not available for package 'shiny'
* removing '/usr/local/lib/R/site-library/shiny'
EDITED:
Manually downloading and installing Rcpp gives me:
sudo R CMD INSTALL Rcpp_0.10.6.tar.gz
Error : package 'codetools' was built before R 3.0.0: please re-install it
So I manually downloaded and installed codetools and re-tried Rcpp:
sudo R CMD INSTALL codetools_0.2-8.tar.gz
sudo R CMD INSTALL Rcpp_0.10.6.tar.gz
Then followed the instructions again from the Shiny webpage from "Install R" and "Install shiny" and got a similar error but now with caTools, bitops and xtable, so I did the manual installation of each of them. The shiny was installed correctly.
Then followed the next steps in the instructions.
Any ideas why I got this 'was built before R 3.0.0' errors?
Ubuntu 12.04 is a pre-R 3.0.0 release. You have to decide whether you want its long-term support and stability "as is", or if you want newer software.
You can mix and match. Read the CRAN Ubuntu README, adjust your apt settings and enjoy updated r-cran-* packages. With those you can then install shiny and its dependencies.
Manually downloading and installing Rcpp gives me:
sudo R CMD INSTALL Rcpp_0.10.6.tar.gz
Error : package 'codetools' was built before R 3.0.0: please re-install it
So I manually downloaded and installed codetools and re-tried Rcpp:
sudo R CMD INSTALL codetools_0.2-8.tar.gz
sudo R CMD INSTALL Rcpp_0.10.6.tar.gz
Then followed the instructions again from the Shiny webpage from "Install R" and "Install shiny" and got a similar error but now with caTools, bitops and xtable, so I did the manual installation of each of them. The shiny was installed correctly.
Then followed the next steps in the instructions. All went well from there. Not sure why I was getting these was built before 3.0.0 errors.