Skip to content

[Bioc-devel] CXX on liverpool/lemming

5 messages · Neumann, Steffen, Kasper Daniel Hansen, Martin Morgan

#
Hi,

I am trying to figure the build report for both windows machines on 
http://bioconductor.org/checkResults/2.2/bioc-LATEST/Rdisop/liverpool-buildsrc.html

which says 

g++ -c Rcpp.cpp -o Rcpp.o -I"e:\biocbld\bbs-2.2-bioc\R/include" -I"e:\biocbld\bbs-2.2-bioc\R/src/include"  -Wall -O2
g++: not found

where the corresponding Makefile says:

$(OBJ): $(SRC)
        $(CXX) -c $(SRC) -o $(OBJ) $(CXXFLAGS)

So the environment variable CXX is set to g++,
which is not in the path. Did I miss something ?

A related question:
Is there a description of the software installation 
for the build machines, like compiler and build environment ?
The description for developers in the wiki are a bit sparse.

Yours,
Steffen
#
On Oct 14, 2007, at 12:20 PM, Steffen Neumann (on the road) wrote:

            
Go to the top build report page:
   http://bioconductor.org/checkResults/2.2/bioc-LATEST/index.html
and click on the server name (which seems to indicate that something  
is certainly wrong on lemming)

Kasper
#
Kasper Daniel Hansen <khansen at stat.berkeley.edu> writes:
Hi Steffen, Kasper

The R development tools use MinGW. The 4.2.1 compiler is g++-sjlj
(sjlj apparently refering to short-jump, long-jump).

But this is a detail that you shouldn't have to worry about. As on any
platform, you can / should discover the correct compiler by asking R
(R CMD config CXX). With the following changes

Index: src/Makevars.win
===================================================================
--- src/Makevars.win    (revision 27990)
+++ src/Makevars.win    (working copy)
@@ -1,2 +1,2 @@
 PKG_LIBS=-L./win -lims -L../RcppSrc -lRcpp
-PKG_CPPFLAGS=-I../RcppSrc -I../imslib/src
\ No newline at end of file
+PKG_CPPFLAGS=-I../RcppSrc -I./imslib/src
\ No newline at end of file
Index: configure.win
===================================================================
--- configure.win       (revision 27990)
+++ configure.win       (working copy)
@@ -1,7 +1,8 @@
 echo "Building libRcpp.a in RcppSrc..."
 R_HOME=`R RHOME`
+CXX=`R CMD config CXX`
 cd RcppSrc
-make RHOME=$R_HOME -f Makefile.win
+make RHOME=${R_HOME} CXX=${CXX} -f Makefile.win
 cd ..
 if test \! -d inst
 then
@@ -16,10 +17,3 @@
 #make ./src/libims.la
 #cp ./src/libims-0.dll src/win/
 #cd ..
-
-IMS_CFLAGS=-I../imslib/src/
-IMS_LIBS=../imslib/src/.libs/libims.a
-
-CPPFLAGS="$CPPFLAGS -I../RcppSrc $IMS_CFLAGS"
-LDFLAGS="${LDFLAGS} -L../RcppSrc -lRcpp $IMS_LIBS"
-LIBS="${LIBS} -lRcpp $IMS_LIBS"

Rdisop compiles RccpSrc and Rdisop.dll, until

windres --preprocessor="gcc-sjlj -E -xc -DRC_INVOKED" -I
C:/R/src/R-2-6-branch/include  -i Rdisop_res.rc -o Rdisop_res.o
g++-sjlj   -shared -s  -o Rdisop.dll Rdisop.def disop.o Rdisop_res.o
-LC:/R/src/R-2-6-branch/bin -L./win -lims -L../RcppSrc -lRcpp   -lR
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.2.1-sjlj/../../../../mingw32/bin/ld.exe
: cannot find -lims
collect2: ld returned 1 exit status
make[3]: *** [Rdisop.dll] Error 1
make[2]: *** [srcDynlib] Error 2
make[1]: *** [all] Error 2
make: *** [pkg-Rdisop] Error 2          

which I guess just means a little more work figuring out where that
lims library is.
lemming does seem to need its tools updated (or perhaps just the
script that builds the web page); I think lemming switched to the 2.2
builds on Thursday or Friday. This is a separate issue from Steffen's.

Martin
#
On Sun, 2007-10-14 at 16:13 -0700, Martin Morgan wrote:
...
This is only the information for R compile time. 
If I have a binary installation, my current development 
environment could be different. Granted, for c++ 
compilers should match down to the version number.
Actually, libims is sitting below the Rdisop/src/imslib folder,
and is compiled via the Makevars Makefile. Afterwards I copy the 
libims.dll into the Rdisop/src directory.

On Unix both Rdisop.so and libims.so are picked up during install 
and copied to site-library/Rdisop/libs/ 

The same mechanism under Windows copies only Rdisop.dll over.
Any hint which shared objects are used during R CMD INSTALL ?
I tried to locate the script or Makefile snippet responsible for this,
but failed miserably :-(

Thanks for any hints, 
Yours,
Steffen
#
"Steffen Neumann (on the road)" <sneumann at ipb-halle.de> writes:
On windows there's really only one supported tool chain. On other
platforms your configure could test for a defined CXX env. variable. R
consults R_HOME/etc/Makeconf for source packages without configure
scripts and so I think assumes close similarity between compile time
and current environments.
The paradigm seems to be along the lines of (from the rsbml package
configure.win, copying an external dll into the package)

#!/bin/sh

mkdir $DPKG/libs
cp $LIBSBML_PATH/bin/*.dll $DPKG/libs

DPKG is defined in R_HOME/src/gnuwin32/MakePkg (which seems to be
driving the installation), and is the directory where the package is
being built for installation.

I feel a little uncertain answering these questions definitively; you
might try asking on the R-devel list where you'll tap into a deeper
pool of experience (the original question, about lemming / liverpool,
were very appropriate for the bioc-devel list). Others on the current
list might feel free to chip in, too.

Martin