Dear ROOT Forum,
I am resurrecting some code that worked a couple of root versions ago, but now I have trouble compiling and linking. I have two problems. They can probably be solved by pointing me to a Makefile for Root 6.25. The problems are:
- I get warnings I have not see before and do not understand like:
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:523:3: note: in expansion of m\
acro ‘_R__JOIN3_’
523 | _R__JOIN3_(_R__DEPRECATED_,MAJOR,MINOR)("will be removed in ROOT v" #\
MAJOR "." #MINOR ": " REASON)
| ^~~~~~~~~~
I am guessing I am missing a compiler/liner option.
- At linking, one routine does not get a library it used to pick up:
/usr/bin/ld: myFit.o: in function `makeFit(int)':
/home/fisherp/projects/Muons/dev/myFit.C:35: undefined reference to `TMinuit::T\
Minuit(int)'
Following is my Makefile:
LDFLAGS=$(shell root-config --glibs)
CFLAGS=$(shell root-config --cflags)
default: myFit.o myTimer.o FrameWork.o getNextEvent.o Init.o main.o printEvent.o processEvent.o Summ.o WaveForm.o defs.h myRec.h debug.h Selector.o SelAnal.o MakePlots.o calibEvent.o MakePlotsCalib.o
g++ myFit.o myTimer.o FrameWork.o getNextEvent.o Init.o main.o printEvent.o processEvent.o Summ.o WaveForm.o defs.h myRec.h debug.h Selector.o SelAnal.o MakePlots.o calibEvent.o MakePlotsCalib.o -Wattributes $(CFLAGS) $(LDFLAGS) -o ../FrameWork-root-dev
ascii2Root: ascii2Root.C
g++ ascii2Root.C $(CFLAGS) $(LDFLAGS) -o ../convert2Root-dev
convert2Root: convert2Root.o
g++ convert2Root.o $(CFLAGS) $(LDFLAGS) -o ../convert2Root-dev
getTrace.o: getTrace.C
g++ -c -g getTrace.C $(CFLAGS)
test: test.C
c++ test.C $(CFLAGS) $(LDFLAGS) -o test
convert2Root.o: convert2Root.C
c++ -c -g convert2Root.C $(CFLAGS)
quick: quick.C
c++ -g quick.C $(CFLAGS)
FrameWork.o: FrameWork.C defs.h myRec.h debug.h
c++ -c -g FrameWork.C $(CFLAGS)
MakePlotsCalib.o: MakePlotsCalib.C defs.h myRec.h debug.h
c++ -c -g MakePlotsCalib.C $(CFLAGS)
myTimer.o: myTimer.C defs.h myRec.h debug.h
c++ -c -g myTimer.C $(CFLAGS)
WaveForm.o: WaveForm.C defs.h myRec.h debug.h
c++ -c -g WaveForm.C $(CFLAGS)
getNextEvent.o: getNextEvent.C defs.h myRec.h debug.h
c++ -c -g getNextEvent.C $(CFLAGS)
Init.o: Init.C defs.h myRec.h debug.h
g++ -c -g Init.C $(CFLAGS)
main.o: main.C defs.h myRec.h debug.h
c++ -c -g main.C $(CFLAGS)
printEvent.o: printEvent.C defs.h myRec.h debug.h
c++ -c -g printEvent.C $(CFLAGS)
Summ.o: Summ.C defs.h myRec.h debug.h
c++ -c -g Summ.C $(CFLAGS)
processEvent.o: processEvent.C defs.h myRec.h debug.h
g++ -c -g processEvent.C $(CFLAGS)
calibEvent.o: calibEvent.C defs.h myRec.h debug.h
c++ -c -g calibEvent.C $(CFLAGS)
SelAnal.o: SelAnal.C defs.h myRec.h debug.h
c++ -c -g SelAnal.C $(CFLAGS)
Selector.o: Selector.C defs.h myRec.h debug.h
c++ -c -g Selector.C $(CFLAGS)
myFit.o: myFit.C defs.h myRec.h debug.h
g++ -c -g myFit.C $(CFLAGS)
MakePlots.o: MakePlots.C defs.h myRec.h debug.h
c++ -c -g MakePlots.C $(CFLAGS)
clean:
rm *.o
and the output after make clean:
c++ -c -g MakePlots.C -pthread -std=c++14 -m64 -I/usr/local/root-6.25.01/include
c++ -c -g calibEvent.C -pthread -std=c++14 -m64 -I/usr/local/root-6.25.01/include
In file included from /usr/local/root-6.25.01/include/RtypesCore.h:23,
from /usr/local/root-6.25.01/include/Compression.h:15,
from /usr/local/root-6.25.01/include/TTree.h:29,
from calibEvent.C:1:
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:482:73: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
482 | #define _R_DEPRECATED_REMOVE_NOW(REASON) __attribute__((REMOVE_THIS_NOW))
| ^
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:510:37: note: in expansion of macro ‘_R_DEPRECATED_REMOVE_NOW’
510 | # define _R__DEPRECATED_626(REASON) _R_DEPRECATED_REMOVE_NOW(REASON)
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:436:39: note: in expansion of macro ‘_R__DEPRECATED_626’
436 | # define _NAME3_(name1,name2,name3) name1##name2##name3
| ^~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:454:30: note: in expansion of macro ‘_NAME3_’
454 | # define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
| ^~~~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:523:3: note: in expansion of macro ‘_R__JOIN3_’
523 | _R__JOIN3_(_R__DEPRECATED_,MAJOR,MINOR)("will be removed in ROOT v" #MAJOR "." #MINOR ": " REASON)
| ^~~~~~~~~~
/usr/local/root-6.25.01/include/TError.h:42:38: note: in expansion of macro ‘R__DEPRECATED’
42 | R__EXTERN TVirtualMutex *gErrorMutex R__DEPRECATED(6,26, "ROOT stopped exporting gErrorMutex.");
| ^~~~~~~~~~~~~
c++ -c -g MakePlotsCalib.C -pthread -std=c++14 -m64 -I/usr/local/root-6.25.01/include
In file included from /usr/local/root-6.25.01/include/RtypesCore.h:23,
from /usr/local/root-6.25.01/include/Compression.h:15,
from /usr/local/root-6.25.01/include/TTree.h:29,
from MakePlotsCalib.C:1:
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:482:73: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
482 | #define _R_DEPRECATED_REMOVE_NOW(REASON) __attribute__((REMOVE_THIS_NOW))
| ^
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:510:37: note: in expansion of macro ‘_R_DEPRECATED_REMOVE_NOW’
510 | # define _R__DEPRECATED_626(REASON) _R_DEPRECATED_REMOVE_NOW(REASON)
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:436:39: note: in expansion of macro ‘_R__DEPRECATED_626’
436 | # define _NAME3_(name1,name2,name3) name1##name2##name3
| ^~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:454:30: note: in expansion of macro ‘_NAME3_’
454 | # define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
| ^~~~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:523:3: note: in expansion of macro ‘_R__JOIN3_’
523 | _R__JOIN3_(_R__DEPRECATED_,MAJOR,MINOR)("will be removed in ROOT v" #MAJOR "." #MINOR ": " REASON)
| ^~~~~~~~~~
/usr/local/root-6.25.01/include/TError.h:42:38: note: in expansion of macro ‘R__DEPRECATED’
42 | R__EXTERN TVirtualMutex *gErrorMutex R__DEPRECATED(6,26, "ROOT stopped exporting gErrorMutex.");
| ^~~~~~~~~~~~~
g++ myFit.o myTimer.o FrameWork.o getNextEvent.o Init.o main.o printEvent.o processEvent.o Summ.o WaveForm.o defs.h myRec.h debug.h Selector.o SelAnal.o MakePlots.o calibEvent.o MakePlotsCalib.o -Wattributes -pthread -std=c++14 -m64 -I/usr/local/root-6.25.01/include -L/usr/local/root-6.25.01/lib -lGui -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lROOTVecOps -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -lROOTDataFrame -pthread -lm -ldl -rdynamic -o ../FrameWork-root-dev
In file included from /usr/local/root-6.25.01/include/RtypesCore.h:23,
from /usr/local/root-6.25.01/include/Rtypes.h:23,
from /usr/local/root-6.25.01/include/TObject.h:17,
from /usr/local/root-6.25.01/include/TNamed.h:25,
from /usr/local/root-6.25.01/include/TFitResult.h:24,
from defs.h:1:
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:482:73: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
482 | #define _R_DEPRECATED_REMOVE_NOW(REASON) __attribute__((REMOVE_THIS_NOW))
| ^
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:510:37: note: in expansion of macro ‘_R_DEPRECATED_REMOVE_NOW’
510 | # define _R__DEPRECATED_626(REASON) _R_DEPRECATED_REMOVE_NOW(REASON)
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:436:39: note: in expansion of macro ‘_R__DEPRECATED_626’
436 | # define _NAME3_(name1,name2,name3) name1##name2##name3
| ^~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:454:30: note: in expansion of macro ‘_NAME3_’
454 | # define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
| ^~~~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:523:3: note: in expansion of macro ‘_R__JOIN3_’
523 | _R__JOIN3_(_R__DEPRECATED_,MAJOR,MINOR)("will be removed in ROOT v" #MAJOR "." #MINOR ": " REASON)
| ^~~~~~~~~~
/usr/local/root-6.25.01/include/TError.h:42:38: note: in expansion of macro ‘R__DEPRECATED’
42 | R__EXTERN TVirtualMutex *gErrorMutex R__DEPRECATED(6,26, "ROOT stopped exporting gErrorMutex.");
| ^~~~~~~~~~~~~
In file included from /usr/local/root-6.25.01/include/RtypesCore.h:23,
from /usr/local/root-6.25.01/include/Rtypes.h:23,
from /usr/local/root-6.25.01/include/TObject.h:17,
from /usr/local/root-6.25.01/include/TNamed.h:25,
from /usr/local/root-6.25.01/include/TFitResult.h:24,
from myRec.h:1:
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:482:73: warning: ‘REMOVE_THIS_NOW’ attribute directive ignored [-Wattributes]
482 | #define _R_DEPRECATED_REMOVE_NOW(REASON) __attribute__((REMOVE_THIS_NOW))
| ^
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:510:37: note: in expansion of macro ‘_R_DEPRECATED_REMOVE_NOW’
510 | # define _R__DEPRECATED_626(REASON) _R_DEPRECATED_REMOVE_NOW(REASON)
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:436:39: note: in expansion of macro ‘_R__DEPRECATED_626’
436 | # define _NAME3_(name1,name2,name3) name1##name2##name3
| ^~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:454:30: note: in expansion of macro ‘_NAME3_’
454 | # define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
| ^~~~~~~
/usr/local/root-6.25.01/include/ROOT/RConfig.hxx:523:3: note: in expansion of macro ‘_R__JOIN3_’
523 | _R__JOIN3_(_R__DEPRECATED_,MAJOR,MINOR)("will be removed in ROOT v" #MAJOR "." #MINOR ": " REASON)
| ^~~~~~~~~~
/usr/local/root-6.25.01/include/TError.h:42:38: note: in expansion of macro ‘R__DEPRECATED’
42 | R__EXTERN TVirtualMutex *gErrorMutex R__DEPRECATED(6,26, "ROOT stopped exporting gErrorMutex.");
| ^~~~~~~~~~~~~
/usr/bin/ld: myFit.o: in function `makeFit(int)':
/home/fisherp/projects/Muons/dev/myFit.C:35: undefined reference to `TMinuit::TMinuit(int)'
collect2: error: ld returned 1 exit status
Makefile:5: recipe for target 'default' failed
make: *** [default] Error 1
Many thanks,
Peter
_ROOT Version: 6.25
_Platform: Mac Pro
_Compiler: gcc 10.2.1