[Rd] about R CMD check

Douglas Bates bates at stat.wisc.edu
Tue Jan 25 09:21:11 CET 2005


Uwe Ligges wrote:
> xt_wang at cse.concordia.ca wrote:
> 
>> hello,
>>
>> I create a package which includes C code and Lapack. But when I run " 
>> R CMD
>> check ". an error message, "/usr/bin/ld: cannot find -lfrtbegin " 
>> occurs. could
>> you tell me what is the problem?
> 
> 
> OS? R version? Self compiled or rpm/apt get?

Looks like RedHat Linux from the name of the libraries.

> Why do you check "var" when the package claims to be called "WXT"?
> Before any checking it is a good idea to try R CMD INSTALL ... (which 
> does not work either, I guess).

My guess is that an f2c or g2c development package needs to be 
installed.   On a Debian system the library comes from the libg2c0-dev 
package

$ dlocate libfrtbegin
libg2c0-dev: /usr/lib/libfrtbegin.a

By the way, I would pay attention to those warnings about incompatible 
pointer types in calls to dpotrf and dpotrs.  Remember that calls to 
Fortran routines from C must pass scalars by reference, not by value.

>> the detailed message is as follows:
>> [credsim at confsys ~/src]$ R CMD check var
>> * checking for working latex ... OK
>> * using log directory '/home/credsim/src/var.Rcheck'
>> * checking for file 'var/DESCRIPTION' ... OK
>> * checking if this is a source package ... OK
>>
>> * Installing *source* package 'WXT' ...
>> ** libs
>> gcc -I/usr/lib/R/include  -I/usr/local/include -D__NO_MATH_INLINES 
>> -mieee-fp -fPIC  -O2 -g -march=i386 -mcpu=i686 -c 1221.c -o 1221.o
>> 1221.c: In function `Matrix_A_12':
>> 1221.c:773: warning: passing arg 3 of `dpotrf_' from incompatible 
>> pointer type
>> 1221.c:774: warning: passing arg 4 of `dpotrs_' from incompatible 
>> pointer type
>> 1221.c: In function `Matrix_A_1':
>> 1221.c:1037: warning: passing arg 3 of `dpotrf_' from incompatible 
>> pointer type
>> 1221.c:1038: warning: passing arg 4 of `dpotrs_' from incompatible 
>> pointer type
>> 1221.c: In function `Matrix_A_2':
>> 1221.c:1289: warning: passing arg 3 of `dpotrf_' from incompatible 
>> pointer type
>> 1221.c:1290: warning: passing arg 4 of `dpotrs_' from incompatible 
>> pointer type
>> gcc -shared -L/usr/local/lib -o WXT.so 1221.o -L/usr/lib/R/bin 
>> -lRlapack -L/usr/local/lib -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2
>> -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../.. -lfrtbegin -lg2c -lm
>> -lgcc_s
>> /usr/bin/ld: cannot find -lfrtbegin
>> collect2: ld returned 1 exit status
>> make: *** [WXT.so] Error 1
>> ERROR: compilation failed for package 'WXT'
>> ** Removing '/home/credsim/src/var.Rcheck/WXT'
>>  ERROR
>> Installation failed.
>>
>> ______________________________________________
>> R-devel at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list