failure ton install rCLR in ubuntu
agstudy opened this issue · 4 comments
Hi,
I am trying to create a mono version of rsqlserver. But When I can't install rClr in my ubuntu machine.
I get this error
Unable to find version '0.7.4' of package 'DynamicInterop'.
I am using mono 4.0:
Mono JIT compiler version 4.0.2 (Stable 4.0.2.5/c99aa0c Fri Jul 17 19:55:46 CEST 2015)
My sessionInfo
sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.2.1
Here my complete stack trace:
installing to library ‘/home/r/R/x86_64-pc-linux-gnu-library/3.2’
* installing *source* package ‘rClr’ ...
MONO_CFLAGS=-D_REENTRANT -I/usr/local/lib/pkgconfig/../../include/mono-2.0
GLIB_CFLAGS=-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
Created ./src/Makevars
** libs
/bin/bash: -c: line 0: syntax error near unexpected token `('
/bin/bash: -c: line 0: `echo **Variable (information only for diagnosis purposes)**'
make: [printarch] Error 1 (ignored)
R_ARCH=
OBJECTS=rClrMono.o
SHLIB_EXT=.so
CC=gcc -std=gnu99
CXX=g++
**END Variable**
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG `pkg-config --cflags monosgen-2 glib-2.0` -g -D MONO_CLR -D MONO_INST -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c rClr.cpp -o rClrMono.o -lsupc++
# On a CentOS OS, I needed to use the following. The CPP and C flags would otherwise return two options not understood:
# -xHOST -fp-model precise
# @echo ALL_CPPFLAGS=-I/usr/share/R/include -DNDEBUG
# @echo ALL_CFLAGS= `pkg-config --cflags monosgen-2 glib-2.0` -g -D MONO_CLR -D MONO_INST -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g
# g++ -std=c++11 -I/apps/R/3.1.1/lib64/R/include -DNDEBUG -I/usr/local/include `pkg-config --cflags mono-2 glib-2.0` -g -D MONO_CLR -D MONO_INST -fpic -O3 -openmp -c rClr.cpp -o rClrMono.o -lsupc++
#gcc -std=gnu99 -shared -o rClr.so rClrMono.o -L/usr/lib/pkgconfig/../../lib -lmono-2.0 -lm -lrt -ldl -lpthread -lglib-2.0 -L/usr/lib/R/lib -lR
g++ -std=c++11 -shared -Wl,-z,relro -o rClrMono.so rClrMono.o `pkg-config --libs monosgen-2 glib-2.0` -L/usr/lib/R/lib -lR
rClr.cpp: In function ‘CLR_OBJ* rclr_mono_create_object(MonoDomain*, MonoImage*, char*, SEXP)’:
rClr.cpp:79:82: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘CLR_OBJ* rclr_mono_get_current_object_direct()’:
rClr.cpp:140:85: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘MonoString* rclr_mono_get_last_clr_exception()’:
rClr.cpp:173:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘SEXPREC* rclr_mono_call_method_with_exception(const char*, CLR_OBJ*, MonoClass*, SEXP, CLR_OBJ*)’:
rClr.cpp:215:104: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘SEXPREC* make_date_sexp(int, double*)’:
rClr.cpp:486:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘SEXPREC* make_POSIXct_sexp(int, double*)’:
rClr.cpp:493:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:493:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:501:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:501:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘CLR_OBJ* rclr_convert_element(SEXP)’:
rClr.cpp:1259:125: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:1259:125: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:1268:127: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:1268:127: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:1287:145: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:1287:145: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:1291:147: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp:1291:147: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘double* clr_datetimearray_obj_to_r_date_numeric(CLR_OBJ*)’:
rClr.cpp:1532:135: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘double* clr_datetimearray_obj_to_r_posixct_numeric(CLR_OBJ*)’:
rClr.cpp:1536:134: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘double* clr_datetime_obj_to_r_date_numeric(CLR_OBJ*)’:
rClr.cpp:1549:123: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘double* clr_datetime_obj_to_r_posixtc_numeric(CLR_OBJ*)’:
rClr.cpp:1559:122: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘SEXPREC* rclr_mono_diagnose_method_parameters(SEXP)’:
rClr.cpp:1753:101: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘CLR_OBJ* rclr_mono_call_static_method_tname(char*, char*, void**, int)’:
rClr.cpp:1765:103: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘CLR_OBJ* rclr_mono_convert_element_rdotnet(SEXP)’:
rClr.cpp:1783:63: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘CLR_OBJ* rclr_mono_call_static_method_tname_directcall(char*, char*, void**, int)’:
rClr.cpp:1804:82: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
rClr.cpp: In function ‘void rclr_mono_load_assembly(char**)’:
rClr.cpp:1908:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
#g++ -shared -L/usr/lib/R/lib -Wl,-z,relro -o rClr.so rClrMono.o -L/usr/lib/pkgconfig/../../lib -lmono-2.0 -lm -lrt -ldl -lpthread -lglib-2.0 -L/usr/lib/R/lib -lR
"xbuild" rClr_monodev.sln /t:Rebuild /p:Configuration=UnixDebug /p:Platform="Any CPU"
XBuild Engine Version 12.0
Mono, Version 4.0.2.0
Copyright (C) 2005-2013 Various Mono authors
Build started 7/18/2015 6:32:50 AM.
__________________________________________________
Project "/home/r/rClr/src/rClr_monodev.sln" (Rebuild target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "UnixDebug|Any CPU".
Target Rebuild:
Project "/home/r/rClr/src/ClrFacade/ClrFacade.csproj" (Rebuild target(s)):
Target RestorePackages:
Executing: mono --runtime=v4.0.30319 "/home/r/rClr/src/.nuget/NuGet.exe" install "/home/r/rClr/src/ClrFacade/packages.config" -source "" -RequireConsent -solutionDir "/home/r/rClr/src/"
Restoring NuGet packages...
To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
WARNING: Error: SendFailure (Error writing headers)
Unable to find version '0.7.4' of package 'DynamicInterop'.
/home/r/rClr/src/.nuget/NuGet.targets: error : Command 'mono --runtime=v4.0.30319 "/home/r/rClr/src/.nuget/NuGet.exe" install "/home/r/rClr/src/ClrFacade/packages.config" -source "" -RequireConsent -solutionDir "/home/r/rClr/src/"' exited with code: 1.
Task "Exec" execution -- FAILED
Done building target "RestorePackages" in project "/home/r/rClr/src/ClrFacade/ClrFacade.csproj".-- FAILED
Done building project "/home/r/rClr/src/ClrFacade/ClrFacade.csproj".-- FAILED
Task "MSBuild" execution -- FAILED
Done building target "Rebuild" in project "/home/r/rClr/src/rClr_monodev.sln".-- FAILED
Done building project "/home/r/rClr/src/rClr_monodev.sln".-- FAILED
Build FAILED.
Errors:
/home/r/rClr/src/rClr_monodev.sln (Rebuild) ->
(Rebuild target) ->
/home/r/rClr/src/ClrFacade/ClrFacade.csproj (Rebuild) ->
/home/r/rClr/src/.nuget/NuGet.targets (RestorePackages target) ->
/home/r/rClr/src/.nuget/NuGet.targets: error : Command 'mono --runtime=v4.0.30319 "/home/r/rClr/src/.nuget/NuGet.exe" install "/home/r/rClr/src/ClrFacade/packages.config" -source "" -RequireConsent -solutionDir "/home/r/rClr/src/"' exited with code: 1.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.5008550
make: *** [rClrLibComp] Error 1
ERROR: compilation failed for package ‘rClr’
* removing ‘/home/r/R/x86_64-pc-linux-gnu-library/3.2/rClr’
Exited with status 1.
This looks like a security error due to using a custom mono built from tarball/git. Try reinstalling after running this command:
mozroots --import --sync
I had a similar issue here: https://github.com/dotnet/coreclr/issues/352
Thanks
Yes I am installing the mono from the tarball.
After running this command , I try to install the rClr or all the mono distribution?
This woks fine. Thank you very much !!!
Thank you all for the feeback - note to self that this needs documentation.
I have the same error again.
I am using mono 5.2.
Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 09:09:21 UTC 2019)
Here is my sessionInfo.
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] usethis_1.4.0 devtools_2.0.2