Compilation problem with ACLIC library

Hi I am a newbie in root, and first time to analyses data in root. So in compillation of the code I got this error, which I search in forum and couldnt find the exact match.

/home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_dict.cxx: In function ‘int G__MakeBigRIPSTree_C_ACLiC_dict__0_3919(G__value*, const char*, G__param*, int)’:
/home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_dict.cxx:95:52: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
MakeBigRIPSTree((char*) G__int(libp->para[0]));
^
g++: error: /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_dict.o: No such file or directory
Error in : Compilation failed!

I understand that it couldnt find the ACLiC, but I dont know how to correct it. And I also post the code so maybe the problem is in the code
Thanks for advance
Özge
MakeBigRIPSTree.hh (7.45 KB)
MakeBigRIPSTree.C (8.05 KB)

Hi,

Which version of ROOT? Which platform? Which compiler?
And we cannot try your code without the missing dependencies

EDIT: BTW, you can keep the intermediate files by setting gDebug=7

Cheers, Bertrand.

Hi sorry to forget the write versions.
I use root version5.34.34 and I am in ubuntu 14.04 LTS, and gcc4.8
and for dependencies, should I attach all include .hh files like this ones ?
“TArtStoreManager.hh”
#include “TArtEventStore.hh”
#include “TArtBigRIPSParameters.hh”
#include "TArtDALIParameters.hh

edit I make
gDebug =7
.L MakeBigRipsTree.C+
and I got this answer

g++: error: /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_dict.o: No such file or directory
Error in : Compilation failed!
/home/ozge/SEASTAR/root/bin/rootcint --lib-list-prefix=/home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_map -f /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_dict.cxx -c -p -I/home/ozge/SEASTAR/root/include -I/home/ozge/SEASTAR/exp/anaroot_15/include -I/home/ozge/SEASTAR/root/include -D__ACLIC__ /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree.C /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_linkdef.h
cd /home/ozge/SEASTAR/exp/users/offlineuser/./macros ; g++ -c -O2 -pipe -m64 -W -Woverloaded-virtual -fPIC -pthread -I/home/ozge/SEASTAR/root/include -I/home/ozge/SEASTAR/exp/anaroot_15/include -I/home/ozge/SEASTAR/root/include -I/home/ozge/SEASTAR/exp/users/offlineuser/./macros -I/home/ozge/SEASTAR/exp/users/offlineuser -D__ACLIC__ /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_dict.cxx ; g++ /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_dict.o -shared -Wl,-soname,MakeBigRIPSTree_C.so -m64 -O2 -Wl,–no-undefined -Wl,–as-needed /home/ozge/SEASTAR/root/lib/libCint.so /home/ozge/SEASTAR/root/lib/libCore.so /home/ozge/SEASTAR/root/lib/libRint.so /home/ozge/SEASTAR/root/lib/libMathCore.so /home/ozge/SEASTAR/root/lib/libThread.so /home/ozge/SEASTAR/root/lib/libRIO.so /home/ozge/SEASTAR/root/lib/libXMLParser.so /home/ozge/SEASTAR/exp/anaroot_15/lib/libanaroot.so /home/ozge/SEASTAR/root/lib/libNet.so /home/ozge/SEASTAR/root/lib/libTree.so /home/ozge/SEASTAR/root/lib/libMatrix.so /home/ozge/SEASTAR/root/lib/libHist.so /home/ozge/SEASTAR/root/lib/libGraf.so /home/ozge/SEASTAR/root/lib/libGpad.so /home/ozge/SEASTAR/root/lib/libGraf3d.so /home/ozge/SEASTAR/root/lib/libTreePlayer.so /home/ozge/SEASTAR/root/lib/libPhysics.so -o /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C.so
cd /home/ozge/SEASTAR/exp/users/offlineuser/./macros ; g++ -c -pipe -m64 -W -Woverloaded-virtual -fPIC -pthread -I/home/ozge/SEASTAR/root/include -I/home/ozge/SEASTAR/exp/anaroot_15/include -I/home/ozge/SEASTAR/root/include -I/home/ozge/SEASTAR/exp/users/offlineuser/./macros -I/home/ozge/SEASTAR/exp/users/offlineuser -D__ACLIC__ /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_dict.cxx; g++ /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_dict.o -m64 -O2 -Wl,–no-undefined -Wl,–as-needed -o /home/ozge/SEASTAR/exp/users/offlineuser/./macros/MakeBigRIPSTree_C_ACLiC_exec /home/ozge/SEASTAR/root/lib/libCint.so /home/ozge/SEASTAR/root/lib/libCore.so /home/ozge/SEASTAR/root/lib/libRint.so /home/ozge/SEASTAR/root/lib/libMathCore.so /home/ozge/SEASTAR/root/lib/libThread.so /home/ozge/SEASTAR/root/lib/libRIO.so /home/ozge/SEASTAR/root/lib/libXMLParser.so /home/ozge/SEASTAR/exp/anaroot_15/lib/libanaroot.so /home/ozge/SEASTAR/root/lib/libNet.so /home/ozge/SEASTAR/root/lib/libTree.so /home/ozge/SEASTAR/root/lib/libMatrix.so /home/ozge/SEASTAR/root/lib/libHist.so /home/ozge/SEASTAR/root/lib/libGraf.so /home/ozge/SEASTAR/root/lib/libGpad.so /home/ozge/SEASTAR/root/lib/libGraf3d.so /home/ozge/SEASTAR/root/lib/libTreePlayer.so /home/ozge/SEASTAR/root/lib/libPhysics.so -lm -ldl -pthread -rdynamic

Özge

Hi,

the file TArtStoreManager.hh seems to be missing from your reproducer. Can you make your example stand alone?

Cheers,
Danilo

Try:
void MakeBigRIPSTree(const char *infile, const char *outfile=“bigrips.root”){

first,
Hi Danilo , I dont understant what you say " Can you make your example stand alone?" what should i do to make it alone ?
second,
Hi Pepe le pew, I tried that one is not working still getting the same error.
Özge

What we mean with “standalone” is a minimal example we could run to reproduce your problem: right now this is not the case as a file is missing.

Hi I erase some lines just left the TArtStore ones. and remove other files
and I attach the very simple version in attachments
my code is :

#include
#include
#include
#include
#include “TArtStoreManager.hh”
#include “TSystem.h”
#include “TTree.h”
#include “TFile.h”
#include “TClonesArray.h”
#include “TVector3.h”
#include “signal.h”
using namespace std;
bool stoploop = false;
void stop_interrupt(){
printf(“keyboard interrupt\n”);
stoploop = true;
}
void Maketry( char *infile, char *outfile=“bigrips.root”){
TArtStoreManager * sman = TArtStoreManager::Instance();
cout<<“Writing the tree.”<<endl;
fout->Write();
fout->Close();
}
TArtRawEventObject.hh (1.9 KB)
TArtRawFADCDataObject.hh (1021 Bytes)
TArtRawFeminosDataObject.hh (1.8 KB)
TArtRawScalerObject.hh (1.11 KB)
TArtRawSegmentObject.hh (2.87 KB)

the rest lib files are this ones. TArtStoreman… is main one others are connected to that one

and gives the same error I also add full replyof the error message as error_Maketry
/home/ozge/SEASTAR/exp/users/offlineuser/./macros/Maketry_C_ACLiC_dict.cxx: In function ‘int G__Maketry_C_ACLiC_dict__0_3225(G__value*, const char*, G__param*, int)’:
/home/ozge/SEASTAR/exp/users/offlineuser/./macros/Maketry_C_ACLiC_dict.cxx:95:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Maketry((char*) G__int(libp->para[0]));
^
g++: error: /home/ozge/SEASTAR/exp/users/offlineuser/./macros/Maketry_C_ACLiC_dict.o: No such file or directory
Error in : Compilation failed!
error_Maketry.txt (14.7 KB)
TArtStoreManager.hh (850 Bytes)
TArtCore.hh (711 Bytes)
TArtRawDataObject.hh (1.59 KB)

Looking at your “error_Maketry.txt” file:

  1. there’s an error which says: ‘fout’ was not declared in this scope,
  2. change “char *” into “const char *” in order to get fewer warnings.

Hi it gives that error because its my version of small code , Actually we try this macros the big one in the first msg it works in other computers, so probably i have same compilation error rather than codding. since error starts with g++ . is there any method to understand, incompatibility of g++ with root ? should i upgrade g++ or anything else ?

From your “Maketry”, remove the lines “fout->Write();” and “fout->Close();” (apparently you nowhere define the “fout” variable) and then try again.

ok I did what u said (remove fout and change char* to const char*) and this is the part of error message :

/home/ozge/SEASTAR/exp/users/offlineuser/./macros/Maketry_C_ACLiC_dict.o: In function Maketry(char const*, char const*)': Maketry_C_ACLiC_dict.cxx:(.text+0x47): undefined reference toTArtStoreManager::Instance()’
/home/ozge/SEASTAR/exp/users/offlineuser/./macros/Maketry_C_ACLiC_dict.o: In function _GLOBAL__sub_I_Maketry_C_ACLiC_dict.cxx': Maketry_C_ACLiC_dict.cxx:(.text.startup+0x3e): undefined reference toROOTDict::GenerateInitInstance(TArtRawEventObject const*)'
collect2: error: ld returned 1 exit status
Error in : Compilation failed!

You (first) need to load the library which provides all your classes (e.g. the “TArtStoreManager” implementation).

I made it with gSystyem->Load(“libraryname.hh”) but it didnt work.
thanks for your helping by the way
Özge

You need to load a shared library with your classes, something like:
root [0] .L libraryname.so
or:
root [0] gSystem->Load(“libraryname.so”)

okey but I try the basic test code in the root file that I think everybody has the same ones, in root/test/dt_DrawTest.C and this also gives the same error like that

Info in TUnixSystem::ACLiC: creating shared library /home/ozge/SEASTAR/root/test/./dt_DrawTest_C.so
In file included from /home/ozge/SEASTAR/root/test/dt_DrawTest_C_ACLiC_dict.h:34:0,
from /home/ozge/SEASTAR/root/test/dt_DrawTest_C_ACLiC_dict.cxx:17:
/home/ozge/SEASTAR/root/test/./dt_DrawTest.C: In function ‘void DrawSkippable(TTree*, const char*, const char*, Bool_t)’:
/home/ozge/SEASTAR/root/test/./dt_DrawTest.C:19:15: error: invalid use of incomplete type ‘class TH1’
if (h) h->SetTitle(Form(“histo made from T->Draw(”%s")",what));
^
In file included from /home/ozge/SEASTAR/root/include/TTree.h:66:0,
from /home/ozge/SEASTAR/root/test/./dt_DrawTest.C:1,
from /home/ozge/SEASTAR/root/test/dt_DrawTest_C_ACLiC_dict.h:34,
from /home/ozge/SEASTAR/root/test/dt_DrawTest_C_ACLiC_dict.cxx:17:
/home/ozge/SEASTAR/root/include/TVirtualTreePlayer.h:30:7: error: forward declaration of ‘class TH1’
class TH1;
^
In file included from /home/ozge/SEASTAR/root/test/dt_DrawTest_C_ACLiC_dict.h:34:0,
from /home/ozge/SEASTAR/root/test/dt_DrawTest_C_ACLiC_dict.cxx:17:
/home/ozge/SEASTAR/root/test/./dt_DrawTest.C: In function ‘void DrawSkippable(TTree*, const char*, const char*, const char*, Bool_t)’:
/home/ozge/SEASTAR/root/test/./dt_DrawTest.C:34:15: error: invalid use of incomplete type ‘class TH1’
if (h) h->SetTitle(Form(“histo made from T->Draw(”%s","%s")",what,cond));
^
In file included from /home/ozge/SEASTAR/root/include/TTree.h:66:0,
from /home/ozge/SEASTAR/root/test/./dt_DrawTest.C:1,
from /home/ozge/SEASTAR/root/test/dt_DrawTest_C_ACLiC_dict.h:34,
from /home/ozge/SEASTAR/root/test/dt_DrawTest_C_ACLiC_dict.cxx:17:
/home/ozge/SEASTAR/root/include/TVirtualTreePlayer.h:30:7: error: forward declaration of ‘class TH1’
class TH1;
^
g++: error: /home/ozge/SEASTAR/root/test/dt_DrawTest_C_ACLiC_dict.o: No such file or directory
Error in : Compilation failed!

or more basic one dt_build.C

Info in TUnixSystem::ACLiC: creating shared library /home/ozge/SEASTAR/root/test/./dt_build_C.so
In file included from /home/ozge/SEASTAR/root/test/dt_build_C_ACLiC_dict.h:34:0,
from /home/ozge/SEASTAR/root/test/dt_build_C_ACLiC_dict.cxx:17:
/home/ozge/SEASTAR/root/test/./dt_build.C:1:1: error: expected unqualified-id before ‘{’ token
{
^
/home/ozge/SEASTAR/root/test/dt_build_C_ACLiC_dict.cxx: In function ‘int G__dt_build_C_ACLiC_dict__0_2180(G__value*, const char*, G__param*, int)’:
/home/ozge/SEASTAR/root/test/dt_build_C_ACLiC_dict.cxx:82:38: error: ‘gSystem’ was not declared in this scope
G__letint(result7, 105, (long) gSystem->Exit());
^
g++: error: /home/ozge/SEASTAR/root/test/dt_build_C_ACLiC_dict.o: No such file or directory
Error in : Compilation failed!

Hi,

dt_DrawTest.C has not been tested with ACliC, to get to work, you need to add#include "TH1.h"For testing ACLiC, I recommend you talk a look at the file in $ROOTSYS/tutorials and $ROOTSYS/tutorials/hsimple.C in particular.

Cheers,
Philippe.

okey I try hsimple.C , obviously ACliC is working and dr_Draft is also working.

.L hsimple.C+
Warning in : /home/hj/root/tutorials is not writable!
Warning in : Output will be written to /tmp/nucle
Info in TUnixSystem::ACLiC: creating shared library /tmp/nucle//home/hj/root/tutorials/./hsimple_C.so

but my problem is stable still, I try to reinstall root in other machine. Now I will try to load libraries again. t o update this is my last error msg

/home/nucle/SEASTAR/exp/users/clem/./macros/MakeBigRIPSTree_C_ACLiC_dict.o: In function MakeBigRIPSTree(int)': MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2688): undefined reference toTArtStoreManager::Instance()'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x26a5): undefined reference to TArtEventStore::TArtEventStore()' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x26de): undefined reference toTArtBigRIPSParameters::Instance(char const*, char const*)'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x26f0): undefined reference to TArtBigRIPSParameters::LoadParameter(char*)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x26ff): undefined reference toTArtBigRIPSParameters::LoadParameter(char*)'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x270e): undefined reference to TArtBigRIPSParameters::LoadParameter(char*)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x271d): undefined reference toTArtBigRIPSParameters::LoadParameter(char*)'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2732): undefined reference to TArtBigRIPSParameters::SetFocusPosOffset(int, double)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2747): undefined reference toTArtCalibPID::TArtCalibPID()'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x275c): undefined reference to TArtCalibPID::TArtCalibPID()' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2771): undefined reference toTArtRecoPID::TArtRecoPID()'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2779): undefined reference to TArtBigRIPSParameters::PrintListOfPPACPara()' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x27ee): undefined reference toTArtRecoPID::DefineNewRIPS(int, int, char*, char*)'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2813): undefined reference to TArtRecoPID::DefineNewRIPS(int, int, char*, char*)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2838): undefined reference toTArtRecoPID::DefineNewRIPS(int, int, char*, char*)'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x285d): undefined reference to TArtRecoPID::DefineNewRIPS(int, int, char*, char*)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x28d3): undefined reference toTArtRecoPID::DefineNewTOF(char*, char*, double, int)'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x28f9): undefined reference to TArtRecoPID::DefineNewTOF(char*, char*, double, int)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2961): undefined reference toTArtRecoPID::DefineNewBeam(TArtRIPS*, TArtTOF*, char*)'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2978): undefined reference to TArtRecoPID::DefineNewBeam(TArtRIPS*, TArtTOF*, char*)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2994): undefined reference toTArtRecoPID::DefineNewBeam(TArtRIPS*, TArtRIPS*, TArtTOF*, char*)'
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x29ab): undefined reference to TArtRecoPID::DefineNewBeam(TArtRIPS*, TArtTOF*, char*)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x29c5): undefined reference toTArtRecoPID::DefineNewBeam(TArtRIPS*, TArtTOF*, char*)‘
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x29df): undefined reference to TArtRecoPID::DefineNewBeam(TArtRIPS*, TArtRIPS*, TArtTOF*, char*)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x2a1e): undefined reference tovtable for TArtEventInfo’
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text+0x30dd): undefined reference to TArtEventStore::GetNextEvent()' /home/nucle/SEASTAR/exp/users/clem/./macros/MakeBigRIPSTree_C_ACLiC_dict.o: In function_GLOBAL__sub_I_MakeBigRIPSTree_C_ACLiC_dict.cxx’:
MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text.startup+0x3e): undefined reference to ROOT::GenerateInitInstance(TArtRawEventObject const*)' MakeBigRIPSTree_C_ACLiC_dict.cxx:(.text.startup+0x5f): undefined reference toROOT::GenerateInitInstance(TArtEventInfo const*)'
collect2: error: ld returned 1 exit status
Error in : Compilation failed!

Hi,

In which library did you request/build the dictionary for TArtStoreManager? In which library did you include the object file containing the implementation of TArtBigRIPSParameters::LoadParameter(char*)?

Philippe.