Web lists-archives.com

libuv uv__io_poll or uv__poll_io R tolerance, giving me uv polio, help?




Can someone please help with getting libuv to compile, as part of:

$ R CMD /usr/lib/R/bin/INSTALL -l /usr/lib/R/site-library  httpuv_1.3.3[mod].tar.gz

I think I may have stumbled across a bug in the libuv core.c and/or internal.h
source, but I'm not sure. From a search of the maillist, I know libuv may not
be fully compatible, but why not try...

https://cygwin.com/ml/cygwin/2015-12/msg00023.html
https://sourceware.org/ml/cygwin/2016-08/msg00322.html

Goal: Install and run R tolerance package on cygwin (or windos).

Roadblocks: 
Corporate approved windos R, version 3.1.1 (2014-07-10) -- "Sock it to Me":
   Will not install tolerance package, Error: This is R 3.1.1, package ‘tolerance’ needs >= 3.2.0
Newer downloaded windos R, version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
   Cannot access internet within R (proxy issues as always), so it requires
   downloading and individually installing and loading about 2 dozen other 
   prerequisite packages supporting tolerance. This may be the fall-back.

More details:

In Cygwin, CYGWIN_NT-6.1   2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64 Cygwin

$ R --version
R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"

So, like a good (or bad) cygwin soldier, I've downloaded and done the install
as in the R CMD command above, for the following packages:

config/
crayon/
digest/
evaluate/
highr/
htmltools/
htmlwidgets/
jsonlite/
knitr/
magrittr/
markdown/
mime/
praise/
R6/
Rcpp/
sourcetools/
stringi/
stringr/
testthat/
xtable/
yaml/

However, this still leaves tolerance, which needs rgl, which needs shiny, 
which needs hpuv, and this is where I am stuck.

$ R CMD /usr/lib/R/bin/INSTALL -l /usr/lib/R/site-library  tolerance_1.3.0.tar.gz 
ERROR: dependency ‘rgl’ is not available for package ‘tolerance’

$ R CMD /usr/lib/R/bin/INSTALL -l /usr/lib/R/site-library rgl_0.98.1.tar.gz 
ERROR: dependency ‘shiny’ is not available for package ‘rgl’

$ R CMD /usr/lib/R/bin/INSTALL -l /usr/lib/R/site-library  shiny_1.0.3.tar.gz 
ERROR: dependency ‘httpuv’ is not available for package ‘shiny’


So.....

$ R CMD /usr/lib/R/bin/INSTALL -l /usr/lib/R/site-library  httpuv_1.3.3
<big huge snip>
gcc -D_GNU_SOURCE -I/tmp/Rtmp5WsS2T/R.INSTALL2214f28b836/httpuv/src/libuv/include -
I/tmp/Rtmp5WsS2T/R.INSTALL2214f28b836/httpuv/src/libuv/include/uv-private -
I/tmp/Rtmp5WsS2T/R.INSTALL2214f28b836/httpuv/src/libuv/src -D_LARGEFILE_SOURCE -
D_FILE_OFFSET_BITS=64 -ggdb -O2 -pipe -Wimplicit-function-declaration -std=gnu99 -fdebug-
prefix-map=/cygdrive/e/cyg_pub/devel/R/R-3.4.0-1.x86_64/build=/usr/src/debug/R-3.4.0-1 -
fdebug-prefix-map=/cygdrive/e/cyg_pub/devel/R/R-3.4.0-1.x86_64/src/R-3.4.0=/usr/src/debug/R-
3.4.0-1   -c src/unix/core.c -o src/unix/core.o
src/unix/core.c: In function ‘uv_run’:
src/unix/core.c:317:5: warning: implicit declaration of function ‘uv__poll_io’ [-Wimplicit-

function-declaration]
     uv__poll_io(loop, timeout);
     ^


Looking at the source, it seems there may be confusion on ordering of poll and io,
or I don't understand the need for both uv__poll_io and uv__io_poll, but something 
is wrong, and both are currently used:


$ grep -i uv__poll_io *
poll.c:static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
poll.c:  uv__io_init(&handle->io_watcher, uv__poll_io, fd);

$ grep -i uv__io_poll *
core.c:    uv__io_poll(loop, timeout);
internal.h:void uv__io_poll(uv_loop_t* loop, int timeout); /* in milliseconds or -1 */
kqueue.c:void uv__io_poll(uv_loop_t* loop, int timeout) {
linux-core.c:void uv__io_poll(uv_loop_t* loop, int timeout) {
sunos.c:void uv__io_poll(uv_loop_t* loop, int timeout) {


So, I've tried 2 changes, changing uv__io_poll to uv__poll_io, but neither has fixed it:


$ diff core.c /tmp/2nd/httpuv/src/libuv/src/unix/core.c
317c317
<     uv__io_poll(loop, timeout);
---
>     uv__poll_io(loop, timeout);


$ diff core.c /tmp/3rd/httpuv/src/libuv/src/unix/core.c
317c317
<     uv__io_poll(loop, timeout);
---
>     uv__poll_io(loop, timeout);


$ diff internal.h /tmp/3rd/httpuv/src/libuv/src/unix/internal.h 
127c127
< void uv__io_poll(uv_loop_t* loop, int timeout); /* in milliseconds or -1 */
---
> void uv__poll_io(uv_loop_t* loop, int timeout); /* in milliseconds or -1 */



and the latest error is as follows:


$ R CMD /usr/lib/R/bin/INSTALL -l /usr/lib/R/site-library  httpuv_1.3.3y.tar.gz

gcc -D_GNU_SOURCE -I/tmp/RtmpQa0A69/R.INSTALL2b94587184b0/httpuv/src/libuv/include -I/tmp/RtmpQa0A69/R.INSTALL2b94587184b0/httpuv/src/libuv/include/uv-private -I/tmp/RtmpQa0A69/R.INSTALL2b94587184b0/httpuv/src/libuv/src -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -ggdb -O2 -pipe -Wimplicit-function-declaration -std=gnu99 -fdebug-prefix-map=/cygdrive/e/cyg_pub/devel/R/R-3.4.0-1.x86_64/build=/usr/src/debug/R-3.4.0-1 -fdebug-prefix-map=/cygdrive/e/cyg_pub/devel/R/R-3.4.0-1.x86_64/src/R-3.4.0=/usr/src/debug/R-3.4.0-1   -c src/unix/poll.c -o src/unix/poll.o
src/unix/poll.c:30:13: error: conflicting types for ‘uv__poll_io’
 static void uv__poll_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
             ^
In file included from src/unix/poll.c:23:0:
src/unix/internal.h:127:6: note: previous declaration of ‘uv__poll_io’ was here
 void uv__poll_io(uv_loop_t* loop, int timeout); /* in milliseconds or -1 */
      ^
make[1]: *** [/tmp/RtmpQa0A69/R.INSTALL2b94587184b0/httpuv/src/libuv/config-unix.mk:189: src/unix/poll.o] Error 1
make[1]: Leaving directory '/tmp/RtmpQa0A69/R.INSTALL2b94587184b0/httpuv/src/libuv'
make: *** [Makevars:27: libuv.a] Error 2
ERROR: compilation failed for package ‘httpuv’
* removing ‘/usr/lib/R/site-library/httpuv’


Is the fix obvious to someone? 

Thanks!



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple