[R-SIG-Mac] [plr for postgressql] make throws "*** Cannot build PL/R because libR is not a shared library"

Sam Hunting sam_hunting2004 at yahoo.com
Tue Jan 9 19:09:21 CET 2007


> Message: 2
> Date: Mon, 8 Jan 2007 14:39:05 -0500
> From: Simon Urbanek <simon.urbanek at r-project.org>
> Subject: Re: [R-SIG-Mac] [plr for postgressql] make
> throws "*** Cannot
> 	build	PL/R because libR is not a shared library"
> error
> To: Sam Hunting <sam_hunting2004 at yahoo.com>
> Cc: r-sig-mac at stat.math.ethz.ch
> Message-ID:
> <40EA3F42-DEDD-4CCD-BB16-9A2526876183 at r-project.org>
> Content-Type: text/plain; charset=US-ASCII;
> delsp=yes; format=flowed
> 
> Sam,
> 
> just for the record, are you sure you want to
> re-compile R yourself?  
> It is not necessary, so I'm just asking ...

I like to, especially when I'm installing a lot of
packages, some of which do not use DMGs. Anyhow, with
the help of Joe Conway and others, I solved the
problem, and here is the summary:

When installing plr 8.2.0.1 into
postgresql-8.2.0 on OS X 10.4, if you get the "Cannot
build PL/R because libR is not a shared library"
error:

1. Make sure that $R_HOME is set correctly. Mine is
now set to:

/Library/Frameworks/R.framework/Resources

and as a result make can find the lib files it's
looking for.

2. Make sure that the same version of gcc used to
compile postgresql is used to compile plr. I used gcc
4.0 for both. (Since the default for OS X is 3.3, I'm
guessing that the postgresql configure file makes its
own selection.)

a. The default gcc version can be discovered and
changed on OS X with gcc_select

b. The version of gcc used to compile postgresql can
be discovered within the psql shell:

postgres=# select version();

with a result that looks like:

PostgreSQL 8.2.0 on powerpc-apple-darwin8.8.0,
compiled by GCC powerpc-apple-darwin8-gcc-4.0.0 (GCC)
4.0.0 20041026 (Apple Computer, Inc. build 4061



More information about the R-SIG-Mac mailing list