[Bioc-devel] Boost as build dependency ?

Steffen Neumann sneumann at ipb-halle.de
Wed Feb 25 23:56:05 CET 2009


[In Response to https://stat.ethz.ch/pipermail/bioc-devel/2009-February/001806.html]

On Thu, 2009-02-19 at 12:37 +0100, Steffen Neumann wrote:
> On Tue, 2009-02-17 at 17:51 -0800, Patrick Aboyoun wrote:
> > I hadn't done a survey of BOOST usage in BioC packages. It does look 
> > like we have hit critical mass for BOOST usage. Perhaps the developers 
> > of RBGL, bgx, BGmix and Steffen could get together to make a lightweight 
> > "RBOOST" package that they could all link to.

I have started an RBOOST package. It's currently living at 
http://msbi.ipb-halle.de/~sneumann/RBOOST.tgz
and contains an untarred boot-1.38.0

R CMD INSTALL RBOOST will build and install the headers 
and a subset of boost libraries into the RBOOST package:

	BOOST_DIRS="--includedir=${R_PACKAGE_DIR}/include --libdir=${R_PACKAGE_DIR}/libs"
	BOOST_LIBS="--with-filesystem --with-iostreams --with-regex --with-system"
	BOOST_CONF="--user-config=user-config.jam --layout=system link=shared"
	$BJAM ${BOOST_CONF} ${BOOST_DIRS} ${BOOST_LIBS} install

The depending packages should have in their DESCRIPTION:

	...
	LinkingTo: RBOOST 
	...

to be able to pick up the headers. Linking is a bit more difficult, 
and I am not sure I got the best way described in:
http://cran.r-project.org/doc/manuals/R-exts.html#Linking-to-other-packages

Currently my src/Makevars contains the following hack, 
although I feel that if I want to make the boost stuff 
optional and more generic, a configure.in would be the way to go:

	RBOOST_DIR=`echo 'library(RBOOST); cat(system.file("libs", package="RBOOST"))' | ${R_HOME}/bin/R --vanilla --no-save --slave`
	RBOOST_LIBS=-L"$(RBOOST_LIB)" \
	            -lboost_filesystem-mt -lboost_iostreams-mt \
	            -lboost_regex-mt -lboost_system-mt

Comments ?

Yours,
Steffen



More information about the Bioc-devel mailing list