Skip to content

building hmisc/design

3 messages · Andrew Beckerman, Don MacQueen, Jan de Leeuw

#
Hi there -

I am on a PBG4 1ghz, running R1.61, fink, etc.

I am trying to install Frank Harrell's Design and HMISC libraries for 
R.  I have downloaded to packages to /Users/~me/tmp, and then run sudo 
R CMD INSTALL....

I get the following error/output.

* Installing *source* package 'Design' ...
** libs
/sw/bin/g77   -fno-common  -O3 -funroll-all-loops -c lrmfit.f -o 
lrmfit.o
/sw/bin/g77   -fno-common  -O3 -funroll-all-loops -c mlmats.f -o 
mlmats.o
/sw/bin/g77   -fno-common  -O3 -funroll-all-loops -c robcovf.f -o 
robcovf.o
gcc -bundle -flat_namespace -undefined suppress -L/sw/lib -o Design.so 
lrmfit.o mlmats.o robcov
f.o  -L/sw/lib -L/sw/lib/gcc-lib/powerpc-apple-darwin6.3/3.1 
-L/sw/lib/gcc-lib/powerpc-apple-da
rwin6.3/3.1/../../.. -lreadline -ldl -lncurses -lm -lfrtbegin -lg2c 
-lSystem
ld: can't locate file for: -lreadline
make: *** [Design.so] Error 1
ERROR: compilation failed for package 'Design'


My guess is that I am missing somthing for g77 or gcc to work right?  I 
also get this error running install.packages() for the fields package 
and a few others on cran.

any help is much appreciated.

cheers
andrew
#
Jan can probably give you the definitive answer...and I might be 
revealing my ignorance!

Looks to me like the key message is this:
   ld: can't locate file for: -lreadline
In other words, libreadline is not being found.

readline can be installed using fink. If you build R from sources, 
then the configure script should find it. Then subsequent 
installations of packages should find it.

If you installed the R that Jan built, then my guess would be that 
something fell through the cracks, and however Jan incorporated 
readline into his build, some packages aren't finding it. If this is 
the case, you can probably work around it by installing readline, and 
then adjusting some environment variable (LD_LIBRARY_PATH ?) to 
include /sw/lib before attempting the package installation.

On the other hand, it could be trickier than that. To explore a bit, try this:

test[37]% which R
/usr/local/bin/R

test[38]% grep LD /usr/local/bin/R
: 
${R_LD_LIBRARY_PATH=${R_HOME}/bin:/sw/lib:/usr/local/lib:/sw/lib:/usr/local/lib:/sw/lib:/usr/local/lib:/sw/lib/gcc-lib/powerpc-apple-darwin6.2/3.1:/sw/lib/gcc-lib/powerpc-apple-darwin6.2/3.1/../../..:/usr/X11R6/lib:/sw/lib:/sw/lib:/usr/X11R6/lib}
if test -z "${DYLD_LIBRARY_PATH}"; then
   DYLD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}"
   DYLD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
export DYLD_LIBRARY_PATH

Note that /sw/lib is present in R's load library path.

-Don
At 1:29 PM +0000 1/29/03, Andrew Beckerman wrote:
#
The error message says you don't have libreadline.dylib in /sw/lib. Do 
you ?
On Wednesday, January 29, 2003, at 05:29 AM, Andrew Beckerman wrote: