Root - Ubuntu 11.10 - undefined references with Geant4 codes

Hello,

I have upgraded to ubuntu 11.10, downloaded the latest trunk version of Root, compiled it successfully, and re-compiled my Geant4 installation. So everything is compiled again using the same settings, compiler, etc.

but now my Geant4 codes (which used to compile fine) have undefined references:

Using granular libraries …
Linking Thorium_innerRod
/home/cristian/geant4/geant4.9.5.b01/tmp/Linux-g++/Thorium_innerRod/libThorium_innerRod.so: undefined reference to TPaveText::TPaveText(double, double, double, double, char const*)' /home/cristian/geant4/geant4.9.5.b01/tmp/Linux-g++/Thorium_innerRod/libThorium_innerRod.so: undefined reference toTFile::TFile(char const*, char const*, char const*, int)’
/home/cristian/geant4/geant4.9.5.b01/tmp/Linux-g++/Thorium_innerRod/libThorium_innerRod.so: undefined reference to TCanvas::TCanvas(char const*, char const*, int, int, int, int)' /home/cristian/geant4/geant4.9.5.b01/tmp/Linux-g++/Thorium_innerRod/libThorium_innerRod.so: undefined reference toTCanvas::TCanvas(bool)'
collect2: ld returned 1 exit status
make: *** [/home/cristian/geant4/geant4.9.5.b01/bin/Linux-g++/Thorium_innerRod] Error 1

In my GNUMakefile I am using (and it used to work fine):

CPPFLAGS += -DG4ANALYSIS_USE_ROOT $(shell $(ROOTSYS)/bin/root-config --cflags)
ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --glibs) -lMinuit -lHtml
ROOTLIBS := $(filter-out -lNew,$(ROOTLIBS))
#ROOTLIBS := $(filter-out -lThread,$(ROOTLIBS))
ROOTLIBS := $(filter-out -lpthread,$(ROOTLIBS))
LDLIBS += $(ROOTLIBS)

I would be very grateful for any suggestion on how to fix the undefined references.

Thank you very much,

Best regards,

Cristian

Can you try ? :

  CPPFLAGS  += $(shell $(ROOTSYS)/bin/root-config --cflags)
  EXTRALIBS += $(shell $(ROOTSYS)/bin/root-config --glibs)
# EXTRALIBS instead of LDFLAGS

Apparently these lines added to the Makefile work:

CPPFLAGS += $(shell $(ROOTSYS)/bin/root-config --cflags)
EXTRALIBS += $(shell $(ROOTSYS)/bin/root-config --libs)
LDLIBS += $(shell $(ROOTSYS)/bin/root-config --libs)

Thanks,

Cristian