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

Dirk Eddelbuettel edd at debian.org
Mon Feb 8 20:02:13 CET 2010


On 8 February 2010 at 12:38, Dirk Eddelbuettel wrote:
| On 8 February 2010 at 13:24, François Michonneau wrote:
| | Hi Dirk,
| | 
| |   With a fresh svn checkout, I can't build the package on my machine.
| | I get the following error message.
| | 
| |   Cheers,
| |   -- François
| | 
| | francois at francois-laptop:~/Desktop/phylobase$ R CMD build pkg/
| | * checking for file 'pkg/DESCRIPTION' ... OK
| | * preparing 'pkg':
| | * checking DESCRIPTION meta-information ... OK
| | * cleaning src
| | * running cleanup
| | * installing the package to re-build vignettes
| | * installing *source* package ‘phylobase’ ...
| | ** libs
| | g++ -I/usr/share/R/include      -fpic  -g -O2 -c NCLInterface.cpp -o
| | NCLInterface.o
| | g++ -I/usr/share/R/include      -fpic  -g -O2 -c ReadWithNCL.cpp -o
| | ReadWithNCL.o
| | ReadWithNCL.cpp:27:18: error: Rcpp.h: No such file or directory
| | ReadWithNCL.cpp:44: error: ‘RcppExport’ does not name a type
| | ReadWithNCL.cpp:121: error: ‘RcppExport’ does not name a type
| | ReadWithNCL.cpp:169: error: ‘RcppExport’ does not name a type
| | make: *** [ReadWithNCL.o] Error 1
| | ERROR: compilation failed for package ‘phylobase’
| | * removing ‘/tmp/Rinst2338445123/phylobase’
| |  ERROR
| | Installation failed.
| | Removing '/tmp/Rinst2338445123'
| 
| src/Makevars got hosed. Do you have one?  Try dropping this one in:
| 
| --- cut -----------------------------------------------------------------------
| RCPP_FLAGS=`${R_HOME}/bin/Rscript -e "Rcpp:::CxxFlags()"`
| RCPP_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"`
| #
| PKG_CPPFLAGS=-I. ${RCPP_FLAGS} -DHAVE_INTTYPES_H
| PKG_LIBS=${RCPP_LIBS}
| --- cut -----------------------------------------------------------------------

That was my mistake. We had configure create src/Makevars from
src/Makevars.in and I hadn't fully reverted this.  Good catch! And apologies.

Dirk

 
| That file was accidentally deleted in cleanup, (on line three or so); check
| if that is fixed in the script cleanup. I had a 'file out of date' error and
| commit and may not have checked a clean version. 
| 
| I'll try a fresh svn checkout myself later.
| 
| Dirk
| 
| 
| | 
| | 
| | On Mon, Feb 8, 2010 at 12:40, Dirk Eddelbuettel <edd at debian.org> wrote:
| | >
| | > On 2 February 2010 at 10:44, Dirk Eddelbuettel wrote:
| | > | [ Resending with 7-bit clean headers without Francois's cedille ]
| | > |
| | > | On 1 February 2010 at 12:41, Dirk Eddelbuettel wrote:
| | > | | On 1 February 2010 at 13:22, François Michonneau wrote:
| | > | | | Hi all,
| | > | | |
| | > | | | It looks that we're still having some troubles building the package on R-forge.
| | > | | |
| | > | | | Now, we get the following error message for the linux builds:
| | > | | | g++ -shared -L/usr/local/lib64 -o phylobase.so NCLInterface.o
| | > | | | ReadWithNCL.o ancestors.o descendants.o phyloXX.o reorderBinary.o
| | > | | | reorderRobust.o -L/home/rforge/lib/R/2.10/Rcpp/lib -lRcpp
| | > | | | -Wl,-rpath,/home/rforge/lib/R/2.10/Rcpp/lib -Llib/ncl -lncl
| | > | | | -L/srv/R/R-patched/build.10-01-29/lib -lR
| | > | | | /usr/bin/ld: lib/ncl/libncl.a(nxsassumptionsblock.o): relocation
| | > | | | R_X86_64_32 against `.rodata.str1.1' can not be used when making a
| | > | | | shared object; recompile with -fPIC
| | > | | | lib/ncl/libncl.a: could not read symbols: Bad value
| | > | | | collect2: ld returned 1 exit status
| | > | |
| | > | | Good catch. I never need that on 32bit where it works automatically so I
| | > | | forgot. This basically means that out plan of using
| | > | |
| | > | |     configure --enable-static --disable-shared
| | > | |
| | > | | doesn't work as configure no longer seems to add -fPIC. That stinks.
| | > | |
| | > | | I think the simplest solution is to tell configure to stuff itself, and to
| | > | | use the same Makefile we already use for Windows, maybe with an explicit
| | > | | -fPIC thrown in for good measure.
| | > |
| | > | Didn't work. I wasn't thinking hard enough.
| | > |
| | > | For OS X, three builds are attempted for three architectures.  That cannot
| | > | work with a single configure.
| | > |
| | > | Maybe we need to throw our arms up in the air and just import the sources
| | > | files from pkg/src/ncl/ncl into pkg/src/ and treat them as part of the
| | > | package.
| | >
| | > After discussing this some more with Francois, I have now made this change
| | > and committed it as a 'request for comment' type commit. So now we no longer
| | > have a seperate source directory for ncl but simply comingle the ncl sources
| | > with the phylobase sources.
| | >
| | > Advantage:  R knows how to build
| | >
| | > Disadvantage: comingled :-/
| | >
| | > It works for me on Linux, and I submitted it to the automated win-builder (by
| | > locally altering DESCRIPTION to make me Maintainer:, and I also like to
| | > change the version). The result is in:
| | >
| | >   From: Uwe.Ligges at R-Project.org
| | >   To: edd at debian.org
| | >   Cc: Uwe.Ligges at R-Project.org
| | >   Subject: Package phylobase_0.5.2.tar.gz has been checked and built
| | >   Date: Mon, 08 Feb 2010 18:20:59 +0100
| | >
| | >   Dear package maintainer,
| | >
| | >   this notification has been generated automatically.
| | >   Your package phylobase_0.5.2.tar.gz has been built (if working) and checked for Windows.
| | >   Please check the log files and (if working) the binary package at:
| | >   http://win-builder.r-project.org/oIyt0KC6A03C
| | >   The files will be removed after roughly 72 hours.
| | >   Installation time in seconds: 124
| | >   Check time in seconds: 113
| | >   Check result: WARNING
| | >   R version 2.10.1 (2009-12-14) (32-bit)
| | >
| | >   All the best,
| | >   Uwe Ligges
| | >   (CRAN maintainer of binary packages for Windows)
| | >
| | > So if anyone with OS X could try this, preferably over multiarch etc, it
| | > would be great. Maybe we can _finally_ put this to bed in a few days.
| | >
| | > Dirk
| | >
| | >
| | > --
| | >  Registration is open for the 2nd International conference R / Finance 2010
| | >  See http://www.RinFinance.com for details, and see you in Chicago in April!
| | >
| 
| -- 
|   Registration is open for the 2nd International conference R / Finance 2010
|   See http://www.RinFinance.com for details, and see you in Chicago in April!

-- 
  Registration is open for the 2nd International conference R / Finance 2010
  See http://www.RinFinance.com for details, and see you in Chicago in April!


More information about the Phylobase-devl mailing list