[Pkg-postgresql-public] Pl/R
Christopher Browne
cbbrowne@libertyrms.info
Tue, 23 Mar 2004 22:32:16 -0500 (EST)
Stephen Frost said:
> * Christopher Browne (cbbrowne@ca.afilias.info) wrote:
>> 1. /usr/lib/postgresql/lib/plr.so references libR.so
>>
>> cbbrowne@dev6:~$ ldd /usr/lib/postgresql/lib/plr.so
>> libR.so => /usr/lib/R/bin/libR.so (0x40020000)
>>
>> But ldconfig didn't know about this until I added "/usr/lib/R/bin" to
>> /etc/ld.so.conf and ran "ldconfig -v". Is there a "standard" way for
>> dpkg to cope with that?
>
> That's an interesting problem... We don't want packages making changes
> to ld.so.conf unless it's through some kind of defined interface and I'm
> not aware of any at the moment. It'd be nicer if the R folks had just
> used the standard library paths. :/
Other thoughts:
- Perhaps we could set up symlinks
/usr/lib/R/bin/libR.so --> /usr/lib/libR.so
/usr/lib/R/bin/libRlapack.so --> /usr/lib/libRlapack.so
(The latter may not be an issue; dunno...)
- Perhaps the R Debian maintainer could push the libs to where "we want
them".
- Perhaps we need only add a LD_LIBRARY_PATH in the right environment.
>> 2. The /etc/init.d/postgresql script needs to have "export
>> R_HOME=/usr/lib/R" added to it.
>>
>> Is there a decent 'standard' way of adding that in when pl/r is added
>> in? It's only needed if postgresql-plr is installed...
>
> The only way I can think of would be to have a directory of environment
> variables under /etc/postgresql which will then be included by
> /etc/init.d/postgresql. Kind of ugly, but we can't have packages
> modifying the /etc/init.d/postgresql script, that way leads to disaster.
This might be something reasonably addable via a conditional setting,
adding a few lines to the init.d file:
if [[ -e /usr/lib/R ]] ; then
R_HOME=/usr/lib/R
export R_HOME
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/R/bin
export LD_LIBRARY_PATH
fi
> On the issue of changes to the 'main' postgresql package- I've got
> something of a bigger one to request that can't really be done any other
> way I don't think. To support some of the things that PostGIS can do
> the PostgreSQL server needs to be linked against libstdc++, from what I
> understand. Can this be done?
That leads down the unfortunate path of adding dependancies to the parent
package.
I don't feel much guilt about adding 6 lines to /etc/init.d/postgresql on
the basis that someone _might_ want plr, but I'd be a mite irritated if I
installed the PG server, and discovered all sorts of dependancies that
seemed spurious to me... In effect, _I_ don't need PostGIS, so why should
all its dependencies be forced on me? I am willing to listen to arguments
the other way, but if I'm trying to build a server with minimal bloat,
irritation would certainly rise.
I'm not sure there's a better answer, though.
--
(reverse (concatenate 'string "ofni.smrytrebil@" "enworbbc"))
<http://dev6.int.libertyrms.info/>
Christopher Browne
(416) 646 3304 x124 (land)