Problem to build library on Mac OS 10.7

Dear all,

I’m trying to build a library with a code composed of several classes, and I encounter a problem. I can reproduce the problem for each class taken individually. The library seems to be built correctly :

[TheVerse:start_test] julien$ make
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start_test/src/Config.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start_test/include -I/opt/local/include  -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/src/Config.C:155:30: warning: unused parameter 'listname' [-Wunused-parameter]
int Config::ReadList(TString listname)
                             ^
1 warning generated.
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/Config.o done!
Generating dictionary /Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/SpectrumDict.C...
rootcint -f /Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/SpectrumDict.C -c -DCONSTRUCT_LIBRARY -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start_test/include -I/opt/local/include  -DCONSTRUCT_LIBRARY -p /Users/julien/Desktop/These/Tools/hap-11-02/start_test/include/Config.hh /Users/julien/Desktop/These/Tools/hap-11-02/start_test/include/LinkDef.hh
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/SpectrumDict.C done!
Generating object dictionary /Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/SpectrumDict.o...
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/SpectrumDict.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start_test/include -I/opt/local/include  -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/SpectrumDict.o done!
Generating library /Users/julien/Desktop/These/Tools/hap-11-02/start_test/lib/libspectrum.so...
clang++ -dynamiclib -single_module -install_name /Users/julien/Desktop/These/Tools/hap-11-02/start_test/ -O2 -mmacosx-version-min=10.7 -m64 /Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/Config.o /Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/SpectrumDict.o -o  /Users/julien/Desktop/These/Tools/hap-11-02/start_test/lib/libspectrum.so -L/usr/local/root_v5.32.00/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -Wl,-rpath,/usr/local/root_v5.32.00/lib -lm -ldl -L/usr/local/root_v5.32.00/lib -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -Wl,-rpath,/usr/local/root_v5.32.00/lib -lm -ldl -lMathMore -lMinuit2
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/lib/libspectrum.so done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start_test/src/main.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start_test/include -I/opt/local/include  -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/src/main.C:39:14: warning: unused parameter 'argc' [-Wunused-parameter]
int main(int argc, char **argv) {
             ^
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/src/main.C:39:27: warning: unused parameter 'argv' [-Wunused-parameter]
int main(int argc, char **argv) {
                          ^
2 warnings generated.
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/main.o done!
Generating /Users/julien/Desktop/These/Tools/hap-11-02/start_test/bin/DoFit with library...
clang++ -O2 -mmacosx-version-min=10.7 -m64 /Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/Config.o /Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/SpectrumDict.o /Users/julien/Desktop/These/Tools/hap-11-02/start_test/out/main.o -L/usr/local/root_v5.32.00/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -Wl,-rpath,/usr/local/root_v5.32.00/lib -lm -ldl  -L/opt/local/lib -lgsl -lgslcblas -lMathMore -lMinuit2 -lspectrum -o /Users/julien/Desktop/These/Tools/hap-11-02/start_test/bin/DoFit
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/bin/DoFit done!

But as soon as I tried to load the library in CINT, nothing happened and I can’t instantiate any class :

[TheVerse:start_test] julien$ root -l
root [0] gSystem->Load("lib/libspectrum.so");
root [1] gSystem->ListLibraries()
 
Loaded shared libraries
=======================
/usr/local/root_v5.32.00/lib/libCint.so
/usr/local/root_v5.32.00/lib/libCore.so
/usr/local/root_v5.32.00/lib/libRint.so
/usr/local/root_v5.32.00/lib/libMathCore.so
/Users/julien/Desktop/These/Tools/hap-11-02/start_test/lib/libspectrum.so
/usr/local/root_v5.32.00/lib/libMatrix.so
/usr/local/root_v5.32.00/lib/libHist.so
/usr/local/root_v5.32.00/lib/libspectrum.so
-----------------------
8 libraries loaded
=======================
root [2] Config *bob;
Error: Symbol Config is not defined in current scope  (tmpfile):1:
Error: Symbol bob is not defined in current scope  (tmpfile):1:
*** Interpreter error recovered ***
root [3] 

You can find attached a Makefile based on the Makefile.arch with one reduce class, a main program and a Linkdef.hh file which produce the same problem :
Here are the Makefile and the Linkdef file :

[ul]

[code]include $(ROOTSYS)/etc/Makefile.arch

Definitions

DOLIBRARY = yes

CURDIR = $(shell pwd)

INCDIR = (shell pwd)/include SRCDIR = (shell pwd)/src
OUTDIR = (shell pwd)/out BINDIR = (shell pwd)/bin
LIBDIR = (shell pwd)/lib DOCDIR = (shell pwd)/doxy

GSLCFLAGS = (shell gsl-config --cflags) GSLLIBS = (shell gsl-config --libs)

CXXFLAGS += -I$(INCDIR) $(GSLCFLAGS)

EXPLLINKLIBS += -lMathMore -lMinuit2

LIBS += $(GSLLIBS) -lMathMore -lMinuit2

EXEC = (BINDIR)/DoFit LIBRARY = (LIBDIR)/libspectrum.so

DIRECTORIES = (LIBDIR) (OUTDIR) (BINDIR) (DOCDIR)

OBJS = $(OUTDIR)/Config.o

INCS = $(INCDIR)/Config.hh

SRCS = $(SRCDIR)/Config.C

ifeq ((DOLIBRARY),yes) CXXFLAGS += -DCONSTRUCT_LIBRARY OBJS += (OUTDIR)/SpectrumDict.o
endif

What to do

ifeq ((DOLIBRARY),yes) all: (DIRECTORIES) (LIBRARY) (EXEC)
else
all: (DIRECTORIES) (EXEC)
endif

directories

(DIRECTORIES) : @mkdir -p @

Library

(LIBRARY) : (OBJS)
@echo "Generating library @..." (LD) (SOFLAGS) (LDFLAGS) ^ (OutPutOpt) @ (EXPLLINKLIBS)
@echo “$@ done!”

Dictionaries:

(OUTDIR)/SpectrumDict.C : (INCS) (INCDIR)/LinkDef.hh @echo "Generating dictionary @…"
(ROOTCINT) -f @ -c -DCONSTRUCT_LIBRARY (CXXFLAGS) -p ^
@echo “$@ done!”

executable

(EXEC): (OBJS) (OUTDIR)/main.o ifeq ((DOLIBRARY),yes)
@echo “Generating @ with library..." (LD) (LDFLAGS) ^ (LIBS) -lspectrum (OutPutOpt)@ @echo "@ done!”
else
@echo “Generating @ without library..." (LD) (LDFLAGS) -o (EXEC) (OBJS) (OUTDIR)/main.o (LIBS) (OutPutOpt)@ @echo "@ done!”
endif

sources

(OUTDIR)/main.o: (SRCS) (INCS) (SRCDIR)/main.C
(LD) -c (SRCDIR)/main.C (CXXFLAGS) @mv *.o (OUTDIR)
@echo “$@ done!”

(OUTDIR)/Config.o: (SRCDIR)/Config.C (INCDIR)/Config.hh (LD) -c (SRCDIR)/Config.C (CXXFLAGS)
@mv *.o (OUTDIR) @echo "@ done!"

(OUTDIR)/SpectrumDict.o : (OUTDIR)/SpectrumDict.C
@echo “Generating object dictionary @..." (CXX) -c < (CXXFLAGS)
@mv *.o (OUTDIR)/ @echo "@ done!”

.PHONY: clean distclean

clean:
rm -rf (OUTDIR)/*.o rm -rf (OUTDIR)/SpectrumDict.C
rm -rf $(OUTDIR)/SpectrumDict.h

distclean: clean
rm -rf (EXEC) rm -rf (LIBDIR)/*.so[/code]

[code]#include <Rtypes.h>
#include <Rpair.h>

#include
#include
#include

#ifdef CINT

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ nestedclasses;
#pragma link C++ nestedtypedefs;

#pragma link C++ class Config+;
#pragma link C++ class Config::*+;

#endif
[/code]

[/ul]

All my code works fine without generating a library, and you can be sure of that by switching off the library in the Makefile with :

DOLIBRARY = no

I’m using root v5.32.00 with a macbook pro 13’ on mac OS 10.7.3.

Thanks for your help!

Cheers,

Julien
start_test.zip (20.7 KB)

Hello everyone,

I resolved the problem I had with my toy program by changing the name of my library which was lib spectrum.so by lib start.so (I saw there was already a library named libSpectrum.so in the distribution). It’s weird since my code and the library can run on unix machine (except on my macbook…) without any problem even with the old name for the library.

Now I’ve got an other problem with my full code. When I try to load my library lib start.so I’ve got the following error message :

[TheVerse:start] julien$ root -l
rootlogon for the new spectrum
Fatal: sizeof(pair<unsigned int,double>) == sizeof(::ROOT::Shadow::pairlEunsignedsPintcOdoublegR) violated at line 226 of `/Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumDict.C'
aborting

Thread 1 (process 30320):
#0  0x00007fff89efa168 in wait4 ()
#1  0x00007fff8e0d35f5 in system ()
#2  0x000000010dcffea9 in TUnixSystem::StackTrace ()
#3  0x000000010dc48acb in DefaultErrorHandler ()
#4  0x000000010dc48f60 in ErrorHandler ()
#5  0x000000010dc4940d in Fatal ()
#6  0x000000010f254466 in ROOT::GenerateInitInstanceLocal ()
#7  0x000000010f2cc3a9 in global constructors keyed to a ()
#8  0x00007fff6d838da6 in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#9  0x00007fff6d838af2 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE ()
#10 0x00007fff6d8362e4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE ()
#11 0x00007fff6d8370b7 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE ()
#12 0x00007fff6d82c1b9 in __dyld__ZN4dyld15runInitializersEP11ImageLoader ()
#13 0x00007fff6d832657 in __dyld_dlopen ()
#14 0x00007fff8e06b95b in dlopen ()
#15 0x000000010e624f8e in G__dlopen ()
#16 0x000000010e625c1f in G__shl_load ()
#17 0x000000010e599be3 in G__loadfile ()
#18 0x000000010dcc6455 in TCint::Load ()
#19 0x000000010dc89b48 in TSystem::Load ()
#20 0x000000010dedac9b in G__G__Base2_256_0_121 ()
#21 0x000000010e4efe2f in Cint::G__ExceptionWrapper ()
#22 0x000000010e5a264b in G__execute_call ()
#23 0x000000010e5a2c26 in G__call_cppfunc ()
#24 0x000000010e575d7f in G__interpret_func ()
#25 0x000000010e55f0bf in G__getfunction ()
#26 0x000000010e663c25 in G__getstructmem ()
#27 0x000000010e65a927 in G__getvariable ()
#28 0x000000010e55411e in G__getitem ()
#29 0x000000010e553173 in G__getexpr ()
#30 0x000000010e5d4c87 in G__exec_statement ()
#31 0x000000010e5341ed in G__exec_tempfile_core ()
#32 0x000000010e534453 in G__exec_tempfile ()
#33 0x000000010e5e0395 in G__process_cmd ()
#34 0x000000010dcc6782 in TCint::ProcessLine ()
#35 0x000000010dcc6c09 in TCint::ProcessLineSynch ()
#36 0x000000010dc332b5 in TApplication::ExecuteFile ()
#37 0x000000010ec1d689 in TRint::ExecLogon ()
#38 0x000000010ec1cde5 in TRint::TRint ()
#39 0x000000010ec1cb76 in TRint::TRint ()
#40 0x000000010dc29a31 in main ()

So it seems I’ve got a problem with the dictionary (or my code?) but I’ve got some troubles to identify it…

Is there any way you could help me with this?

You can find attached the linkef, the makefile and the dictionary .C and .h.

Thank you!

Julien

PS : here is the log of the make :

clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/Config.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/Config.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/StringTools.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/StringTools.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/EnergyBin.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/EnergyBin.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/Band.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/Band.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/BandsFactory.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/BandsFactory.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/FCNLikelihood.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/FCNLikelihood.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/ComputeResults.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/ComputeResults.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/MinimizeFactory.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/MinimizeFactory.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/HandleResolArea.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/src/HandleResolArea.C:66:3: warning: field 'fForceUseDistribution' will be initialized after field 'fIsDataSummaryFromDynamicAlloc' [-Wreorder]
  fForceUseDistribution(false),
  ^
/Users/julien/Desktop/These/Tools/hap-11-02/start/src/HandleResolArea.C:2225:4: warning: field 'fForceUseDistribution' will be initialized after field 'fIsDataSummaryFromDynamicAlloc' [-Wreorder]
   fForceUseDistribution(StoreCopy.fForceUseDistribution),
   ^
2 warnings generated.
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/HandleResolArea.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/DataSummary.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY 
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/DataSummary.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/MonteCarlo.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/MonteCarlo.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/HypothesisFunctions.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/HypothesisFunctions.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/ResidualsFactory.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/ResidualsFactory.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/PlotFactory.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/src/PlotFactory.C:303:68: warning: unused parameter 'HypoArray' [-Wunused-parameter]
void SaveSpectrumAndResidualsROOTObjects(std::vector<Hypothesis*> &HypoArray) {
                                                                   ^
/Users/julien/Desktop/These/Tools/hap-11-02/start/src/PlotFactory.C:910:56: warning: unused parameter 'hypo' [-Wunused-parameter]
void PlotFactory::ComputeContoursButterfly(Hypothesis &hypo,double log10emin, double log10emax) {
                                                       ^
/Users/julien/Desktop/These/Tools/hap-11-02/start/src/PlotFactory.C:910:68: warning: unused parameter 'log10emin' [-Wunused-parameter]
void PlotFactory::ComputeContoursButterfly(Hypothesis &hypo,double log10emin, double log10emax) {
                                                                   ^
/Users/julien/Desktop/These/Tools/hap-11-02/start/src/PlotFactory.C:910:86: warning: unused parameter 'log10emax' [-Wunused-parameter]
void PlotFactory::ComputeContoursButterfly(Hypothesis &hypo,double log10emin, double log10emax) {
                                                                                     ^
/Users/julien/Desktop/These/Tools/hap-11-02/start/src/PlotFactory.C:1605:41: warning: unused parameter 'flux3sigmaminus' [-Wunused-parameter]
                                                       const std::vector<double> &flux3sigmaminus, 
                                                                                  ^
5 warnings generated.
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/PlotFactory.o done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/SpectrumUtils.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/src/SpectrumUtils.C:51:61: warning: unused parameter 'hypo' [-Wunused-parameter]
double SpectrumUtils::GetNormalizationConstante(Hypothesis &hypo) {
                                                            ^
1 warning generated.
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumUtils.o done!
Generating dictionary /Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumDict.C...
rootcint -f /Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumDict.C -c -DCONSTRUCT_LIBRARY -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY -p /Users/julien/Desktop/These/Tools/hap-11-02/start/include/EnergyBin.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/Band.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/ComputeResults.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/Config.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/DataSummary.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/FCNLikelihood.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/HandleResolArea.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/HypothesisFunctions.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/BandsFactory.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/MinimizeFactory.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/MonteCarlo.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/ResidualsFactory.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/ConstantesDefinitions.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/PlotFactory.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/SpectrumUtils.hh /Users/julien/Desktop/These/Tools/hap-11-02/start/include/SpectrumLinkdef.hh
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumDict.C done!
Generating object dictionary /Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumDict.o...
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumDict.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumDict.o done!
Generating library /Users/julien/Desktop/These/Tools/hap-11-02/start/lib/libstart.so...
clang++ -dynamiclib -single_module -install_name /Users/julien/Desktop/These/Tools/hap-11-02/start/ -O2 -mmacosx-version-min=10.7 -m64 /Users/julien/Desktop/These/Tools/hap-11-02/start/out/Config.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/StringTools.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/EnergyBin.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/Band.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/BandsFactory.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/FCNLikelihood.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/ComputeResults.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/MinimizeFactory.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/HandleResolArea.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/DataSummary.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/MonteCarlo.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/HypothesisFunctions.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/ResidualsFactory.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/PlotFactory.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumUtils.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumDict.o -o  /Users/julien/Desktop/These/Tools/hap-11-02/start/lib/libstart.so -L/usr/local/root_v5.32.00/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -Wl,-rpath,/usr/local/root_v5.32.00/lib -lm -ldl -L/usr/local/root_v5.32.00/lib -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -Wl,-rpath,/usr/local/root_v5.32.00/lib -lm -ldl -lMathMore -lMinuit2 -L/opt/local/lib -lgsl -lgslcblas
/Users/julien/Desktop/These/Tools/hap-11-02/start/lib/libstart.so done!
clang++ -c /Users/julien/Desktop/These/Tools/hap-11-02/start/src/main.C -O2 -pipe -Wall -W -Woverloaded-virtual -pthread -m64 -I/usr/local/root_v5.32.00/include -I/Users/julien/Desktop/These/Tools/hap-11-02/start/include -I/opt/local/include -DCONSTRUCT_LIBRARY
/Users/julien/Desktop/These/Tools/hap-11-02/start/out/main.o done!
Generating /Users/julien/Desktop/These/Tools/hap-11-02/start/bin/DoFit with library...
clang++ -O2 -mmacosx-version-min=10.7 -m64 /Users/julien/Desktop/These/Tools/hap-11-02/start/out/Config.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/StringTools.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/EnergyBin.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/Band.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/BandsFactory.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/FCNLikelihood.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/ComputeResults.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/MinimizeFactory.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/HandleResolArea.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/DataSummary.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/MonteCarlo.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/HypothesisFunctions.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/ResidualsFactory.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/PlotFactory.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumUtils.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/SpectrumDict.o /Users/julien/Desktop/These/Tools/hap-11-02/start/out/main.o -L/usr/local/root_v5.32.00/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -Wl,-rpath,/usr/local/root_v5.32.00/lib -lm -ldl  -L/opt/local/lib -lgsl -lgslcblas -lMathMore -lMinuit2 /Users/julien/Desktop/These/Tools/hap-11-02/start/lib/libstart.so -o /Users/julien/Desktop/These/Tools/hap-11-02/start/bin/DoFit
/Users/julien/Desktop/These/Tools/hap-11-02/start/bin/DoFit done!

Makefile.txt (6.91 KB)
SpectrumDict.h (20.9 KB)
SpectrumDict.C (1.1 MB)
SpectrumLinkDef.hh (3.82 KB)

Hi,

Were you able to resolve this problem (it seems that CINT believe that in your environment std::pair has a virtual function … which can not be true … which version of ROOT were you using?)?

Philippe.

Hi Philippe,

I partially resolved the problem by replacing in the LinkDef file for STL template the lines like this one:

#pragma link C++ class vector<pair<unsigned int,double> >+;

with

#pragma link C++ class vector<pair<unsigned int,double> >;

I don’t really know why the “+” mode does not work in my case with simple STL template. At the time I was using root_v5.32.00.

Cheers,

Julien