Can't compile examples in root/test using win32gcc/cygwin


I am testing ROOT-cygwin as an alternative development/analysis environment to my separate Linux partition. I installed the latest version of cygwin and KDE-3, then downloaded the binary for v4.02/00 compiled with gcc v3.3 (the cygwin version is 3.3.3, I hope that’s sufficiently close…)

ROOT works fine, however I can’t compile or link any libraries/executables.
The errors seem to be of two kinds, see the attached examples for test/Aclock and test/Event:

either :

variable ‘vtable for TTimer’ can’t be auto-imported. Please read the documentation for ld’s --enable-auto-import for details.

(case of Aclock, building a shared library)

or :

undefined reference to `TObject::TObjectnot-in-charge

(case of Event, building an executable).

In both cases I used the Makefile in $ROOTSYS/test.
I have $ROOTSYS/lib in my $LD_LIBRARY_PATH.
Do I have to build ROOT from scratch in order to be able to compile/link with it ?

Thanks for any help
John Frankland
Event.txt (36.2 KB)
Aclock.txt (12.5 KB)

I tried to build ROOT from scratch, following Axel Nauman’s instructions and it all went pear-shaped when trying to build libHist.dll - same errors as before about vtable not being auto-importable (see attached output from ‘make’ command).

Any help would be greatly appreciated as I cannot find the same error anywhere on the forum.

make.txt (9.6 KB)

Hi John,
A couple of random comments/questions that may/may not help:

  1. In the test directory, it didn’t work if I typed ‘make Event’, but if I typed ‘make’ so everything it needed compiled, it worked o.k.

  2. What version of Cygwin are you using? In my case
    cplager@PointyIII> uname -a
    CYGWIN_NT-5.1 PointyIII 1.5.12(0.116/4/2) 2004-11-10 08:34 i686 unknown unknown Cygwin
    cplager@PointyIII> gcc --version
    gcc (GCC) 3.3.3 (cygwin special)

  3. On my other compuer, I was able to build Root following Axel’s instructions using gcc3.2 and cygwin 1.5.12 (after some rebasing). I’m now using his ’ Version 4.02/00 17 December 2004 ’ out of the box with no problems (so there’s hope :smiley: )


Hi John,
I cannot reproduce this, with current cygwin and root 4.02/00. I hope you did not install the kde binutils patch…

Ontop of Charles’ questions I need the files from the link line, i.e.
hist/src/Haxis.o hist/src/TAxis.o hist/src/TConfidenceLevel.o hist/src/TF1.o hist/src/TF12.o hist/src/TF2.o hist/src/TF3.o hist/src/TFormula.o hist/src/TFractionFitter.o hist/src/TGraph2D.o hist/src/TGraph2DErrors.o hist/src/TGraphDelaunay.o hist/src/TH1.o hist/src/TH1K.o hist/src/TH2.o hist/src/TH3.o hist/src/THLimitsFinder.o hist/src/THStack.o hist/src/TLimit.o hist/src/TLimitDataSource.o hist/src/TMultiDimFit.o hist/src/TPolyMarker.o hist/src/TPrincipal.o hist/src/TProfile.o hist/src/TProfile2D.o hist/src/TSpectrum.o hist/src/TUtilHist.o hist/src/TVirtualHistPainter.o hist/src/G__Hist.o bin/libMatrix.dll lib/libMatrix.dll.a bin/libCore.dll lib/libCore.dll.a bin/libCint.dll lib/libCint.dll.a? It’d be best if you could tar.bz2 them and put them on the web so I can download them.

Please also send the output of “ld --version”.

I suspect that this is a problem with your .bashrc / .bash_profile / /etc/bash.bashrc. For a complete analysis of your problem I’ll need the output of “env”.

Cheers, Axel.

Hello Charles and Axel,

Thanks for the replies.
I had installed the binutils patch for KDE-3 - didn’t know it was wrong!
I uninstalled it and reinstalled the normal cygwin Devel version, and now it seems to work fine - at least, when I go into $ROOTSYS/test and type ‘make’ everything compiles and I was able to load the Tetris.dll and play a game…

Axel, perhaps you should put a warning about binutils in your ‘Hint’ about installing KDE-3 ?

Thanks a lot

Hi John,