Rblp / Rblpapi

R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Other
167 stars 75 forks source link

Installation failure Rblpapi MacOS #363

Closed EComdty closed 2 years ago

EComdty commented 2 years ago

Hello everyone, been struggling in the recent days to install package Rblpapi on R. I've been scanning different forums but whatever I am tempting, it does fail. Note that I am novice here.

I am running on MAC OS Monterey 12.4 My R version is 4.2.0

Error message I have is the following :

> install.packages('Rblpapi') Warning in install.packages : unable to access index for repository https://ghrr.github.io/drat/bin/macosx/big-sur-arm64/contrib/4.2: cannot open URL 'https://ghrr.github.io/drat/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES' Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘Rblpapi’ Do you want to attempt to install these from sources? (Yes/no/cancel) yes installing the source package ‘Rblpapi’

trying URL 'https://cran.rstudio.com/src/contrib/Rblpapi_0.3.13.tar.gz' Content type 'application/x-gzip' length 178392 bytes (174 KB)

downloaded 174 KB

The downloaded source packages are in ‘/private/var/folders/rx/zcf43rrx0m57_tjcx66j2yhm0000gn/T/Rtmpuep1Fh/downloaded_packages’

Thanks a lot for your help

eddelbuettel commented 2 years ago

You assumed (but I guess didn't check) that Bloomberg would grace us with Arm binaries. As far as I know they do not, so there is nothing for your attempt to rely upon, and so it fails. Sorry, but fixing that is above our paygrade.

EComdty commented 2 years ago

Many thanks. In level 1 code language, does it mean that I can change my computer to run Rblpapi package ?

eddelbuettel commented 2 years ago

From the attempted download, it seems you have a Mac with the M1 chip. Bloomberg gives us no software for it.

I do not own or use a Mac. Maybe if you act creatively you can work around our script, pretend it is an Intel Mac and rely on the Rosetta translater. In shot, I was trying to explain that your use is not covered by us. And we do not have the equipment to change or update it -- and it all boilds down to that we do not have a suitable Bloomberg library for that platform.

EComdty commented 2 years ago

Many thanks, indeed you're correct, I am on M1 chip. Thanks for the tips and advices, I'll follow up if I find any bridge.

johnlaing commented 2 years ago

To elaborate on Dirk's comment

Maybe if you act creatively you can work around our script, pretend it is an Intel Mac and rely on the Rosetta translater.

The error you're seeing is thrown by us, here: https://github.com/Rblp/Rblpapi/blob/master/configure#L55 I don't know much about the difference between Mac chips, nor what magic the OS might perform to smooth over those differences. But it seems possible that simply treating arm64 as we do x86_64 could work.

eddelbuettel commented 2 years ago

I second that -- the RosettaStone layer apparent;y permits to run x86_64 binary code on Arm M1 chips so you could try. (Typically this is not true which is why we branch by architecture.) But we'd need your help in sortting it out / testing it.