[R-SIG-Mac]building hmisc/design

Don MacQueen macq@llnl.gov
Wed, 29 Jan 2003 07:11:57 -0800


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:
>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
>
>--
>The University of Stirling is a university established in Scotland by
>charter at Stirling, FK9 4LA.  Privileged/Confidential Information may
>be contained in this message.  If you are not the addressee indicated
>in this message (or responsible for delivery of the message to such
>person), you may not disclose, copy or deliver this message to anyone
>and any action taken or omitted to be taken in reliance on it, is
>prohibited and may be unlawful.  In such case, you should destroy this
>message and kindly notify the sender by reply email.  Please advise
>immediately if you or your employer do not consent to Internet email
>for messages of this kind.  Opinions, conclusions and other
>information in this message that do not relate to the official
>business of the University of Stirling shall be understood as neither
>given nor endorsed by it.
>
>_______________________________________________
>R-SIG-Mac mailing list
>R-SIG-Mac@stat.math.ethz.ch
>http://www.stat.math.ethz.ch/mailman/listinfo/r-sig-mac