[Rcpp-devel] Help with Rcpp
Sure! Here is the result of R CMD INSTALL * installing to library ?/home/talita/R? * installing *source* package ?mypackage? ... checking for g++... g++ checking for C++ compiler default output... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking fftw3.h usability... yes checking fftw3.h presence... yes checking for fftw3.h... yes checking jpeglib.h usability... yes checking jpeglib.h presence... yes checking for jpeglib.h... yes checking for inline... inline checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c equalize.cpp -o equalize.o g++ -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c freqfilters.cpp -o freqfilters.o gcc -std=gnu99 -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c incircle.c -o incircle.o gcc -std=gnu99 -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c inpoly.c -o inpoly.o g++ -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c interface.cpp -o interface.o gcc -std=gnu99 -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c jpegio.c -o jpegio.o g++ -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c lan.cpp -o lan.o gcc -std=gnu99 -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c laplacian.c -o laplacian.o g++ -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c matrix_r.cpp -o matrix_r.o g++ -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c median.cpp -o median.o gcc -std=gnu99 -I/home/users/tperciano/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c normalize.c -o normalize.o g++ -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c quality.cpp -o quality.o g++ -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c save.cpp -o save.o gcc -std=gnu99 -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c smooth.c -o smooth.o gcc -std=gnu99 -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c sobel.c -o sobel.o gcc -std=gnu99 -I/home/talita/lib/R/include -DNDEBUG -g -O2 -I/usr/local/include -I"/home/talita/R/Rcpp/include" -fpic -g -O2 -c stretch.c -o stretch.o g++ -shared -L/usr/local/lib -o mypackage.so equalize.o freqfilters.o incircle.o inpoly.o interface.o jpegio.o lan.o laplacian.o matrix_r.o median.o normalize.o quality.o save.o smooth.o sobel.o stretch.o -ljpeg -lfftw3 installing to /home/talita/R/mypackage/libs ** R ** data ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (mypackage) Talita
On Mon, May 12, 2014 at 2:17 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
On 12 May 2014 at 14:03, Talita Perciano wrote:
| Hi,
|
| I'm using Rcpp with my package and I'm having some issues with version
0.11.0.
| I followed all the instructions in the manual and I don't know what is
| happening. The NAMESPACE file of my package is:
|
| useDynLib(x)
| exportPattern("^[[:alpha:]]+")
| importFrom(Rcpp, evalCpp)
|
| In the DESCRIPTION file I have the following specific lines for Rcpp:
|
| Imports: Rcpp (>= 0.11.0)
| LinkingTo: Rcpp
|
| I can run R CMD check --as-cran and R CMD INSTALL with no problems. The
issue
| comes when I try to use the package in R. I can load it but it seems
that some
| symbols are missing in the shared library of the package. I checked the
shared
| library and I got the following issues:
|
| lan.o: In function `Rcpp::Rstreambuf<false>::sync()':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:83: undefined reference to
| `R_FlushConsole'
| lan.o: In function `Rcpp::Rstreambuf<true>::sync()':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:79: undefined reference to
| `R_FlushConsole'
| lan.o: In function `Rcpp::Rstreambuf<false>::overflow(int)':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:74: undefined reference to
| `REprintf'
| lan.o: In function `Rcpp::Rstreambuf<false>::xsputn(char const*, long)':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:65: undefined reference to
| `REprintf'
| lan.o: In function `Rcpp::Rstreambuf<true>::overflow(int)':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:70: undefined reference to
| `Rprintf'
| lan.o: In function `Rcpp::Rstreambuf<true>::xsputn(char const*, long)':
| ../R/Rcpp/include/Rcpp/iostream/Rstreambuf.h:61: undefined reference to
| `Rprintf'
Can you show the lines (from the shell prompt) that get executed when you
do
R CMD INSTALL nameOfYourPackage_1.2.3.tar.gz
It looks like you are either not linling to R, or possibly on a system
where
R is built as a _static_ binary (which is mighty uncommon).
These symbols should come from libR.so which is usually part of the default
build triggered by R CMD INSTALL ....
Dirk
|
| > R.version
| _
| platform x86_64-unknown-linux-gnu
| arch x86_64
| os linux-gnu
| system x86_64, linux-gnu
| status
| major 3
| minor 1.0
| year 2014
| month 04
| day 10
| svn rev 65387
| language R
| version.string R version 3.1.0 (2014-04-10)
| nickname Spring Dance
|
|
| I would appreciate if someone could help me with that.
|
| Thank you,
| Talita
|
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140512/c0731f10/attachment.html>