Monday, 15 March 2010

r - Installing kernlab package from sources on Mac -



r - Installing kernlab package from sources on Mac -

i on mavericks 10.9.2 , running r 3.0.2:

20:35:19/spectral $r r version 3.0.2 (2013-09-25) -- "frisbee sailing" copyright (c) 2013 r foundation statistical computing platform: x86_64-apple-darwin10.8.0 (64-bit)

let seek install kernlab bundle source (not doing source had worse errors)

install.packages("kernlab", type="source")

we pretty far in compiling @ end linker fails:

-wl,corefoundation ld: warning: directory not found alternative '-l/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64' ld: warning: directory not found alternative '-l/usr/local/lib/x86_64' ld: warning: directory not found alternative '-l/usr/local/lib/gcc/i686-apple-darwin8/4.2.3' ld: library not found -lgfortran clang: error: linker command failed exit code 1 (use -v see invocation) make: *** [kernlab.so] error 1 error: compilation failed bundle ‘kernlab’ * removing ‘/library/frameworks/r.framework/versions/3.0/resources/library/kernlab’ * restoring previous ‘/library/frameworks/r.framework/versions/3.0/resources/library/kernlab’ downloaded source packages in ‘/private/var/folders/k4/l5ww32y14svd5wmkgzzftl9m0000gn/t/rtmpybfij3/downloaded_packages’ warning message: in install.packages("kernlab", type = "source") : installation of bundle ‘kernlab’ had non-zero exit status

update per comments updated latest (3.12) r. did

brew install gfortran

which successful

but compiling r source still has issues -lgfortran:

install.packages("kernlab", type="source") .. ld: warning: directory not found alternative '-l/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2' ld: library not found -lgfortran clang: error: linker command failed exit code 1 (use -v see invocation) make: *** [kernlab.so] error 1 error: compilation failed bundle ‘kernlab’ * removing ‘/library/frameworks/r.framework/versions/3.1/resources/library/kernlab’ downloaded source packages in ‘/private/var/folders/k4/l5ww32y14svd5wmkgzzftl9m0000gn/t/rtmpugqtxd/downloaded_packages’

the xcode 5.1.1 (updated - newest available 10.9.2)

here info on command line tools:

pkgutil --pkg-info=com.apple.pkg.cltools_executables package-id: com.apple.pkg.cltools_executables version: 6.1.0.0.1.1413057044 volume: / location: / install-time: 1415295324 groups: com.apple.findsystemfiles.pkg-group com.apple.devtoolsboth.pkg-group com.apple.devtoolsnonrelocatableshared.pkg-group

here gfortran info:

09:54:46/spectral $gfortran -v using built-in specs. collect_gcc=gfortran collect_lto_wrapper=/usr/local/cellar/gfortran/4.8.2/gfortran/libexec/gcc/x86_64-apple-darwin13.0.0/4.8.2/lto-wrapper target: x86_64-apple-darwin13.0.0 configured with: ../configure --prefix=/usr/local/cellar/gfortran/4.8.2/gfortran --datarootdir=/usr/local/cellar/gfortran/4.8.2/share --bindir=/usr/local/cellar/gfortran/4.8.2/bin --enable-languages=fortran --with-system-zlib --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog --with-isl=/usr/local/opt/isl --disable-cloog-version-check --disable-isl-version-check --enable-checking=release --disable-stage1-checking --disable-libstdcxx --enable-lto --disable-nls --disable-multilib thread model: posix gcc version 4.8.2 (gcc)

the installation worked when performed straight through rstudio. not clear why create difference, problem resolved.

r osx

No comments:

Post a Comment