HELP: Need idiots guide to building root with cygwin

Hi,

Please HELP… I am trying to build root from source on windows using cygwin and gcc. I followed instructions on muenster.de/~naumana/win32gcc.html

as well as trying a number of different options that I found posted by random people.

In any case, I download the tar file and untar it. I set the ROOTSYS and PATH variables and configure runs fine and outputs message to type make to build. I am attaching my configure log. This last time I configured with all the options specified for win32gcc at

root.cern.ch/drupal/content/vers … igurations

I then run make -j2 and there’s a bunch of things happening for about half an hour and then no error message, but make just seems to hang… the last thing its doing is something to do with Genetics…is there a log file created somewhere for what make is doing?

can somebody please tell me how to even start figuring what is happening?

Thanks a million in advance.
config.txt (188 KB)

I just downloaded the source again and did everything from scratch… I still get no problems with configure, but now make fails saying:

/home/Jerry/gcc/objdir/i686-pc-cygwin/libgfortran/…/…/…/trunk/libgfortran/intrisnsics/random.c:670: undefined reference to '___chkstk_ms’
collect2: ld returned 1 exit status
/cygdrive/c/root/misc/minicern/Module.mk:48: recipe for target ‘lib/libminicern.dll’ failed
make: ***[lib/libminicern.dll] Error 1
make: ***Waiting for unfinished jobs…
==> lib/libReflex.dll done

anybody??

Hi,

Will look at this issue shortly (never had any problem so far…)

Cheers, Bertrand.

anything?

Hi,

No problem with latest cygwin and svn trunk (a couple of problems were fixed, but nothing to do with minicern)

Cheers, Bertrand.

could you tell me what I am doing wrong then? or even to start figuring out what’s going on?

Thanks in advance.

Well, I would need more info: which version of cygwin/gcc are you using?
In any case, you should probably use the latest version of gcc (c++ and fortran), or at least version 4.3, and the trunk version of ROOT. Note that if you update cygwin, you will have to be careful. As cygwin says: [quote]Updating from Cygwin 1.5.x to Cygwin 1.7.x may require additional manual changes. [/quote]And BTW, do you really need to use cygwin? Native builds are much faster, and we (officially) only support native builds…

Cheers, Bertrand.

Hi,

I just installed cygwin, so I have the newest versions. gcc version is 4.5.3

The problem is I need to add the library ExRootAnalysis for MadGraph. The Makefile for that is GNU so I cant use the VC binaries for root (which btw I have been using for years with no problems). I tried using the cygwin/gcc binaries, but I can’t get them to work properly. I have x11 installed for cygwin, but when i start root, I get all sorts of errors. I am guessing that is because the cygwin/gcc libraries are built using gcc version 4.3.

First if I just type root in the xterm, I get
root xpm error: XpmOpenFailed
/bin/root_exe.exe exists! check that /cygdrive/c/root

if I directly type root_exe.exe, I get the usual root splash screen, but with errors

cygcheck: could not find ‘/cygdrive/c/root/bin/root_exe.exe’

Error in TUnixSytem::DynamicPathName: libMathCore[.so: .dll : dylib : .sl:/cint/stl/c/root/lib:/cygdrive/c/root/lib
Error: cannot open file “iostream” (tmpfile):2:

etc

my root.sh file says:

export ROOTSYS=/cygdrive/c/root
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/cygdrive/c/root/lib

oh also

Erroor: cannot open file DllImport.h

I’ll try to post win32gcc binaries somewhere on the web, so you can try with the latest version (it will take some time, as I use a slow VM and cygwin is damn slow…)
I’ll keep you in touch.
– Bertrand.

THANK YOU that would be great, since all I really need is to get root working under cygwin/x11.

I will wait for you to let me know when you have the binaries available.

VC++ root is much faster. Cygwin/gcc root can be used in an X term (which is SO much nicer its not even funny), can use makefiles that are MUCH more similar to linux, etc. Not to mention that I was able to get the CMS event display to build with Cygwin/gcc root and no one has been able to do that with VC++ root.

I strongly believe the root team is making a big mistake with the (official) policy.

Cheers,
Charles

Hi,

The ROOT v5.33.03 binary is available there

Charles, what I mean is that we don’t provide binaries anymore (as it is mostly the same environment than Linux, building from source should be very easy).

Cheers, Bertrand.

Thanks for the tarball!

Except that it doesn’t build that easily any more (for me at least). Since it isn’t supported, there seem to be all sorts of gotchas. I haven’t been able to build a recent release in the past few months.

The windows/vc++ version of root is very nice and has its place, but it falls down in a lot of places where the Cygwin/gcc version works (not the least of which is that there doesn’t seem to be a terminal where you can run the VC++ version that isn’t severely limited, including “console2”).

With the tarball you have, I can’t get PyRoot to work.

[code]cplager@Plager-PC1} python
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)
[GCC 4.3.4 20090804 (release) 1] 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: Permission denied
[/code]

I looked and the libPyRoot.dll was 0 size.

----------  1 cplager Domain Users      0 Mar 21 07:53 libPyROOT.dll
lrwxrwxrwx  1 cplager Domain Users     13 Mar 21 06:03 libPyROOT.dll.a -> libPyROOT.dll
-rw-r--r--  1 cplager Domain Users    464 Mar 20 13:00 libPyROOT.rootmap

So I grabbed the dll from bin, and now I get a different error message:

cplager@Plager-PC1} cp bin/libPyROOT.dll lib/libPyROOT.dll
cplager@Plager-PC1} chmod 755 bin/libPyROOT.dll lib/libPyROOT.dll
cplager@Plager-PC1} python
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01) 
[GCC 4.3.4 20090804 (release) 1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/bin/root/lib/ROOT.py", line 85, in <module>
    import libPyROOT as _root
ImportError: No such file or directory

Any ideas?

Thanks,
Charles

Thanks!

Charles, you are having problems with the new binaries?

Cheers,

Nausheen

Hi Charles,

[quote=“cplager”]Except that it doesn’t build that easily any more (for me at least). Since it isn’t supported, there seem to be all sorts of gotchas. I haven’t been able to build a recent release in the past few months.[/quote]Well, then report the problems you have on the forum or on savannah. If nobody complains, we assume there is no problem (or no user :wink:)
And your actual problem comes from that you have to use the same version of python and same version of gcc than the one ROOT has been built with. So you have to use this version:

Python 2.6.7 (r267:88850, Feb 2 2012, 23:50:20) [GCC 4.5.3] on cygwin Or rebuild ROOT from source.

Cheers, Bertrand.

Bertrand,

You’re absolutely right on the first point. :slight_smile:

I’ll try building my own (again) to see what happens and report back.

Cheers,
Charles

root is still not found and I am still getting the same errors on startup… can it be reading the old libraries somehow?

e[32mNausheen@Nausheen-Laptop e[33m~e[0m
$ root -b
root: can't start ROOT -- check that /cygdrive/c/root
/bin/root_exe.exe exists!
e]0;~a
e[32mNausheen@Nausheen-Laptop e[33m~e[0m
$ root_exe.exe -b

  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.33/03      6 March 2012   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.33/03 (trunk@43245, Mar 20 2012, 09:38:00 on win32gcc)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
cygcheck: could not find '/cygdrive/c/root/bin/root_exe.exe'


Error in <TUnixSystem::DynamicPathName>: libMathCore[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /cygdrive/c/root/lib:/usr/local/gfortran/lib:/cygdrive/c/root/lib:.:/cygdrive/c/root/lib:/cygdrive/c/root/cint/cint/stl
Error: cannot open file "iostream"  (tmpfile):2:
*** Interpreter error recovered ***
Note: macro handled as typedef double _FLOAT_RET; /usr/include/sys/config.h:82:
Note: macro handled as typedef long _POINTER_INT; /usr/include/sys/config.h:194:
Error: Missing one of '
\/' expected at or after line 34.
Error: Unexpected end of file (G__fgetstream():2) /usr/include/_ansi.h:137:
*** Interpreter error recovered ***
Error: cannot open file "DllImport.h"  (tmpfile):2:
*** Interpreter error recovered ***
e[0mroot [0] .q
e[0me]0;~a
e[32mNausheen@Nausheen-Laptop e[33m~e[0m
$ exit
exit
Script done on Wed, Mar 21, 2012  9:16:44 AM

As far as I can figure my paths are set correctly:

Script started on Wed, Mar 21, 2012  9:24:23 AM
e]0;~a
e[32mNausheen@Nausheen-Laptop e[33m~e[0m
$ echo $ROOTSYS 
/cygdrive/c/root
e]0;~a
e[32mNausheen@Nausheen-Laptop e[33m~e[0m
$ echo $PATH
/cygdrive/c/root
/bin:/usr/local/bin:/usr/bin:/cygdrive/c/root/bin:/cygdrive/c/Program Files (x86)/MiKTeX 2.8/miktex/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/ispell/bin:/cygdrive/c/Program Files (x86)/Calibre2:%PROGRAMFILES%/Internet Explorer:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/usr/X11R6/bin:/cygdrive/c/Users/Nausheen/AppData/Roaming/MiKTeX/2.8/miktex/bin:/usr/local/gfortran:/:/usr/bin:/cygdrive/c/root/bin:/cygdrive/c/root/lib: c:/cygwin/usr/local/gfortran/libexec/gcc/i686-pc-cygwin/4.7.0:/usr/lib/lapack
e]0;~a
e[32mNausheen@Nausheen-Laptop e[33m~e[0m
$ echo $LD_LIBRARY_PATH
/cygdrive/c/root
/lib:/usr/local/gfortran/lib:/cygdrive/c/root/lib
e]0;~a
e[32mNausheen@Nausheen-Laptop e[33m~e[0m
$ echo $DYLD_LIBRARY_PATH
/cygdrive/c/root/lib
e]0;~a
e[32mNausheen@Nausheen-Laptop e[33m~e[0m
$ exit
exit
Script done on Wed, Mar 21, 2012  9:24:57 AM

I didn’t think I had to do anything else??

Thanks,

Nausheen

I just tried to start root from the just the usual command prompt with

root -b

and it works! i still get the cygcheck error, but nothing else…

any idea whats going on???