Closed coneill-math closed 7 years ago
@dkahle can you still look into this? I am not familiar with how M2 works on Windows.
Do we still want to do this for the first release? If it's too much work, I have no problem pushing it to a future version (unless, of course, CRAN won't accept it without complete cross-platform-ness).
This is now very close, but I can't get M2 to run from DOS through Cygwin. Installing Cygwin and M2 through the instructions on their website is easy, and opening Cygwin and running M2 is just as easy. The problem I'm having is starting the M2 process from DOS.
cmd.exe /K C:/cygwin/bin/env.exe C:/cygwin/bin/M2.exe
I get the error that it can't find lapack DLL, which is actually in C:/cygwin/lib
. Thoughts?
Is there a command line parameter to env.exe to specify library locations?
Also, how do you run M2 in Cygwin successfully?
Hm, good question about env.exe. I'll check.
When you run Cygwin (even from DOS), it essentially opens a bash shell. From there, just open M2 with M2
and carry on.
That's what I thought. My guess is env.exe does some initialization when run from the command prompt, which is being bypassed when running a command directly.
At worst, we could handle the process a bit differently on Windows, essentially piping in the M2 code to STDIN for the command prompt. Avoiding this would be nice, but at least it would still work as expected, since once the M2 server is running everything functions normally.
So I've got it running, but it crashes on startup. I think it'll just take tinkering. Do you have a Windows machine available?
I have a Windows machine I can test on.
Ok, pull down and test on Windows. I've documented some comments in do_start_m2()
. My recommendation is to create a new RStudio project on your Windows machine checking out the repo here, pull that down, load it, then try to run that function...
Gosh, I'm struggling just to get M2 to run on a Windows machine
Just follow the directions explicitly. Use the 32-bit version, you should be fine. We can Skype later if need be. (Unfortunately, if you're struggling... that doesn't bode well for the average user.)
It's probably my fault. I've never used cygwin before.
Robert and I have tried several things with m2r on Windows. We have confirmed the following.
openInOut
function works as expected in Cygwin. socket()
function. One possible (though clearly cheating) workaround: launch a telnet session to act as a "middle man" of sorts. I really dislike this solution, but we do what we have to, I guess.
Cygwin version is too difficult to support.
Windows support will be possible with the server, issue #107.
Code to update: Locating M2 path Launching M2 just before socket creation