Hello,
Were you able to solve your problem? I tried doing the same procedure you did and cannot even get hsimple to compile initially. I changed the build to:
g++ -O -Wall -fPIC -pthread -I/home/ROOT-STATIC-BUILD/include -c hsimple.cxx
g++ -O hsimple.o -L/home/ROOT-STATIC-BUILD/lib -lRoot \
-lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -o hsimple
and it compiled. However, executing it (on the same computer) leads to a bunch of errors:
[quote]~/root-standalone> ./hsimple
Warning in TClassTable::Add: class TPosixThreadFactory already in TClassTable
Warning in TClassTable::Add: class TPosixThread already in TClassTable
Warning in TClassTable::Add: class TPosixMutex already in TClassTable
Warning in TClassTable::Add: class TPosixCondition already in TClassTable
…
…
Warning in TClassTable::Add: class reverse_iterator<vector<int,allocator >::iterator> already in TClassTable
Error in TPluginManager::FindHandler: Cannot find plugin handler for TVirtualStreamerInfo! Does $ROOTSYS/etc/plugins/TVirtualStreamerInfo exist?
*** Break *** segmentation violation
sh: /home/karthik/etc/gdb-backtrace.sh: not found
*** glibc detected *** ./hsimple: double free or corruption (!prev): 0x0000000003079080 ***[/quote]
I would be interested in knowing how you solved the problem.
Thanks
Karthik.
[quote=“jungwook”]Hi, all
I have been suffering from running a standalone root binary which was linked with static root library named “libRoot.a”.
I have been using hsimple.cxx (found in ROOTSYS/test) for this trial.
The compile commands (compile.sh) looks like following
g++ -O -Wall -fPIC -pthread -I/home/jwshin/apps/root/5.15.06/include/root -c hsimple.cxx
g++ -O hsimple.o -L/home/jwshin/apps/root/5.15.06/lib/root -lRoot -lpcre -lm -ldl -o hsimple
In local, hsimple run and produced the output with no problems.
However, when it was copied to other machine on which no root library were installed, it crashed during invoking hfile.Write() with following error messages.
*** Break *** segmentation violation
sh: /home/jwshin/apps/root/5.15.06/etc/gdb-backtrace.sh: No such file or directory
It was strange to me because if the standalone executable was linked with root’s static library,
I thought there are no root dependencies any more and then it is possible to be executed over GRID or a cluster.
I think that in order to write a root object ( TH, Tree and etc) to a TFile, certain information( in system.rootrc. I guess) should be needed.
If that, is there any solution to embed the information ?
Thanks in advance.[/quote]