Running Root on Windows

Hi,

I’m trying to get the latest and greatest (well, of version 5 anyway) setup and run on Windows.

[ul]
[li]You no longer produce the Cygwin tarballs (Ugh!)[/li]
[li] For the versions you do have Cygwin tarballs, I can’t get PyRoot to work (it used to work beautifully)[/li]
[li] Getting this working with Windows VC++ means
[list][]finding the “free” version of VC++ and [/li][li]getting the environment variables all setup (not at all trivial if you’re trying to run this from a Cygwin bash prompt. [/li][li]And even then, it will never work on an X terminal)[/li]
[li]Not to mention that the 5.34 version I downloaded didn’t seem to have PyRoot at all and the 5.32 version works with Windows Python 2.6, but not Windows Python 2.7[/li][/ul][/
:m][/list:u]

I’ve got old versions running on old laptops? Do I really need to just copy them over to get a working version of Root setup?

Is there instructions somewhere about how to get a linux VM where:

[ul]
[li]Easily download VM and player[/li]
[li]I can ssh into the VM[/li]
[li]install root easily[/li]
[li]run PyRoot[/li][/ul]

Given that a very large percentage of people still have Windows laptops (and desktops), I would have hoped this would have gotten in better in the last few years (instead of demonstrably worse).

Charles

Hi Charles,

[quote=“cplager”]You no longer produce the Cygwin tarballs (Ugh!)[/quote]You mean the cygwin/gcc I suppose? Well, it is probably more easy to build from source, then you are sure to have the right version of the binaries…

[quote=“cplager”]For the versions you do have Cygwin tarballs, I can’t get PyRoot to work (it used to work beautifully)[/quote]Could you give more details, please, so I can get a chance to try…

[quote=“cplager”]getting the environment variables all setup (not at all trivial if you’re trying to run this from a Cygwin bash prompt.[/quote]you mean adding one line in cygwin.bat, right?

[quote=“cplager”]And even then, it will never work on an X terminal)[/quote]You know you can still use cygwin/gcc and build there from source (even ROOT 6), don’t you?[quote=“cplager”]Not to mention that the 5.34 version I downloaded didn’t seem to have PyRoot at all and the 5.32 version works with Windows Python 2.6, but not Windows Python 2.7[/quote]I already asked you (in the Python section of this forum) to tell which version (e.g. 5.34.14 / VC11 has for sure been compiled with Python2.7)

And FYI, I’m still developing on Windows…

Cheers, Bertrand.

[quote=“bellenot”]Hi Charles,

[quote=“cplager”]You no longer produce the Cygwin tarballs (Ugh!)[/quote]You mean the cygwin/gcc I suppose? Well, it is probably more easy to build from source, then you are sure to have the right version of the binaries…
[/quote]

Unfortunately, the last time I tried this, I couldn’t get PyRoot to work either (a year and a half ago).

[quote=“bellenot”][quote=“cplager”]For the versions you do have Cygwin tarballs, I can’t get PyRoot to work (it used to work beautifully)[/quote]Could you give more details, please, so I can get a chance to try…
[/quote]

Will do. It’s on my laptop at home

[quote=“bellenot”][quote=“cplager”]getting the environment variables all setup (not at all trivial if you’re trying to run this from a Cygwin bash prompt.[/quote]you mean adding one line in cygwin.bat, right?
[/quote]

Ummm… If you know what the one line is. Usually not at all trivial for setting up Microsoft compilers (you have to set multiple environment variables and you need them set in BASH). If you do know what the lines to use are, then posting them somewhere would be useful for a lot of people.

Again, as this failed last time, I wasn’t too anxious to try it again.

[quote=“bellenot”][quote=“cplager”]Not to mention that the 5.34 version I downloaded didn’t seem to have PyRoot at all and the 5.32 version works with Windows Python 2.6, but not Windows Python 2.7[/quote]I already asked you (in the Python section of this forum) to tell which version (e.g. 5.34.14 / VC11 has for sure been compiled with Python2.7)

And FYI, I’m still developing on Windows…[/quote]

I don’t doubt it. I’m not saying it can’t be done. Are you’re doing it from the DOS command line (eww! gross! or Cygwin But getting it setup isn’t easy (where as in the the good old days, one could just grab the Cygwin tarball and away you go).

Without really a list of how to get this done, it just doesn’t look practical for somebody looking to get things setup quickly (how to setup environment variables, etc). I was hoping to get PyRoot setup and 5.34 didn’t setup any PyRoot, 5.32 set it up for 2.6 and not 2.7.

Given the current state, if a good linux VM and player were available, I’d probably punt altogether (do they?)

[quote=“cplager”]Ummm… If you know what the one line is. Usually not at all trivial for setting up Microsoft compilers (you have to set multiple environment variables and you need them set in BASH). If you do know what the lines to use are, then posting them somewhere would be useful for a lot of people.[/quote]Sure, but as it depends on the version of Visual Studio, here is an example with Visual Studio 10 on Windows 7 64 bit:

call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"To be added at the beginning of Cygwin.bat (after @echo off)

[quote=“cplager”](where as in the the good old days, one could just grab the Cygwin tarball and away you go).
[/quote]Well, yes, but with which options? And should I install a complete set of libraries (oracle, mysql, what not, and which versions of those)? Maintaining a whole system is quite a load and it is hard to justify…
But if you want I could generate one for you with PyRoot only…(I only check from time to time that ROOT still compile on cygwin/gcc, without installing everything)

[quote=“cplager”]Without really a list of how to get this done, it just doesn’t look practical for somebody looking to get things setup quickly (how to setup environment variables, etc). I was hoping to get PyRoot setup and 5.34 didn’t setup any PyRoot, 5.32 set it up for 2.6 and not 2.7.[/quote]If pyRoot is missing, it should be only because you took the debug build of ROOT. But this is a Windows issue, since we cannot mix debug and release runtime libraries, the debug build of ROOT should be linked against the debug version of Python, and I don’t want to build Python from source…
Anyway, starting from ROOT v5.34.16, I will build the debug versions of ROOT with the release version of the runtime libraries, so we can bypass this issue.

[quote=“cplager”]Given the current state, if a good linux VM and player were available, I’d probably punt altogether (do they?)[/quote]Well, that’s very easy nowadays, there are a couple of player out there (which one is only matter of taste), and you can even create your own image starting from an ISO image of your preferred Linux distro…

Just let me know if I can help…

Cheers, Bertrand.

[quote=“bellenot”]Sure, but as it depends on the version of Visual Studio, here is an example with Visual Studio 10 on Windows 7 64 bit:

call "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"To be added at the beginning of Cygwin.bat (after @echo off)
[/quote]

This only works if you start bash with a .bat file (which is never how I do it - particularly because I have tabbed Xterms and when I create a new tab, it just runs a new copy of bash). To get the needed variables, I have to start bash, print the environment, from bash call ‘cmd’, run the batch script, call bash, print the environment again, and look for the differences.

[quote=“bellenot”]But if you want I could generate one for you with PyRoot only…(I only check from time to time that ROOT still compile on cygwin/gcc, without installing everything)
[/quote]

That would be absolutely lovely. Just let me know which version of Cygwin you use.

[quote=“bellenot”][quote=“cplager”]Without really a list of how to get this done, it just doesn’t look practical for somebody looking to get things setup quickly (how to setup environment variables, etc). I was hoping to get PyRoot setup and 5.34 didn’t setup any PyRoot, 5.32 set it up for 2.6 and not 2.7.[/quote]If pyRoot is missing, it should be only because you took the debug build of ROOT. But this is a Windows issue, since we cannot mix debug and release runtime libraries, the debug build of ROOT should be linked against the debug version of Python, and I don’t want to build Python from source…
Anyway, starting from ROOT v5.34.16, I will build the debug versions of ROOT with the release version of the runtime libraries, so we can bypass this issue.[/quote][/quote]

I believe I grabbed release, not debug. Is it possible that using the MSI, it just chose not to install PyRoot?

[quote=“bellenot”][quote=“cplager”]Given the current state, if a good linux VM and player were available, I’d probably punt altogether (do they?)[/quote]Well, that’s very easy nowadays, there are a couple of player out there (which one is only matter of taste), and you can even create your own image starting from an ISO image of your preferred Linux distro…

Just let me know if I can help…[/quote]

I’m looking for simple. I know nothing about which players to use, which VMs to grab. I personally think it would be great if one of the Root installations offered was a linux VM with Root/PyRoot already setup.

The only “complication” is that I want to be able to ‘ssh’ into the VM as I would to any linux box. If there are instructions on how to accomplish any of this, I’ll take a crack at it.

Cheers,
Charles

[quote=“cplager”]That would be absolutely lovely. Just let me know which version of Cygwin you use.[/quote]OK, I’ll make one tomorrow and I’ll let you know once available (it will be done with the latest version of cygwin & gcc)

[quote=“cplager”]I believe I grabbed release, not debug. Is it possible that using the MSI, it just chose not to install PyRoot?[/quote]No, if it is missing, this is a bug and should be fixed.

[quote=“cplager”]The only “complication” is that I want to be able to ‘ssh’ into the VM as I would to any linux box. If there are instructions on how to accomplish any of this, I’ll take a crack at it.[/quote]I don’t get it… ssh from where? if the VM is on your machine, you don’t need to ssh, you simply use it as a normal Linux session… and accessing it from anywhere should be possible too… (but I don’t have any experience with that)

Cheers, Bertrand.

Not a lot of useful starting documentation. How do I get started? How do I get a VM player? Which one? Is Root installed? Python? Can I run it on a 32 bit machine?

[quote=“bellenot”][quote=“cplager”]The only “complication” is that I want to be able to ‘ssh’ into the VM as I would to any linux box. If there are instructions on how to accomplish any of this, I’ll take a crack at it.[/quote]I don’t get it… ssh from where? if the VM is on your machine, you don’t need to ssh, you simply use it as a normal Linux session… and accessing it from anywhere should be possible too… (but I don’t have any experience with that)

Cheers, Bertrand.[/quote]

I want to be able to use my editor, my terminal window, my tools. So I don’t want to run inside a tiny window, but rather SSH from my windows box into the linux VM. In other words, I want it to act as if the VM is some linux machine somewhere that I access like any other linux machine.

[quote=“cplager”]Not a lot of useful starting documentation. How do I get started? How do I get a VM player? Which one? Is Root installed? Python? Can I run it on a 32 bit machine?[/quote]You should ask the CernVM people directly, not me…

[quote=“cplager”]I want to be able to use my editor, my terminal window, my tools. So I don’t want to run inside a tiny window, but rather SSH from my windows box into the linux VM. In other words, I want it to act as if the VM is some linux machine somewhere that I access like any other linux machine.[/quote]As you whish, but I use virtual machines every day, in full screen, with all my preferred tools & editor… Up to you

Cheers, Bertrand.

[quote=“bellenot”]]As you whish, but I use virtual machines every day, in full screen, with all my preferred tools & editor… Up to you
[/quote]

That means that you can’t copy and paste (easily or consistently) across from your VM editor to your Windows editor. It means that you can’t see an excel spreadsheet open next to output you have. It means, well, it means that you can’t work the way people usually work on their laptop.

[quote=“cplager”]That means that you can’t copy and paste (easily or consistently) across from your VM editor to your Windows editor. It means that you can’t see an excel spreadsheet open next to output you have. It means, well, it means that you can’t work the way people usually work on their laptop.[/quote]As previously said, up to you…

Cheers, Bertrand.

Here’s what I get when I try to run 5.28 Cygwin PyRoot

[code]cplager@Flipper> python
Python 2.7.3 (default, Dec 18 2012, 13:50:09)
[GCC 4.5.3] on cygwin
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/bin/root/lib/ROOT.py”, line 85, in
import libPyROOT as _root
ImportError: No such file or directory
[/code]

where

cplager@Flipper> printenv | grep -e PYTHON -e ROOT ROOTSYS=/usr/local/bin/root PYTHONPATH=/usr/local/bin/root/lib:C:\root\\bin

I tried installing a VM following these instructions http://cernvm.cern.ch/portal/vbinstallation and downloading the basic 2.7 and 2.7 VMs and failed (see error on attachment).

[quote=“cplager”]PYTHONPATH=/usr/local/bin/root/lib:C:\root\bin[/quote]It looks to me there are two different installations of ROOT (one in cygwin and one on Windows) and if you mix both it’s not going to work… So please make sure to use either cygwin binaries OR Windows binaries (for ROOT AND Python…) otherwise we’re not going to solve anything… [-X
And about CernVM, I have no idea, I don’t use it

Cheers, Bertrand.

A tar file built with the v5-34-00-patches branch of this morning is available there:
bellenot.web.cern.ch/bellenot/Pu … 4.8.tar.gz

Built on:
CYGWIN_NT-6.1-WOW64 BBWIN7X64VC10 1.7.28(0.271/5/3) 2014-02-09 21:06 i686 Cygwin

With:
gcc (GCC) 4.8.2

Cheers, Bertrand.

[quote=“bellenot”][quote=“cplager”]PYTHONPATH=/usr/local/bin/root/lib:C:\root\bin[/quote]It looks to me there are two different installations of ROOT (one in cygwin and one on Windows) and if you mix both it’s not going to work… So please make sure to use either cygwin binaries OR Windows binaries (for ROOT AND Python…) otherwise we’re not going to solve anything… [-X

Cheers, Bertrand.[/quote]

I ran the test in another window and picked up the extra environment, but I get the same result when I just have the Cygwin stuff in path.

[quote=“bellenot”]A tar file built with the v5-34-00-patches branch of this morning is available there:
bellenot.web.cern.ch/bellenot/Pu … 4.8.tar.gz

Built on:
CYGWIN_NT-6.1-WOW64 BBWIN7X64VC10 1.7.28(0.271/5/3) 2014-02-09 21:06 i686 Cygwin

With:
gcc (GCC) 4.8.2

Cheers, Bertrand.[/quote]

I’ll try this tonight and report back. (My version of Cygwin is a bit older, so if it doesn’t work as is, I’ll try grabbing a newer Cygwin installation as well, but that will take a bit more time.)

Thanks!

No go with my older version of Cygwin. Root seems to be fine. Python finds and loads PyRoot. But when I try to make a new TCanvas, it freezes:

[code]Python 2.7.3 (default, Dec 18 2012, 13:50:09)
[GCC 4.5.3] on cygwin
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
canvas = ROOT.TCanvas()
[/code]

When I get a chance, I’ll grab the latest and greatest version of Cygwin and try again.

Hi,

there’s a long history of trouble with the GUI thread on Windows. An alternative is to use the input hook, like so: import ROOT ROOT.PyConfig.StartGuiThread = 'inputhook'
(I never changed the default as I no longer have access to a Windows box, so I’ve never verified that this is an improvement. It is the default for MacOS-X cocoa.)

Cheers,
Wim

[quote=“wlav”]Hi,

there’s a long history of trouble with the GUI thread on Windows. An alternative is to use the input hook, like so: import ROOT ROOT.PyConfig.StartGuiThread = 'inputhook'
(I never changed the default as I no longer have access to a Windows box, so I’ve never verified that this is an improvement. It is the default for MacOS-X cocoa.)

Cheers,
Wim[/quote]

That didn’t have any effect, unfortunately on the already existing Cygwin installation. I’m installing a new version of Cygwin, but having issues there as well. More later…

No go.

I’ve installed the latest Cygwin, X, and Python. I still can’t get a TCanvas to pop up:

[code]cplager@Flipper> uname -a
CYGWIN_NT-6.1 Flipper 1.7.28(0.271/5/3) 2014-02-09 21:06 i686 Cygwin
cplager@Flipper> python
Python 2.7.3 (default, Dec 18 2012, 13:50:09)
[GCC 4.5.3] on cygwin
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
ROOT.PyConfig.StartGuiThread = ‘inputhook’
canvas = ROOT.TCanvas()
[/code]

When I do this, nothing further is printed and Python is pegged to maximum CPU usage. This is true whether or not I’ve turned on batch mode or not.

Hi,

any chance of attaching a debugger and getting a stack trace?

Thanks,
Wim