Closed Bio7 closed 6 years ago
I searched a little bit and found in the R news some pointers for long vectors:
https://cran.r-project.org/src/base/NEWS
A detailed description of the changes can be found in this article:
https://www.sciencedirect.com/science/article/pii/S0098300416307415
So it might be possible that the LENGTH function in line 36:
https://github.com/s-u/Rserve/blob/master/src/qap_encode.c#L36
can be replaced by XLENGTH, etc.?
I got the same error, and replacing LENGTH() with XLENGTH() as @Bio7 suggested does seem to eliminate the error.
It needs more than just the one occurrence. So I added large vector support to the QAP encoding and decoding. It would be interesting to find out why R creates a large vector for something that is actually small - could be a bug in R.
If it helps:
connection.parseAndEval("array(0.0,c(4,3))")
header read result: 16 DUMP [16]: 03 00 00 00 19 00 00 00 00 00 00 00 00 00 00 00 |................ loading buffer (awaiting 25 bytes) parsing parameters (buf=0x55ce86451170, len=25) DUMP [25]: 04 14 00 00 61 72 72 61 79 28 30 2e 30 2c 63 28 34 2c 33 29 29 0a 00 00 00 |....array(0.0,c(4,3)).... PAR[0]: 00000019 (PAR_LEN=20, PAR_TYPE=4, large=no, c=0x55ce86451170, ptr=0x55ce86451174) CMD=00000003, pars=1 parseString("array(0.0,c(4,3)) ") buffer parsed, stat=1, parts=2 result type: 20, length: 1 R_tryEval(xp,R_GlobalEnv,&Rerror); Calling R_tryEval for expression 1 [type=6] ... Expression 1, error code: 0 expression(s) evaluated (Rerror=0). [*has attr*] Vector of real variables: 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 getStorageSize(0x55ce853a3fa8,type=14,len=12) Erreur : les vecteurs longs ne sont pas encore supportés : qap_encode.c:36 Fatal error: unable to initialize the JIT
sessionInfo() R version 3.5.0 (2018-04-23) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1 locale: [1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C [3] LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8 [5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 [7] LC_PAPER=fr_FR.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base
Any updates, receiving same issue.
@pgrech2 you may be pulling an older release of Rserve if you're installing from CRAN (install.packages('Rserve')
).
I ran into this issue earlier and needed to install via RForge:
install.packages('Rserve',,"http://rforge.net/",type="source")
Hi,
I have the same issue and, when trying to install it from rforge, I got the following error:
make -C proxy 'CC=gcc -std=gnu99' 'CPPFLAGS=-I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread' CFLAGS='-g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread' 'LIBS=-ldl -lcrypt ' && cp -p proxy/forward .
make[1]: Entering directory '/tmp/RtmpCM1E4i/R.INSTALL1e48ccaa14/Rserve/src/proxy'
ln -sfn ../ulog.h ulog.h
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o forward.o forward.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o http.o http.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o http_tools.o http_tools.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o server.o server.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o tls.o tls.c
ln -sfn ../md5.h md5.h
ln -sfn ../sha1.h sha1.h
ln -sfn ../base64.c base64.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o websockets.o websockets.c
ln -sfn ../md5.c md5.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o md5.o md5.c
ln -sfn ../sha1.c sha1.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o sha1.o sha1.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o base64.o base64.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o date.o date.c
ln -sfn ../ulog.c ulog.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o ulog.o ulog.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o chandler.o chandler.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -I.. -DFORKED -DRSERVE_PKG -I. -Iinclude -pthread -c -o rscript.o rscript.c
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-udh3fS/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -o forward forward.o http.o http_tools.o server.o tls.o websockets.o md5.o sha1.o base64.o date.o ulog.o chandler.o rscript.o -ldl -lcrypt -lssl
/usr/bin/ld: cannot find -lssl
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:8: forward] Error 1
make[1]: Leaving directory '/tmp/RtmpCM1E4i/R.INSTALL1e48ccaa14/Rserve/src/proxy'
make: *** [Makevars:6: all] Error 2
ERROR: compilation failed for package ‘Rserve’
* removing ‘/usr/local/lib/R/site-library/Rserve’
The downloaded source packages are in
‘/tmp/Rtmpxix7zV/downloaded_packages’
I am running this inside the rocker/r-base:latest docker container.
In your last case, it seems that just libssl is missing. Probably not related to current thread.
Excuse me, but I have this problem on the 1.8.6
Ошибка: длинные вектора еще не поддерживаются: qap_encode.c:36
Fatal error: unable to initialize the JIT
Which additional information should I send for debug analysis for you?
P.S. Sorry about my English :)
Please make sure you have the latest version, this should have been fixed in 484f5fe
I have what appears to be the latest version, 3.5.2, on macOS 10.13.6 and this is still occurring:
Rserv started in daemon mode.
Error: long vectors not supported yet: qap_encode.c:36
Fatal error: unable to initialize the JIT
> version
_
platform x86_64-apple-darwin15.6.0
arch x86_64
os darwin15.6.0
system x86_64, darwin15.6.0
status
major 3
minor 5.2
year 2018
month 12
day 20
svn rev 75870
language R
version.string R version 3.5.2 (2018-12-20)
nickname Eggshell Igloo
>
@pgrech2 you may be pulling an older release of Rserve if you're installing from CRAN (
install.packages('Rserve')
).I ran into this issue earlier and needed to install via RForge:
install.packages('Rserve',,"http://rforge.net/",type="source")
The above worked for me
Greetings,
I tried rserve version 1.7.1 installed via sudo apt install cran-r-rserve and 1.8.6 installed within R via install.packages('Rserve',,"http://rforge.net/",type="source") but I am still getting the same error:
Error: long vectors not supported yet: qap_encode.c:36 Fatal error: unable to initialize the JIT
sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Linux Mint 19.1
Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=pt_PT.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=pt_PT.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=pt_PT.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1] compiler_3.6.0 tools_3.6.0
Your sessionInfo()
doesn't show Rserve - make sure you have the correct version, the error suggests you don't. Check you library paths fro older version. You'll need at least 1.8-6. You can also check with R CMD Rserve --version
Thank you for your advice!
packageVersion('Rserve') [1] ‘1.8.6’
R CMD Rserve --version Rserve v1.7-3 ()
sudo netstat -lanp | grep 'Rserve' tcp 0 0 127.0.0.1:6311 0.0.0.0:* LISTEN 6135/Rserve
kill PID kill -9 6135
Then I launch Rserve from R
Rserve()
And everything goes well
However I don't find a way to remove the 1.7-3 version, even with R CMD REMOVE Rserve I can only target the 1.8.6 version never the 1.7-3
Thank you!
You likely installed the old version as sudo
at some point, but not the new one. Check out this path:
file.path(R.home(),"bin","Rserve")
and remove it. You can also run in R:
Rserve::Rserve()
which will show you the full command to run for the currently installed version.
Any plans to get this fix in the 1.7 releases on CRAN? No worries if not, just curious.
Thank you.
In case you absolutely need it, I released a fork of 1.7 with just the LENGTH/XLENGTH patch. There: https://github.com/yannrichet/Rserve-1.7 , with sources and binaries. Tested for R 3.5 & 3.6.
Le mar. 27 août 2019 à 11:15, Siddhartha Bagaria notifications@github.com a écrit :
Any plans to get this fix in the 1.7 releases on CRAN? No worries if not, just curious.
Thank you.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/s-u/Rserve/issues/102?email_source=notifications&email_token=AAOBS3SU7XR6I5IV23BGXJDQGTWERA5CNFSM4E4S3N6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HCQUY#issuecomment-525215827, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOBS3U35QLDEPZGTJVWJWLQGTWERANCNFSM4E4S3N6A .
Thanks! It will be nice to get these changes on CRAN so macOS users can get a prebuilt package.
It took me some time to figure out the right configuration options on my macOS to make it find libssl. Ultimately, I ended up disabling the proxy feature to not need libssl.
Thanks guys... I had the same problem and Rserve 1.7.5 fixed it for me R 3.6.1.
Appreciate the help!
@pgrech2 you may be pulling an older release of Rserve if you're installing from CRAN (
install.packages('Rserve')
).I ran into this issue earlier and needed to install via RForge:
install.packages('Rserve',,"http://rforge.net/",type="source")
Just FYI this is what worked for me. Thank you.
I just installed R 3.5.0 on two Macs (High Sierra, El Capitan) and tried to install the latest Rserve version:
It compiled succesfully and the server starts. At runtime however I get the following error when I try to connect the client to the Server. The client connection can't be established.
https://github.com/s-u/Rserve/blob/master/src/qap_encode.c#L36
I think this has something to do with the long indexing in R?
Here the install command (I use Rserve in cooperative mode locally):
sudo PKG_CPPFLAGS=-DCOOPERATIVE R CMD INSTALL Rserve_1.8-5.tar.gz
Here the current session Info for completeness (but the error also occurs on a High Sierra laptop!):
R version 3.5.0 (2018-04-23) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: OS X El Capitan 10.11
Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale: [1] C
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1] compiler_3.5.0