Support Requests item #2721281, was opened at 2009-03-29 18:21
Message generated for change (Comment added) made by monipol
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=453022&aid=2721281&group_id=48422

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Install Problem (example)
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Monic Polynomial (monipol)
Assigned to: lgautier (lgautier)
Summary: RPy2 with Fink's R: no LAPACK_LIBS; setup.py fails

Initial Comment:
I'm trying to install RPy2 on Mac OS X 10.5.6 using R supplied by Fink. R 
(2.7.0) outputs the following link parameters:

$ R CMD config --ldflags
-F/sw/Library/Frameworks/R.framework/.. -framework R

$ R CMD config BLAS_LIBS
-framework vecLib -dylib_file 
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib

$ R CMD config LAPACK_LIBS


As you may see, BLAS_LIBS points to libLAPACK (vecLib) and LAPACK_LIBS is empty 
(Apple's vecLib includes both BLAS and LAPACK). I was browsing the configure 
(autoconf) file distributed with R 2.7.0 and it seems that LAPACK_LIBS is 
intended to be blank:

## Note that (see R-admin) that our main intention is to allow a
## LAPACK-containing BLAS to be used, so this is rarely needed, and
## it is not used if the BLAS already contains LAPACK.
## LAPACK_LIBS=

However, RPy'2 setup.py fails if "R CMD config LAPACK_LIBS" doesn't output 
something. Should LAPACK_LIBS really be mandatory?

For your information, these are the relevant configure parameters that Fink 
uses when building R:

--with-blas="-framework vecLib -dylib_file 
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib"
 --with-lapack --enable-R-framework=/sw/Library/Frameworks


----------------------------------------------------------------------

>Comment By: Monic Polynomial (monipol)
Date: 2009-04-22 08:06

Message:
Hello Laurent. I’d just like to let you know that RPy2 2.0.3 has been
accepted by Fink.

----------------------------------------------------------------------

Comment By: lgautier (lgautier)
Date: 2009-04-04 06:41

Message:
Thanks for looking into this.

I'd think that the empty output from running 'R CMD config LAPACK_LIBS' is
an oddity on the R CMD config side, but I'll patch setup.py so it works
properly.



----------------------------------------------------------------------

Comment By: Monic Polynomial (monipol)
Date: 2009-04-03 15:28

Message:
Laurent,

I’d like to let you know that I’ve submitted a new RPy2 package to
Fink. With regard to the problem with those link parameters, I forced RPy2
to use -framework vecLib because this is what is actually used during the
linking process of R in Fink.

----------------------------------------------------------------------

Comment By: Monic Polynomial (monipol)
Date: 2009-04-01 20:15

Message:
I've been reading more about R and Mac OS X. From
http://cran.r-project.org/doc/manuals/R-admin.html#Mac-OS-X :

The vecLib library can be used via the (default) configuration options

     --with-blas="-framework vecLib" --with-lapack

With this configure parameters, R dumps the following (I customised Fink's
configuration params to match the previous line):

$ R CMD config --ldflags
-F/sw/Library/Frameworks/R.framework/.. -framework R

$ R CMD config LAPACK_LIBS

$ R CMD config BLAS_LIBS
-framework vecLib

With this setting, RPy2's setup.py fails because LAPACK_LIBS is empty and
BLAS_LIBS doesn't start with -F (and it doesn't need to because vecLib is a
standard framework, i.e., it's located under /System/Library/Frameworks). I
guess I could modify the configure options to

--with-blas="-F /System/Library/Frameworks -framework vecLib"
--with-lapack="-F /System/Library/Frameworks -framework vecLib"

so that it matches RPy2's setup.py regexps but this seems a tad fragile.
What do you think?

----------------------------------------------------------------------

Comment By: Monic Polynomial (monipol)
Date: 2009-03-30 06:52

Message:
rpy2-2.0.3 (it’s not in Fink yet, I downloaded the tarball from
SourceForge)

$ python setup.py install
Traceback (most recent call last):
  File "setup.py", line 144, in <module>
    ri_ext = getRinterface_ext(RHOME, r_packversion)
  File "setup.py", line 129, in getRinterface_ext
    get_rconfig(RHOME, 'LAPACK_LIBS') +\
  File "setup.py", line 78, in get_rconfig
    raise Exception(cmd + '\nreturned\n' + rconfig)
Exception: "/sw/Library/Frameworks/R.framework/Resources/bin/R" CMD config
LAPACK_LIBS
returned

$

If I comment out the line in setup.py which calls get_rconfig(RHOME,
'LAPACK_LIBS') then I get another exception wrt BLAS_LIBS:

$ python setup.py install
Traceback (most recent call last):
  File "setup.py", line 144, in <module>
    ri_ext = getRinterface_ext(RHOME, r_packversion)
  File "setup.py", line 130, in getRinterface_ext
    get_rconfig(RHOME, 'BLAS_LIBS'),
  File "setup.py", line 78, in get_rconfig
    raise Exception(cmd + '\nreturned\n' + rconfig)
Exception: "/sw/Library/Frameworks/R.framework/Resources/bin/R" CMD config
BLAS_LIBS
returned
-framework vecLib -dylib_file
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
$

If I comment out both calls get_rconfig(RHOME, 'LAPACK_LIBS') and
get_rconfig(RHOME, 'BLAS_LIBS') then setup.py proceeds.

----------------------------------------------------------------------

Comment By: lgautier (lgautier)
Date: 2009-03-30 02:41

Message:

What is the exact error message returned ?
What is the version of rpy2 in Fink ?


Thanks,

L.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=453022&aid=2721281&group_id=48422

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to