it looks like you used the wrong Makefile. For RH5.2 with egcs you
need $ROOTSYS/src/Makefile.linuxegcs. Makefile.linux is for older
gcc 2.7.2.x systems. Also after installing the sources you should
delete the include directory and make it a link to the src directory:
rm -rf include
ln -s src include
see the AA_INSTALL file.
I hope to reasonably soon change to the autoconf system prepared by
Matt Langston so that this kind of errors and Makefile guess work
is not necessary anymore.
In the meanwhile could you try to rebuild with the correct Makefile
to see if you get a better result.
Cheers, Fons.
Randy MacLeod wrote:
>
> Hi,
>
> Here are some small but annoying problems a friend had in
> installing Root. In summary, two programs did not compile
> in the test directory because we had installed both the
> binary and the source but had not recompiled the src.
>
> Reinstalling just the binary fixed the test programs.
>
> Compiling the source required changing the Makefile.linux
> and then commenting out some code in test/guitest.cxx.
>
> This is on a stock Redhat system and I know that this
> would annoy alot of people seeing Root for the first time.
> Can you please confirm that this is a common problem and
> fix the Makefile.linux in the source distribution.
>
> Below are all the details which can be ignored by most people but
> I include them so that if anyone is searching the digest
> they will hit on some relevant keywords.
>
> Randy MacLeod
>
> *****************************************************************************
>
> This work was on a stock Redhat Linux 5.2 system, using the Root
> binaries for egcs 1.0.2. I think that this must be the most
> common platform for Root so I would hope that compiling
> the source would be perfectly clean.
>
> CRYPTLIBS is not defined by default. Is this a US export restriction? ;-)
> CRYPTLIBS = -lcrypt
>
> Is -lg++ needed at all? In compiling, every error was
> related to not finding -lg++ yet it is in /usr/lib
>
> I tried two things:
>
> 1)
>
> To get this to compile I removed -lg++ from all lines
> in Makefile.linux.
>
> I was able to compile everything in src but
> in the test dir, guitest complained...:
> so
>
> cp ../src/TGTab.h ../include/TGTab.h
> It seems that this does not happen when you do a make in
> src dir.
>
> but still no joy, so I just commented out some things:
>
> kHorizontalFrame);
> // RWM kHorizontalFrame, GetWhitePixel());
> //RWM: TGTabElement *tabel = fTab->GetTabTab(2);
> //RWM: tabel->ChangeBackground(yellow);
> //RWM: fTestButton->ChangeBackground(green);
>
> guitest works and seems to behave the same as on my Solaris 2.6 box.
>
> 2)
> As the superuser, I did /sbin/ldconfig, thinking that this might
> fix things but no such luck.
>
> -----------------------------------------------------------------------------
>
> On a stock Redhat Linux 5.2 system, using the Root
> binaries for egcs 1.0.2 from:
>
> http://root.cern.ch/root/Version221.html
>
> Note
> $ g++ --version
> egcs-2.90.29 980515 (egcs-1.0.3 release)
> $ rpm -q -f /usr/bin/g++
> egcs-c++-1.0.3a-14
>
> -----------------------------------------------------------------------------
>
> Here are the symptoms of having installed the binary
> and then source and trying to compile in test:
>
> We can't compile everything in the test directory.
>
> Specifically,
> g++ -O -Wall -fno-rtti -fno-exceptions -fPIC -I/home/rwm/src/physics/root/include -c minexam.cxx
> minexam.cxx: In function `int minexam()':
> minexam.cxx:57: no matching function for call to `TMinuit::DefineParameter (int, char[6], int, double, int, int)'
> ...
>
> I look in the 2.21/08 src dir and see that things have changed,
> TMinuit::DefineParameter is in the .cxx file.
>
> I did:
> cd $ROOTSYS/src
> make $ROOTSYS/lib/libMinuit.so
> ***1: see note below
> cp TMinuit.h ../include
> cd ../src
> make // And still an error
>
> g++ -g minexam.o -L/home/rwm/src/physics/root/lib -lNew -lBase -lCint -lClib -lCont -lFunc -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet -lPostscript -lProof -lTree -lUnix -lZip -lm -ldl -rdynamic -o minexam
> /home/rwm/src/physics/root/lib/libMinuit.so:
> undefined reference to `TNamed type_info function'
> /home/rwm/src/physics/root/lib/libMinuit.so:
> undefined reference to `TNamed type_info node'
> collect2: ld returned 1 exit status
>
> So I decide to compile all 'src' as described above.
-- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910