I have been trying to install the ncdf R package. I have searched answers and attempted to solve the problem, but it looks like it's the time for me to ask for some help here.
I downloaded ncdf_1.6.5.tar.gz from this page ("https://cran.r-project.org/src/contrib/Archive/ncdf/), saved it in Download folder.
As it does not have a NAMESPACE file, I untar-ed the file and did the following
cd Downloads
cd ncdf
echo 'exportPattern( "." )' > NAMESPACE
cd ..
tar -zcf ncdf.tar.gz ncdf
Then I tried to install the package by this command
R CMD INSTALL -l /Users/xyc/Downloads/ncdf.tar.gz
It gave me this
ARGUMENT 'CDM' __ignor'e__
ARGUMENT 'INSTALL' __ignor'e__
AVIS : option inconnue '-l'
ARGUMENT 'ncdf.tar.gz' __ignor'e__
R version 3.4.2 (2017-09-28) -- "Short Summer"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)
R est un logiciel libre livré sans AUCUNE GARANTIE.
Vous pouvez le redistribuer sous certaines conditions.
Tapez 'license()' ou 'licence()' pour plus de détails.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Tapez 'demo()' pour des démonstrations, 'help()' pour l'aide
en ligne ou 'help.start()' pour obtenir l'aide au format HTML.
Tapez 'q()' pour quitter R.
Obviously, this did not install the package.
I tried to install in RStudio by
install.packages("ncdf.tar.gz", lib = "/Users/xyc/Downloads", repos = NULL)
It showed me
* installing *source* package ‘ncdf’ ...
checking for nc-config... /opt/local/bin/nc-config
configure: creating ./config.status
config.status: creating src/Makevars
** libs
make: error: unable to find utility "make", not a developer tool or in PATH
ERROR: compilation failed for package ‘ncdf’
* removing ‘/Users/xyc/Downloads/ncdf’
* restoring previous ‘/Users/xyc/Downloads/ncdf’
Warning in install.packages :
installation of package ‘ncdf.tar.gz’ had non-zero exit status
Could someone help me here? Thank you very much.
UPDATE
Thank you for all your inputs. I downloaded Xcode 9 and a lower version of ncdf and did this
$ sudo xcode-select --switch /Users/xyc/Downloads/Xcode.app
$R CMD INSTALL ncdf_1.6.3.tar.gz
It gave me 96 warnings and 11 errors. The compilation failed again.
* installing to library ‘/Users/hhsieh/Library/R/3.4/library’
* installing *source* package ‘ncdf’ ...
checking for nc-config... /opt/local/bin/nc-config
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -
I/opt/local/include -I/usr/local/include -fPIC -Wall -g -O2 -c
._ncdf.c -o ._ncdf.o
._ncdf.c:1:1: warning: null character ignored [-Wnull-character]
<U+0000><U+0005><U+0016><U+0007><U+0000><U+0002><U+0000><U+0000>Mac OS
X <U+0000><U+0002><U+0000><U+0000>...
^
._ncdf.c:1:2: error: expected identifier or '('
<U+0000><U+0005><U+0016><U+0007><U+0000><U+0002><U+0000><U+0000>Mac OS
X <U+0000><U+0002><U+0000><U+0000>...
^
._ncdf.c:1:5: warning: null character ignored [-Wnull-character]
<U+0000><U+0005><U+0016><U+0007><U+0000><U+0002><U+0000><U+0000>Mac OS
X <U+0000><U+0002><U+0000><U+0000>...
^
._ncdf.c:1:7: warning: null character ignored [-Wnull-character]
<U+0000><U+0005><U+0016><U+0007><U+0000><U+0002><U+0000><U+0000>Mac OS
X <U+0000><U+0002><U+0000><U+0000>...
^
._ncdf.c:1:8: warning: null character ignored [-Wnull-character]
<U+0000><U+0005><U+0016><U+0007><U+0000><U+0002><U+0000><U+0000>Mac OS
X <U+0000><U+0002><U+0000><U+0000>...
^
._ncdf.c:1:25: warning: null character ignored [-Wnull-character]
<U+0000><U+0005><U+0016><U+0007><U+0000><U+0002><U+0000><U+0000>Mac OS
X <U+0000><U+0002><U+0000><U+0000>...
^
._ncdf.c:1:27: warning: null character ignored [-Wnull-character]
...OS X <U+0000><U+0002><U+0000><U+0000><U+0000> <U+0000>
<U+0000><U+0000>2<U+0000><U+0000><U+0000><AC>...
^
._ncdf.c:1:28: warning: null character ignored [-Wnull-character]
...OS X <U+0000><U+0002><U+0000><U+0000><U+0000> <U+0000>
<U+0000><U+0000>2<U+0000><U+0000><U+0000><AC>...
^
(warnings and error cut from here)
96 warnings and 11 errors generated.
make: *** [._ncdf.o] Error 1
ERROR: compilation failed for package ‘ncdf’
* removing ‘/Users/xyc/Library/R/3.4/library/ncdf’
I also tried this
$R CMD INSTALL --configure-args="-with-netcdf_incdir=/usr/local/netcdf/4.1.1-gcc/include -with-netcdf_libdir=/usr/local/netcdf/4.1.1-gcc/lib" ncdf_1.6.3.tar.gz
which also gave me 96 warnings and 11 errors.
96 warnings and 11 errors generated.
make: *** [._ncdf.o] Error 1
ERROR: compilation failed for package ‘ncdf’
* removing ‘/Users/xyc/Library/R/3.4/library/ncdf’
It looks like I still have a problem with XCode.
All suggestions are highly appreciated and welcome.
Thank you...
Related
I am trying to install the package GWmodel from source following this website. After running install_github(lbb220/GWmodel/GWmodel) I am receiving this error: Error: Failed to install 'unknown package' from GitHub: Line starting '<<<<<<< HEAD ...' is malformed!
The reason I want to to install the package from source and not use the install.packages("GWmodel") is that I want to use parallel.method = "cuda". In the documentation it says:
Requirements of using CUDA for high-performence computation in GWR functions:
To run GWR-CUDA (i.e. parallel.method is pecified as “cuda”) with gwr.basic , bw.gwr and gwr.model.selection, the following conditions are required:
There is at least one NVIDIA GPU supporting CUDA equipped on user's computer.
CUDA (>10.2) are installed with the environment variable 'CUDA_HOME' set properly.
The package should re-built from source. - For Linux user, 'GWmodelCUDA' will be automatically built if CUDA toolkit could be detected by the complier. - For Windows user, 'GWmodelCUDA.dll' and 'GWmodelCUDA.lib' will be automatically downloaded; however, we would recommend users to build the 'GWmodelCUDA' library manually to avoid some potentially unknown issues, and an 'CMakeLists.txt' file is provided for this procedure.
If any condition above is not satisfied, the GWR-CUDA will not work even though the “parallel.method” is specified as “cuda”.
If I install it using install.github() I am getting the error I mentioned. I have installed the CUDA (>10.2) and I have set the environment variable 'CUDA_HOME' properly.
If I use the install.packages("GWmodel") I get no errors. I also tried to download GWmodel.zip and install from a local zip file, but the same error.
I have install rtools successfully (I tested it using the example here)
I am using R.Studio 1.4.1717, R 4.1.1 and Windows 11.
Any ideas how can I proceed?
I used install_github("lbb220/GWmodel") and although I don't receive the above error, still the installation cannot be done. I am getting the below message now:
** libs
*** arch - i386
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.1/include" -DNDEBUG -I'C:/Program Files/R/R-4.1.1/library/Rcpp/include' -I'C:/Program Files/R/R-4.1.1/library/RcppArmadillo/include' -ARMA_64BIT_WORD=1 -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c GWmodel.cpp -o GWmodel.o
GWmodel.cpp: In function 'double sp_gcdist(double, double, double, double)':
GWmodel.cpp:764:29: error: 'DOUBLE_EPS' was not declared in this scope
if (fabs(lat1 - lat2) < DOUBLE_EPS) {
^~~~~~~~~~
GWmodel.cpp:764:29: note: suggested alternative: 'ENABLE_NLS'
if (fabs(lat1 - lat2) < DOUBLE_EPS) {
^~~~~~~~~~
ENABLE_NLS
GWmodel.cpp: In function 'void printMat(arma::mat)':
GWmodel.cpp:1165:16: warning: comparison of integer expressions of different signedness: 'const uword' {aka 'const unsigned int'} and 'int' [-Wsign-compare]
if (m.n_rows < n)
~~~~~~~~~^~~
make: *** [C:/PROGRA~1/R/R-41~1.1/etc/i386/Makeconf:245: GWmodel.o] Error 1
ERROR: compilation failed for package 'GWmodel'
* removing 'C:/Program Files/R/R-4.1.1/library/GWmodel'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/GEOGRA~1/AppData/Local/Temp/RtmpOwWBPs/file8f43609514d/GWmodel_2.2-0.tar.gz’ had non-zero exit status
This is because you are not actually installing from the main repository. Try install_github(lbb220/GWmodel).
I am trying to build and check a package with some Fortran code in it under Windows 10
with R 3.4.0 updating some code previously in R 2.8.
I am doing this in three steps in the command window:
>R CMD build src
[...]
* checking DESCRIPTION meta-information ... OK
So I assume everything is ok with the DESCRIPTION file
then:
>R CMD check --no-examples --no-tests src
I get among other stuff:
* checking for file 'src/DESCRIPTION' ... OK
A bit further it gets wrong at
* checking whether package 'pckgname' can be installed
Looking at the log inside the file /src.Rcheck/00install.out, I read:
Error in .get_package_metadata(dir, FALSE) :
Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.
ERROR: installing Rd objects failed for package 'samara'
I have copied and pasted the DESCRIPTION file pretty much everywhere it made sense, including the top level directory and the \src directory or in those directory alone in some other trials, with always the same result.
This is strange because sometimes the DESCRIPTION file is recognized, sometimes it is not
There is only one similar post treating this subject:
R package building error
the author seems to have solved his problem but he doesn't know how.
Does anybody know what happened?
Following some requests, here is the content of the files 00check.log and 00install.out:
00check.log
C:\Users\username\Documents\PCKGNAME\SRC_5.0.2E\pckgname>R CMD check --no- examples --no-tests src
* using log directory 'C:/Users/username/Documents/PCKGNAME/SRC_5.0.2E/pckgname/src.Rcheck'
* using R version 3.4.0 (2017-04-21)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* using options '--no-examples --no-tests'
* checking for file 'src/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'pckgname' version '5.0.2.5'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... NOTE
Found the following apparent object files/libraries:
src-x64/FortPrg1.o src-x64/FortPrg2.o src-x64/FortPrg3.o
Object files/libraries should not be included in a source package.
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... NOTE
Found the following hidden files and directories:
R/.Rhistory
These were most likely included in error. See section 'Package
structure' in the 'Writing R Extensions' manual.
* checking for portable file names ... OK
* checking whether package 'pckgname' can be installed ... ERROR
Installation failed.
See 'C:/Users/username/Documents/PCKGNAME/SRC_5.0.2E/pckgname/src.Rcheck/00install.out' for details.
* DONE
Status: 1 ERROR, 2 NOTEs
In Prompt, there is this information in addition to what appeared before:
* checking whether package 'pckgname' can be installed ...
Warning: l'exécution de la commande '"C:/PROGRA~1/R/R-34~1.0/bin/x64/Rcmd.exe"
INSTALL -l "C:/Users/username/Documents/PCKGNAME/SRC_5.0.2E/pckgname/src.Rcheck" --no-html
"C:\Users\username\DOCUME~1\PCKGNAME\SRC_30~1.7E\pckgname\src"' renvoie un statut 1
Now in the file 00install.out:
* installing *source* package 'pckgname' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/gfortran -O3 -mtune=core2 -c FortPrg1.f90 -o FortPrg1.o
c:/Rtools/mingw_32/bin/gfortran -O3 -mtune=core2 -c FortPrg2.f90 -o FortPrg2.o
c:/Rtools/mingw_32/bin/gfortran -O3 -mtune=core2 -c FortPrg3.f90 -o FortPrg3.o
c:/Rtools/mingw_32/bin/gfortran -shared -s -static-libgcc -o pckgname.dll tmp.def FortPrg1.o FortPrg2.o FortPrg3.o -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-34~1.0/bin/i386 -lR
installing to C:/Users/username/Documents/PCKGNAME/SRC_5.0.2E/pckgname/src.Rcheck/pckgname/libs/i386
*** arch - x64
c:/Rtools/mingw_64/bin/gfortran -O2 -mtune=core2 -c FortPrg1.f90 -o FortPrg1.o
c:/Rtools/mingw_64/bin/gfortran -O2 -mtune=core2 -c FortPrg2.f90 -o FortPrg2.o
c:/Rtools/mingw_64/bin/gfortran -O2 -mtune=core2 -c FortPrg3.f90 -o FortPrg3.o
c:/Rtools/mingw_64/bin/gfortran -shared -s -static-libgcc -o pckgname.dll tmp.def FortPrg1.o FortPrg2.o FortPrg3.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-34~1.0/bin/x64 -lR
installing to C:/Users/username/Documents/PCKGNAME/SRC_5.0.2E/pckgname/src.Rcheck/pckgname/libs/x64
** R
** demo
** preparing package for lazy loading
Warning: package 'survival' was built under R version 3.4.4
Warning: package 'boot' was built under R version 3.4.4
Warning: package 'xlsx' was built under R version 3.4.4
Warning: package 'ggplot2' was built under R version 3.4.4
Warning: package 'GGally' was built under R version 3.4.4
[1] "Chargement de gdata ..."
[1] "Chargement de survival ..."
[1] "Chargement de boot ..."
[1] "Chargement de tcltk ..."
[1] "Chargement de xlsx ..."
---------------------------------------------
Package PCKGNAME genere le ven. sept. 28 17:14:21 2018
---------------------------------------------
Librairie Pckgname V5.0.2E Chargee
** help
No man pages found in package 'pckgname'
Error in .get_package_metadata(dir, FALSE) :
Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.
ERROR: installing Rd objects failed for package 'pckgname'
* removing 'C:/Users/username/Documents/PCKGNAME/SRC_5.0.2E/pckgname/src.Rcheck/pckgname'
Usually you would store a package named samara in a directory of the same name. You appear to have it in src. That should work, but I wouldn't be surprised if something in the check code implicitly assumes you were following the usual convention.
The other thing that is usually done is that you create a source tarball of the package and check that. That is, you run R CMD check on the output of R CMD build, not on the input. Again, what you are doing should mostly work (though not perfectly in this case; tarball contents typically are not identical to source directories), but perhaps these two nonstandard ways of working are causing your problems.
With the help of user2554330, I solved the problem.
I did the following things:
-I reorganized into pckgname/R and pckgname/src
(instead of pckgname/src/R and pckgname/src/src previously )
-I used R Studio. First I created a new project (create a new package) with RStudio and devtools: File>Create new project>R Package using devtools. And I put my files there
-I built and checked exclusively with the Rstudio interface
I'm trying to replicate CRAN sanitizer failures for my R package that depends on Rcpp on the rocker/r-devel-ubsan-clang docker image.
When I try to install Rcpp I get an error about no type named 'R_ContinueUnwind'. Is this something I'm doing wrong, or is it an incompatibility with Rcpp and Rdevel?
If the latter, is there a way to get a similar docker image that uses address sanitizers for a non-development version of R?
Here's the command I've been trying to run and output:
docker run --cap-add SYS_PTRACE --rm -it rocker/r-devel-ubsan-clang /bin/bash
root#e9f11aceb087:/# Rscriptdevel -e "install.packages('Rcpp')"
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.12.18.tar.gz'
Content type 'application/x-gzip' length 3809164 bytes (3.6 MB)
==================================================
downloaded 3.6 MB
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
clang++-4.0 -stdlib=libc++ -fsanitize=address,undefined -fno-sanitize=float-divide-by-zero -fno-omit-frame-pointer -fsanitize-address-use-after-scope -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O3 -Wall -pedantic -mtune=native -c Date.cpp -o Date.o
In file included from Date.cpp:31:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:128:
../inst/include/Rcpp/exceptions.h:150:7: error: no type named 'R_ContinueUnwind' in the global namespace
::R_ContinueUnwind(token);
~~^
1 error generated.
/usr/local/lib/R/etc/Makeconf:166: recipe for target 'Date.o' failed
make: *** [Date.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/usr/local/lib/R/site-library/Rcpp’
The downloaded source packages are in
‘/tmp/RtmpqVuvlD/downloaded_packages’
Warning message:
In install.packages("Rcpp") :
installation of package ‘Rcpp’ had non-zero exit status
Edit
Here's the result of docker image list and from within the container Rdevel --version
docker image list rocker/r-devel-ubsan-clang
REPOSITORY TAG IMAGE ID CREATED SIZE
rocker/r-devel-ubsan-clang latest c769161f77fb 10 months ago 4.47GB
And Rdevel --version
Rdevel --version
R Under development (unstable) (2017-09-16 r73288) -- "Unsuffered Consequences"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.
I got that image by using docker pull, I'm now trying to build it from scratch, following the lead that the image is 10 months old.
Maintainer of that repo here. We could probably discuss that over at the repo in an issue ticket too. I have not tried compiling R-devel with clang myself in some time (as I build r-devel at home via gcc), so not sure why the symbol is missing.
The whole concept was picked up by Winston who created a whole battery of debug Docker containers in this repo.
Otherwise, the (excellent) R hub builder also has sanitizer builds. One remaining problem is that CRAN is not too forthcoming with changes to their setup (besides publishing their short descriptions) so it is never clear if the setup is in fact identical to theirs.
Edit: Actually grep'ing for your symbol shows that it is contingent on R version 3.5.0 or later:
#if (defined(R_VERSION) && R_VERSION >= R_Version(3, 5, 0))
::R_ContinueUnwind(token);
#endif
Can you double check your container setup if that is given? We may have a mismatch here then between R version and R-devel version -- should be easy to fix.
I'm trying to install the CausalImpact package and failing due to a dependency on bsts.
I've tried to install bsts without success, and looking at the results I see what I think is a failure on a dependency for Boom:
install.packages("bsts", lib="C:/R/win-library/3.3")
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘bsts’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘bsts’
trying URL 'https://cran.rstudio.com/src/contrib/bsts_0.6.3.tar.gz'
Content type 'application/x-gzip' length 148815 bytes (145 KB)
downloaded 145 KB
* installing *source* package 'bsts' ...
** package 'bsts' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=c++0x -I"C:/PROGRA~1/R/R-33~1.0/include" -DNDEBUG -I`C:/PROGRA~1/R/R-33~1.0/bin/Rscript -e "cat(system.file(package='Boom'))"`/include -DNO_BOOST_THREADS -DNO_BOOST_FILESYSTEM -DADD_ -DR_NO_REMAP -DRLANGUAGE -I"C:/Users/Firstname Lastname/Documents/R/win-library/3.3/Boom/include" -I"C:/Users/Firstname Lastname/Documents/R/win-library/3.3/BH/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -mtune=core2 -c aggregate_time_series.cc -o aggregate_time_series.o
g++.exe: error: Lastname/Documents/R/win-library/3.3/Boom/include: No such file or directory
What I assume is that g++ is getting upset because R has put the library in a subfolder of C:Users/Firstname Lastname, and it's not liking the space in my name.
I tried setting the R_LIBS_USER environment variable to C:/R/win-library/3.3 to eliminate this problem with a space in the path, but with no success - even after a full restart of the computer, the error repeats - it's still going to the C:/Users/Firstname Lastname/Documents/R/win-library/3.3 directory.
I'm using RStudio 0.99.896 with R 3.3.0 on Windows 10, if that makes any difference
As suggested in this related question if you don't necessarily need the latest version of bsts you can still install version 0.6.2 on Windows, and that will let you install CausalImpact:
install.packages("https://cran.r-project.org/bin/windows/contrib/3.2/bsts_0.6.2.zip",
repos = NULL, type = "local")
library(devtools)
devtools::install_github("google/CausalImpact")
works on Win 10, R 3.3.0
I am creating a new R package where I would like to call an external c library(libcouchbase).
My problem is how to get the package build system to find the libraries during linking. I am using a linux/ubuntu like system.
This is what I had so far do :
create an configure.ac
AC_INIT(rcouchbase, version-0.1)
AC_CHECK_LIB([couchbase], [lcb_create], [],
[AC_MSG_ERROR(Failed to locate libcouchbase >= 2.0.0)])
COUCHBASE_LIBS="$LIBS"
AC_SUBST(COUCHBASE_LIBS)
AC_OUTPUT(src/Makevars)
generate a configure using autoconf
system("autoconf configure.ac > configure | chmod +x configure")
create a makevars.in
# set by configure
COUCHBASE_LIBS = #COUCHBASE_LIBS#
PKG_LIBS = $(COUCHBASE_LIBS)
build my package:
When I build my package, the configure file sucess to find the
==> R CMD INSTALL --no-multiarch --with-keep.source rcouchbase
Here the some significant output:
==> R CMD INSTALL --no-multiarch --with-keep.source rcouchbase
* installing to library ‘/home/agstudy/R/packages’
* installing *source* package ‘rcouchbase’ ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for lcb_create in -lcouchbase... yes
configure: creating ./config.status
config.status: creating src/Makevars
make: Nothing to be done for `all'.
** libs
installing to /home/agstudy/R/packages/rcouchbase/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 '/home/agstudy/R/packages/rcouchbase/libs/rcouchbase.so':
/home/agstudy/R/packages/rcouchbase/libs/rcouchbase.so: undefined symbol: lcb_destroy
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/agstudy/R/packages/rcouchbase’
Exited with status 1.
So does anyone know what I should add to my makevars/config file to solve the linkng problem?
EDIT add shared library dependencies:
ldd libcouchbase.so
linux-vdso.so.1 => (0x00007fff0a7fe000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fea0a26e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fea0a06a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fea09ca1000)
/lib64/ld-linux-x86-64.so.2 (0x00007fea0a7c5000)
When you say COUCHBASE_LIBS="$LIBS", who is filling in $LIBS for you?
At a first step, try to decompose the issue. You should us pieces: src/Makevars.in, but
not the generated src/Makevars. Does it have the correct library listed?
Also, look at / show us R CMD INSTALL ... output. Is there a link step with the library?
What you posted suggests not as the lcb_destroy symbol is missing.
In case you want to learn about Autotools / Automake, I have gone back to this (older) tutorial a few times; you may find it useful.
Edit: You are still confused. We don't want to see ldd libcouchbase; we presume that one is fine. Your package does not load so we need its linking step and its ldd output.
I.e. my RQuantLib package ends its R CMD INSTALL on
g++ -shared -o RQuantLib.so [many .o files removed] \
-L/usr/lib -lQuantLib -L/usr/lib/R/lib -lR
which clearly shows that it does link with the (required) QuantLib library.