Compiling of Sage on cygwin64 failed on package rpy2-2.7.5

88 views
Skip to first unread message

robert.ma...@web.de

unread,
Jan 13, 2016, 12:32:17 PM1/13/16
to sage-devel
Hello,
I've been using the Sage appliance in Virtualbox on Windows 7 for some time now. And I like it very much. Thank you for this wonderful package of software and its interface.

Because I need to access more RAM for calculating 3D parametric plots I want to install it under Cygwin64 and followed the procedures on http://trac.sagemath.org/wiki/Cygwin64Port.

Compilation went fine but rpy2-2.7.5 and scipy-0.16.1 threw installation errors. I tried to rebase and changed the spkg-install for both packages as it is suggested for python in the link above (comment out lines for patches), but the installation errors remain.

My System is Windows 7, 64 bit, 24 GB RAM. I attach the log file for rpy2-2.7.5. The error lines from the file are:

./rpy/rinterface/_rinterface.c: In function 'EmbeddedR_setinteractive':
./rpy/rinterface/_rinterface.c:1493:3: error: 'Rp' undeclared (first use in this function)
   Rp->R_Interactive = rtruefalse;

error: command 'gcc' failed with exit status 1

Any suggestions how to proceed?

Thanks a lot in advance
Robert
rpy2-2.7.5.log

Travis Scrimshaw

unread,
Jan 13, 2016, 7:51:23 PM1/13/16
to sage-devel
FYI, I get the same problem on Cygwin32.

Best,
Travis

Jean-Pierre Flori

unread,
Jan 14, 2016, 4:04:52 AM1/14/16
to sage-devel
I see
#if (defined(Win32) || defined(Win64))
/* R instance as a global */
Rstart Rp;
#endif
in src/rinterface/_rinterface.c.
That sounds fishy for Cygwin.

It looks like: http://trac.sagemath.org/ticket/16089
And that the cygwin patch was ill porte here: http://trac.sagemath.org/ticket/19638

Note sure why:
* the linking to readline was removed, maybe R does it properly now without handholding.
* this change in the patch is either not enough or too much:
-#if defined(Win32) || defined(Win64)
+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
   Rp->R_Interactive = rtruefalse;
 #else
   R_Interactive = rtruefalse;

Try to remove it first.
If that's not sufficient the numerous try instead to perform the same change for all #if around R_Interactive stuff.

Jean-Pierre Flori

unread,
Jan 14, 2016, 4:17:48 AM1/14/16
to sage-devel
Looking at the code of the previous version we shipped, I'd say the "remove the change" solution should be the right one.

Travis Scrimshaw

unread,
Jan 14, 2016, 8:42:43 AM1/14/16
to sage-devel
Hey Jean-Pierre,
That did now work for me. Here was the change I made:

Travis@apricot ~/sage/build/pkgs/rpy2/patches
$ git diff
diff
--git a/build/pkgs/rpy2/patches/cygwin.patch b/build/pkgs/rpy2/patches/cygwin.patch
index
90641d4..959c70e 100644
--- a/build/pkgs/rpy2/patches/cygwin.patch
+++ b/build/pkgs/rpy2/patches/cygwin.patch
@@ -58,15 +58,6 @@ diff -ru rpy2-2.7.4.orig/rpy/rinterface/_rinterface.c rpy2-2.7.4/rpy/rinterface/
 
void win32CallBack()
 
{
     
/* called during i/o, eval, graphics in ProcessEvents */
-@@ -1489,7 +1489,7 @@
-   } else {
-     rtruefalse = FALSE;
-   }
--#if defined(Win32) || defined(Win64)
-+#if defined(Win32) || defined(Win64) || defined(__CYGWIN__)
-   Rp->R_Interactive = rtruefalse;
- #else
-   R_Interactive = rtruefalse;
 
@@ -3749,7 +3749,7 @@
   
}

The log file is attached.

Best,
Travis

rpy2-2.7.5.log

Travis Scrimshaw

unread,
Jan 14, 2016, 8:43:32 AM1/14/16
to sage-devel

On Thursday, January 14, 2016 at 5:42:43 AM UTC-8, Travis Scrimshaw wrote:
That did now work for me. 

That did not work for me. 

Jean-Pierre Flori

unread,
Jan 14, 2016, 9:02:29 AM1/14/16
to sage-devel
You should (at least) put back the part to link to libreadline.
I don't remember if I pushed the fix upstream.
Don't think so.
It is not Cygwin specific as it is bad underlinking, so maybe they'll do something.

Otherwise they don't really like cygwin:
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15643
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15607

Travis Scrimshaw

unread,
Jan 14, 2016, 9:22:24 PM1/14/16
to sage-devel

You should (at least) put back the part to link to libreadline.
I don't remember if I pushed the fix upstream.
Don't think so.
It is not Cygwin specific as it is bad underlinking, so maybe they'll do something.

Otherwise they don't really like cygwin:
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15643
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15607

With that I was able to build on cygwin32. See http://trac.sagemath.org/ticket/19893. Now to upgrade scipy...

Thanks,
Travis


robert.ma...@web.de

unread,
Feb 2, 2016, 4:27:18 AM2/2/16
to sage-devel
Thank you for the quick answers, and sorry for my late reply. I don't have time jump into that for a while, but I'll give it a try as soon as possible.
Robert

Reply all
Reply to author
Forward
0 new messages