So, I have had much success in building and installing ROOT with Reflex support. This only works for version 5.34, as later versions have changed things up a bit. So, if your goal is to compile ROOT with Reflex support in a cygwin environment, follow this guide:
[1] Install cygwin and select at the bare minimum the following packages:
Web::wget
Devel::subversion
[2] Install apt-cyg, a command-line based cygwin package manager:
mkdir ~/apt-install
cd ~/apt-install
svn co apt-cyg.googlecode.com/svn/trunk
cd trunk
chmod +x apt-cyg
[3] Apply a patch to fix apt-cyg for the new cygwin repository format:
Download patch file from the 3rd comment on this page: (Use a browser, I can’t figure out how to get a direct link)
code.google.com/p/apt-cyg/issues/detail?id=26
Then execute the patch (place johns_patch2.diff into the same directory)
svn patch johns_patch2.diff
[4] Move apt-cyg to the user local bin directory, perform some cleanup:
mv apt-cyg /usr/local/bin/
cd ~
rm -rf apt-install
[5] Install git, make, and a couple of other required tools:
apt-cyg update
apt-cyg install git
apt-cyg install make
apt-cyg install gcc
apt-cyg install libfreetype-devel
apt-cyg install gcc-fortran
apt-cyg install python
apt-cyg install cmake
[6] Install GccXML (Added this step on August 26th, 2013)
git clone git://github.com/gccxml/gccxml.git
cd gccxml
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/gccxml
make
make install
cd …
rm -rf gccxml
echo “export PATH=/usr/local/gccxml/bin:$PATH” >> ~/.bash_profile
source ~/.bash_profile
[7] Clone the ROOT Git repository (Around 660 Megabytes, so this can time some time).
mkdir ~/root
cd ~/root
git clone root.cern.ch/git/root.git root-v5-34
[8] Checkout version 5.34
cd root-v5-34
git fetch origin
git checkout -b v5-34-09 origin/v5-34-00-patches
[9] Build (Note, in this version of ROOT, Reflex is not enabled by default)
./configure win32gcc --prefix=/usr/local/reflex.gcc --minimal --enable-reflex
make
make install
[10] Add the bin directory to your path:
echo “export PATH=/usr/local/reflex/bin:$PATH” >> ~/.bash_profile
source ~/.bash_profile
[11] Fix reference to “genreflex” python script from “genreflex” shell script
The script located in /usr/local/reflex/bin/ is incorrectly referencing the python script located in /usr/local/reflex/lib/root/python/genreflex
sed -i “s;lib/python;lib/root/python;” /usr/local/reflex/bin/genreflex
[12] Fix the core dumped error that occurs after running the script:
This is a cygwin specific bug, I don’t know why this resolves this other than a poor/erroneous implementation of something in this Python package. Regardless, a way of getting rid of this error is to change the order in which the subprcess package is imported by the python script:
First, get rid of the subprocess reference:
sed -i “s/,\ subprocess//” /usr/local/reflex/lib/root/python/genreflex/genreflex.py
Second, add it back before the first import statement
sed -i “s/import\ /import\ subprocess,\ /” /usr/local/reflex/lib/root/python/genreflex/genreflex.py
Finished!
Finally… it now works on cygwin