microsoft / microsoft-r-open

Microsoft R Open Source
212 stars 69 forks source link

MRO 3.4.2/3.4.3 R binary was not built as a shared library #47

Closed mjmg closed 6 years ago

mjmg commented 6 years ago

rApache cannot be compiled with current MRO 3.4.2 release. It indicates "R was not built as a shared library" Is MRO 3.4.2 release compiled with "--enable-R-shlib" ?

checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for uname... /usr/bin/uname
checking for --with-apxs... no
checking for apxs... /usr/bin/apxs
checking for R... /usr/bin/R

R was not built as a shared library

Either build it with one, or use another install of R

configure: error: aborting! 
DinoV commented 6 years ago

This also blocks using rpy2 with MRO 3.4.2 as well. 3.4.1 and 3.4.0 both appear to be built with the shared library.

Neil-Schneider commented 6 years ago

I have had this similar error when using MRO3.4.2, but it seemed like it was due to the RHost interface.

In short,

See my issue on Microsoft/RTVS#4223.

alexvorobiev commented 6 years ago

littler (http://dirk.eddelbuettel.com/code/littler.html) also cannot be installed because of this issue.

gliptak commented 6 years ago

Rserve install also fails:

$ sudo R

R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Microsoft R Open 3.4.3
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2017 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 1 cores).

Default CRAN mirror snapshot taken on 2018-01-01.
See: https://mran.microsoft.com/.

> install.packages("Rserve")
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  397k  100  397k    0     0   420k      0 --:--:-- --:--:-- --:--:--  420k
* installing *source* package ‘Rserve’ ...
** package ‘Rserve’ successfully unpacked and MD5 sums checked
checking whether to compile the server... yes
configure: error: R was configured without --enable-R-shlib or --enable-R-static-lib

*** Rserve requires R (shared or static) library.                       ***
*** Please install R library or compile R with either --enable-R-shlib  ***
*** or --enable-R-static-lib support                                    ***

 Alternatively use --without-server if you wish to build only Rserve client.

ERROR: configuration failed for package ‘Rserve’
* removing ‘/opt/microsoft/ropen/3.4.3/lib64/R/library/Rserve’

The downloaded source packages are in
        ‘/tmp/RtmplT3Ipq/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("Rserve") :
  installation of package ‘Rserve’ had non-zero exit status
mjmg commented 6 years ago

This issue still exists for MRO 3.4.3.

I'm smelling a conspiracy to deliberately disable building packages that enable networking capability/other software interoperability for MRO that could compete with enterprise Microsoft R Server features.

richcalaway commented 6 years ago

Actually, both MRO 3.4.2 and MRO 3.4.3 WERE built as shared libraries, but a missing line in the etc/Makeconf file caused packages such as littler and RcppArmadillow to believe they weren't. Changing the line "LIBR = " to "LIBR = -L$(R_HOME)/lib$(R_ARCH) -lR" (and deleting the various -l flags on the LIBS line) should allow you to build these packages. We will be sure to test the fix further in 3.4.4.

nikolayvoronchikhin commented 6 years ago

Thank you @richcalaway, the solution you provided helped with installing "RServe" on MRO 3.4.2