[Phylobase-devl] New phylobase build approach using static libncl (Was: Rcpp and OS X compiliation)

Dirk Eddelbuettel edd at debian.org
Sun Jan 24 04:04:30 CET 2010

Thanks to the excellent debugging work by Mark Holder, as well as some help
from Simon Urbanek, we finally got OS X and Rcpp to be nice to each other:
static linking lets everybody be friends.

This was encoded in Rcpp 0.7.3 which was released earlier this week. So I
figured it was time to get back to the rest of the phylobase build.  And a
few days earlier I had suggested:

On 11 January 2010 at 08:55, Dirk Eddelbuettel wrote:
| I am still game. I see a three-pronged approach:
|   i)    Suggestion Let's fix NCL and have a locally built version outside 
|         of phylobase on all test platforms
|   ii)   With that, fix/simplify Rcpp usage. Should be easy
|   iii)  With that, get back to i) and clean up NCL's configure.
| I think it would be easier to disentangle Rcpp and NCL inside phylobase while
| we make this more.

And I just committed a simple and easy fix to phylobase's SVN on R-Forge.  In
a nutshell, we were just descending down to ncl's source directory and saying
'configure; make' which leaves the ncl library unfinished. The mighty libtool
would normally run over it once more during 'make install'.

So I changed it to this (and recall that this is relative to top-level
directory for phylobase):

   cd src/ncl
   ./configure --quiet --enable-static --disable-shared --prefix=`pwd`/..
   make install
   cd ../..

So we ask for a static library (and no dynamic library), and we tell
configure to put it simply one directory up. That works well enough!  I also
changed the CPPFLAGS and LDFLAGS accordingly: include/ncl and lib/ncl are now
created during that new 'make install' step:

   ## configure include/load flags and copy sample source to inst/doc
   AC_SUBST([CPPFLAGS],["${CPPFLAGS} ${rcpp_cxxflags} -Iinclude/ncl"])
   AC_SUBST([LDFLAGS],["${LDFLAGS} ${rcpp_ldflags} -Llib/ncl -lncl"])

With that phylobase builds and installs fine on my Linux machine and
(finger's crossed!!) should do the same on other people's Linux and OS X
boxen.  So if over the next few days you have a moment, could you update from
SVN and give it a whirl?

Cheers, Dirk

Three out of two people have difficulties with fractions.

More information about the Phylobase-devl mailing list