Re: [Rd] R CMD check error with the GNU Scientific Library

From: Uwe Ligges <>
Date: Fri, 22 Jan 2010 11:08:45 +0100

Maybe you want to check out the R package gsl and take a look how it is solved there using a configure script that looks up the gsl installation.

Best wishes,

On 22.01.2010 10:59, wrote:
> I have been working on an R package that calls C code using .C(). I recently
> started including some functions from the GNU Scientific Library in my code.
> The code runs fine on my machine when not wrapped in the package. But I get the
> following error from "R CMD check"
> * checking whether the package can be loaded ... ERROR
> Loading required package: splancs
> Loading required package: sp
> Spatial Point Pattern Analysis Code in S-Plus
> Version 2 - Spatial and Space-Time analysis
> Loading required package: ellipse
> Loading required package: mvtnorm
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
> unable to load shared library
> '/home/david/papers/inProgress/sharka_istanbull/package/sharka.Rcheck/sharka/libs/':
> /home/david/papers/inProgress/sharka_istanbull/package/sharka.Rcheck/sharka/libs/
> undefined symbol: gsl_multimin_fminimizer_nmsimplex
> Error in library(sharka) : .First.lib failed for 'sharka'
> Execution halted
> Clearly there is some difficulty linking up with
> gsl_multimin_fminimizer_nmsimplex.
> I noticed the QRMlib library also includes gsl functions. In that package they
> include a src/gsl directory with the required .h files and in Makevars they
> have "PKG_CFLAGS = -I./gsl". I have copied this approach, but wonder if using
> the standard
> "R CMD build myPackage"
> "R CMD check myPackage"
> needs modifying in some way?
> All hints or ideas welcome.
> Thanks
> David
> mailing list Received on Fri 22 Jan 2010 - 10:13:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 22 Jan 2010 - 13:50:18 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive