We have recently upgraded out lab from RedHat 7 to RedHat 9, and I have been having some problems getting our programs using ROOT to run correctly. I have tracked the problem down to segmentation faults in TGraph::Fit and created a minimal test program (included below).
We have four machines running RedHat 9. Three are Pentium III ~500Mhz, and one is a dual Pentium IV 2GHz. ROOT is installed on /usr/local which is shared via AFS by all four machines. My test program runs correctly on the Pentium IV, but crashes with a segmentation violation in TGraph::Fit on all three Pentium III machines. Any suggestions are apreciated, I am stumped.
Thanks,
Josh
// gdb output of the test program run on one of the Pentium III machines
(gdb) run
Starting program: /afs/auger.mtu.edu/home/joaander/fit_test/test
[New Thread 16384 (LWP 1492)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 1492)]
0x4094a447 in TGraph::Fit(TF1*, char const*, char const*, double, double) ()
from /usr/local/lib/root/libGraf.so
(gdb) bt
#0 0x4094a447 in TGraph::Fit(TF1*, char const*, char const*, double, double)
() from /usr/local/lib/root/libGraf.so
#1 0x08048b19 in main () at fit_test.cc:19
#2 0x40f75917 in __libc_start_main () from /lib/libc.so.6
(gdb)
/////////////////////////////////////////
// compiled with: g++ -o test fit_test.cc -g root-config --libs
root-config --cflags
// fit_test.cc
#include <TGraph.h>
#include <TF1.h>
#include
using namespace std;
int main()
{
TGraph *graph = new TGraph(3);
graph->SetPoint(0,1,1);
graph->SetPoint(0,2,2);
graph->SetPoint(0,3,4);
TF1 *fit = new TF1("fit", "[0]*x + [1]");
graph->Fit(fit, "QN");
fit->Print();
delete fit;
delete graph;
return 0;
}
////////////////////////////////////////
[joaander@kosmos fit_test]$ g++ --version
g++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright © 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[joaander@kosmos fit_test]$
///////////////////////////////////
ROOT version: 3.05/07