ROOT6 on Bash for Windows

So I thought I would give it a try. I downloaded the pre-build binary for Ubuntu and ran it on my windows machine. I ran it in batch mode and I didn’t get a crash. It doesn’t load iostream or shared libraries. But the fact that I was able to run the thisroot.sh and the system variables are there amazed me.

Installing from source doesn’t work, because there are several packages that aren’t installed in the bash for windows.

[quote]root@localhost:/mnt/c/Users/luis/Downloads/root_v6.04.16.Linux-ubuntu14-x86_64-gcc4.8/root# . bin/thisroot.sh
root@localhost:/mnt/c/Users/luis/Downloads/root_v6.04.16.Linux-ubuntu14-x86_64-gcc4.8/root# root
root: can’t figure out DISPLAY, set it manually
In case you run a remote ssh session, restart your ssh session with:
=========> ssh -Y
root@localhost:/mnt/c/Users/luis/Downloads/root_v6.04.16.Linux-ubuntu14-x86_64-gcc4.8/root# root -b
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
echo | LC_ALL=C c++ -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-missing-field-initializers -fPIC -fvisibility-inlines-hidden -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -O2 -DNDEBUG -xc++ -E -v - 2>&1 >/dev/null | awk ‘/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}’ | grep -E "(c|g)++"results in
with exit code 256
input_line_1:1:10: fatal error: ‘new’ file not found
#include
^
input_line_3:38:10: fatal error: ‘string’ file not found
#include
^

| Welcome to ROOT 6.04/16 root.cern.ch |
| © 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From tag v6-04-16, 17 March 2016 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

/usr/bin/ldd: line 119: printf: write error: Broken pipe
input_line_8:1:10: fatal error: ‘iostream’ file not found
#include
^
root [0]
[/quote]

Hi Luis,

thanks for trying this out.
It is indeed encouraging how far it gets just with a “drop-in” strategy like the one you adopted!
We are aware of the importance of the Windows community and we are working hard to make ROOT6 available on that platform.

Cheers,
Danilo

I just did
apt-get install root-system

which installs root 5.34/14
I am not able to get visual so I have to run root -b

I can load a root file I made on my windows machine a few weeks back.
I can run macros, that don’t have visual, but that does print a graph into a pdf like I had coded it to do.

After I installed root 5.34/14,… it installed all the dependencies I needed to now run root6-04-16…ie the drop in for the pre-build binary.

And auto x =1 works…hance c++11.

And unique_ptr works.

I am really pumped about this.

[quote=“luismorales”]I just did
apt-get install root-system

which installs root 5.34/14
I am not able to get visual so I have to run root -b

I can load a root file I made on my windows machine a few weeks back.
I can run macros, that don’t have visual, but that does print a graph into a pdf like I had coded it to do.

After I installed root 5.34/14,… it installed all the dependencies I needed to now run root6-04-16…ie the drop in for the pre-build binary.

And auto x =1 works…hance c++11.

And unique_ptr works.

I am really pumped about this.

I also just made a root binary that contained c++11 code using root 6 with no errors. Something you can’t do with root 5.

I just got the x11 to work on bash for windows on root 6. I added the line

export DISPLAY=:0.0

So that this variable is displayed. Therefore root 6 for Ubuntu pre-compiled drop in works for the simple things I am trying to do.


Hi,

This is great! Thanks for trying this out! :slight_smile:

Cheers, Bertrand.

You can use this to install dependency rather than apt-get the old 5.34

sudo apt-get install git dpkg-dev make g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev (stole from this post: Root 6.04 on Ubuntu 15.04)

In my experience from the first fast ring build that have this, it crashed occasionally. The new one 14332 seem to fair better.

This isn’t helpful for me though since I want to code and build native Win32 binary, so I’m still eagerly awaiting Win32 ROOT6. Hopefully sometime soon-ish? :smiley: