help required to compile keedu-4.4.2

lux-integ lux-integ at btconnect.com
Tue Apr 27 18:42:10 CEST 2010


On Tuesday 27 April 2010 10:57:55 am Andreas Pakulat wrote:
> On 27.04.10 10:52:28, David Faure wrote:
> > On Tuesday 27 April 2010, lux-integ wrote:
> > > cd $SOURCES/kdeedu-4.4.2/build/cantor/src/backends/R/rserver
> > > && --slave
> > > --file=$SOURCES/kdeedu-4.4.2/cantor/src/backends/R/rserver/tools/autolo
> > >ads.r
> > > $SOURCES/kdeedu-4.4.2/build/cantor/src/backends/R/rserver/rautoloads.h
> >
> > The name of the binary is missing before --slave.
> >
> > add_custom_target(renvvars COMMAND ${R_EXECUTABLE} --slave --
> > file=${CMAKE_CURRENT_SOURCE_DIR}/tools/envvars.r >
> > ${CMAKE_CURRENT_BINARY_DIR}/renvvars.h )
> >
> > So basically the problem is that R_EXECUTABLE is empty.
> >
> > ./modules/FindR.cmake:11:FIND_PROGRAM(R_EXECUTABLE R)
> > ./modules/FindR.cmake:13:IF(R_EXECUTABLE-NOTFOUND)
> > ./modules/FindR.cmake:15:ENDIF(R_EXECUTABLE-NOTFOUND)
> >
> > No abort on error when not found?
>
> Apart from that, the if-check should rather use if(NOT R_EXECUTABLE) as
> that doesn't rely on "cmake internals".
>
> Andreas


I hope   the FindR.cmake script  I am using   'finds'  all the relevant 
R-executable programs.  Here is a snippet of the script I use:


     FIND_PROGRAM(R_EXE_FILE              R              ${PATH})    
     FIND_PROGRAM(R_Rscript_EXE_FILE      Rscript        ${PATH})  
     FIND_PROGRAM(R_bin_EXE_FILE          exec/R         ${PATH})   


As regards   'error-traps'.   Here are the two traps at the top of the 
script:-

FIND_PROGRAM(R_bin_EXE_FILE           exec/R     ${PATH} )  
IF(R_bin_EXE_FILE-NOTFOUND)
	MESSAGE(STATUS "Could NOT find R ")
ENDIF(R_bin_EXE_FILE-NOTFOUND)

IF(NOT R_bin_EXE_FILE)
	MESSAGE(STATUS "Could NOT find R ")
ENDIF(NOT R_bin_EXE_FILE)


I hope I ensured R is found correctly (at the bottom of the script) like  
this:-

   IF(R_HOME  AND R_EXE_FILE AND  R_bin_EXE_FILE AND R_SHARED_LIB  AND 
R_LIBS_REQ  AND  R_EXTRALIBS_REQ  AND  R_HEADER_FILE )
       SET(R_FOUND  TRUE )
       MESSAGE(STATUS  "Found R: ${R_HOME}: libs: ${R_LIBS_REQ} and 
${R_EXTRALIBS_REQ}" )
   ENDIF(R_HOME  AND R_EXE_FILE AND  R_bin_EXE_FILE AND R_SHARED_LIB  AND 
R_LIBS_REQ  AND R_EXTRALIBS_REQ  AND  R_HEADER_FILE )


with the above included, a snippet from  running cmake  gives:-

#########
-- Building with gpsd position provider
-- Found Readline: /usr/lib64/libncurses.so
-- Found:/usr/local/R-2.10.1/lib64/R/bin/R
-- Found:/usr/local/R-2.10.1/lib64/R/bin/Rscript
-- Found:/usr/local/R-2.10.1/lib64/R/bin/exec/R
-- Found:/usr/local/R-2.10.1/lib64/R/include/R.h
-- Found:/usr/local/R-2.10.1/lib64/R/modules/R_X11.so
-- Found:/usr/local/R-2.10.1/lib64/R/modules/internet.so
-- Found:/usr/local/R-2.10.1/lib64/R/modules/vfonts.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/cluster/libs/cluster.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/foreign/libs/foreign.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/grDevices/libs/grDevices.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/grid/libs/grid.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/KernSmooth/libs/KernSmooth.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/lattice/libs/lattice.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/MASS/libs/MASS.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/Matrix/libs/Matrix.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/methods/libs/methods.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/mgcv/libs/mgcv.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/nlme/libs/nlme.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/nnet/libs/nnet.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/spatial/libs/spatial.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/splines/libs/splines.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/stats/libs/stats.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/survival/libs/survival.so
-- Found:/usr/local/R-2.10.1/lib64/R/library/tools/libs/tools.so
-- Found:/usr/lib64/libgfortran.a
-- Found:/usr/local/R-2.10.1/lib64/R/lib/libRlapack.so
-- Found:/usr/local/R-2.10.1/lib64/R/modules/lapack.so
-- Found:/usr/local/R-2.10.1/lib64/R/include/R_ext/Lapack.h
Yuw should be chuffed matey;  R2 has been compiled wiv LAPAC
-- Found:/usr/local/R-2.10.1/lib64/R/lib/libRblas.so
-- Found:/usr/local/R-2.10.1/lib64/R/include/R_ext/BLAS.h
YIPPIEEEE;  R2 has been compiled with BLAS
-- Found R: /usr/local/R-2.10.1/lib64/R: 
libs: /usr/local/R-2.10.1/lib64/R/lib/libRblas.so 
and /usr/local/R-2.10.1/lib64/R/library/tools/libs/tools.so
-- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig
-- Found LibSpectre: -lspectre
-- Found Eigen2: /opt/kde-4.4.2/include/eigen2
-- Found OCaml: /usr/bin/ocamlc

#########  
however 'make' still fails at 79%


Now as I said in my last posting  there are two ~/bin directories for R:-
poet [ ~ ]$ ls /usr/local/R-2.10.1/bin
R  Rscript
poet [ ~ ]$
poet [ ~ ]$
poet [ ~ ]$ ls /usr/local/R-2.10.1/lib64/R/bin
BATCH    INSTALL  R       Rcmd    Rdconv  Rprof    SHLIB  Stangle  build  
config  f77_f2c     libtool        pager
COMPILE  LINK     REMOVE  Rd2dvi  Rdiff   Rscript  Sd2Rd  Sweave   check  exec    
javareconf  mkinstalldirs  rtags
poet [ ~ ]$
poet [ ~ ]$
(exec is a directory containing the R binary ~7Mbytes in size)


If I am targeting the wrong R's  ( or indeed the right ones) I would be 
grateful if someone on list could let me know.

yours sincerely
lux-integ



More information about the Kde-buildsystem mailing list