[Rd] dyn.load error -- undefined symbol: ...
Dear R-developers, I am working on an C interface to some c functions. I compiled the c file using R CMD SHLIB without any compilation errors. All libs used are added to the LD_LIBRARY_PATH. However dyn.load("interface.so") produces undefined symbol: N_VNew_Serial; which is defined in one of the libs I link against. Where, and how to start searching for the error? Eryk __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] NUMERIC_POINTER question
Dear R-developers, Using .Call I pass a S4 class with e.g. the following class definition: setClass("mmatrix",representation( data="matrix") ) On the "C side" i do mat = GET_SLOT(vs,install("data")); and then: printf("%f\n",NUMERIC_POINTER(mat)[1]); The above print statement produces the correct output if xx<- new("mmatrix") [EMAIL PROTECTED]<-matrix(1:12+0.1,3,4). (data is double) However it prints 0. if [EMAIL PROTECTED] are integers ( [EMAIL PROTECTED]<-matrix(1:12,3,4) ). Can anyone explain it to me why? I thought that NUMERIC_POINTER makes it clear that i expect datatype numeric. (Why otherwise the distinction with INTEGER_POINTER) cheers Eryk __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Problems with autoconf example from r-ext.
Dear R-developers, I am trying to reproduce the autoconf.ac example from R-ext and fail. My autoconf file looks like this [autoconf.ac] # original by Friedrich Leisch, much changed by BDR AC_INIT([SBMLodeSolveR]) dnl Select an optional include path, from a configure option dnl or from an environment variable. AC_ARG_WITH([sbmlode-include], AC_HELP_STRING([--with-sbmlode-include=INCLUDE_PATH], [the location of SBMLODE header files]), [sbmlode_include_path=$withval]) if test [ -n "$sbmlode_include_path" ] ; then AC_SUBST([CPPFLAGS],["-I${sbmlode_include_path} ${CPPFLAGS}"]) else if test [ -n "${SBMLODE_INCLUDE}" ] ; then AC_SUBST([CPPFLAGS],["-I${SBMLODE_INCLUDE} ${CPPFLAGS}"]) fi fi dnl ditto for a library path AC_ARG_WITH([sbmlode-lib],AC_HELP_STRING([--with-sbmlode-lib=LIB_PATH],[the location of libsbmlode libraries]),[sbmlode_lib_path=$withval]) if test [ -n "$sbmlode_lib_path" ] ; then AC_SUBST([LIBS],[" -L${sbmlode_lib_path} ${LIBS}"]) else if test [ -n "${SBMLODE_LIBS}" ] ; then AC_SUBST([LIBS],["-I${SBMLODE_LIBS} ${LIBS}"]) fi fi dnl Now find the compiler and compiler flags to use : ${R_HOME=`R RHOME`} if test -z "${R_HOME}"; then echo "could not determine R_HOME" exit 1 fi CC=`"${R_HOME}/bin/R" CMD config CC` CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` dnl substitute CPPFLAGS and LIBS AC_SUBST(CPPFLAGS) AC_SUBST(LIBS) dnl and do subsitution in the src/Makevars.in AC_OUTPUT(src/Makevars) [end autoconf.ac] I rund autoconf.. [Makevars.in] [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [end-Makevars.in] I rund R CMD with R CMD INSTALL --configure-args='--with-sbmlode-lib=/data/opt/sbmlodesolve/include \ --with-sbmlode-include=/data/opt/sbmlodesolve/lib' \ SBMLodeSolveR What I am getting is a [Makvars] PKG_CFLAGS= PKG_LIBS= -L/data/opt/sbmlodesolve/include [end-Makevars] and the following warnings [warnings] * Installing *source* package 'SBMLodeSolveR' ... configure: WARNING: you should use --build, --host, --target configure: WARNING: invalid host type: /data/opt/sbmlodesolve/lib configure: creating ./config.status config.status: creating src/Makevars * [end-warnings] Any suggestions? Eryk __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Error: .First.lib failed for 'SBMLodeSolveR'
Dear R-developers, I am getting the following error message (see bottom of e-mail) and can't make a clue out of it. The zzz.R file contains .First.lib <- function(lib, pkg) library.dynam("SBMLodeSolveR",pkg,lib) .Last.lib <- function(libpath) library.dynam.unload("SBMLodeSolveR", libpath) There is a SBMLodeSolveR.so file in the src directory which works if loaded with dyn.load("/data/devel/SBMLodeSolveR/SBMLodeSolveR/src/SBMLodeSolveR.so") The error/warning messages are: * checking S3 generic/method consistency ... WARNING Error: .First.lib failed for 'SBMLodeSolveR' Call sequence: 2: stop(gettextf(".First.lib failed for '%s'", libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Execution halted See section 'Generic functions and methods' of the 'Writing R Extensions' manual. * checking replacement functions ... WARNING Error: .First.lib failed for 'SBMLodeSolveR' Call sequence: 2: stop(gettextf(".First.lib failed for '%s'", libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Execution halted In R, the argument of a replacement function which corresponds to the right hand side must be named 'value'. * checking foreign function calls ... WARNING Error: .First.lib failed for 'SBMLodeSolveR' Call sequence: 2: stop(gettextf(".First.lib failed for '%s'", libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Execution halted See section 'System and foreign language interfaces' of the 'Writing R Extensions' manual. * Eryk __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Problem with C code under R2.2 only.
Dear R developers, Running a R CMD check under R2.2 gives me the error messages (appended to this e-mail) while the with R2.1 the check on the same package directory runs fine. To my knowledge the configuration of R2.2 and R2.1 on my machine are identical. * checking S3 generic/method consistency ... WARNING Error: .First.lib failed for 'SBMLodeSolveR' Call sequence: 2: stop(gettextf(".First.lib failed for '%s'", libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Execution halted See section 'Generic functions and methods' of the 'Writing R Extensions' manual. * checking replacement functions ... WARNING Error: .First.lib failed for 'SBMLodeSolveR' Call sequence: 2: stop(gettextf(".First.lib failed for '%s'", libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Execution halted In R, the argument of a replacement function which corresponds to the right hand side must be named 'value'. * checking foreign function calls ... WARNING Error: .First.lib failed for 'SBMLodeSolveR' Call sequence: 2: stop(gettextf(".First.lib failed for '%s'", libraryPkgName(package)), domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Execution halted See section 'System and foreign language interfaces' of the 'Writing R Extensions' manual. * checking Rd files ... OK * checking for missing documentation entries ... ERROR Error: .First.lib failed for 'SBMLodeSolveR' Help is highly appreciated. Eryk Witold Eryk Wolski University of Newcastle upon Tyne School of Mathematics and Statistics Merz Court http://www.mas.ncl.ac.uk/~nwew http://www.northeasttango.org.uk __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel