Hello!
I has similar problem with linker again.
In previous case error happened because I used root cern compiled in Visual Studio, but compiled my program in MinGW compiler. When I started to compile my program using VS compiler this error disappeared.
About current case.
My system: Scientific Linux release 7.2 (Nitrogen).
My gcc: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4).
I downloaded root_v6.06.08.Linux-slc6-x86_64-gcc4.8.tar.gz file.
Then I typed the next commands in terminal:
tar zxvf root_v6.06.08.source.tar.gz
cd root-6.06.08/
./configure
make
As a result I got this confirmarion:
" ============================================================
=== ROOT BUILD SUCCESSFUL. ===
=== Run 'source bin/thisroot.[c]sh' before starting ROOT ===
============================================================
"
Then:
cd bin
source thisroot.sh
I launched root and typed .demo. All work very well.
So, I installed root cern correctly.
Then I tried to compile simple project in QtCreator.
About QtCreator: Qt Creator 4.0.2 Based on Qt 5.7.0 (GCC 4.9.1 20140922 (Red Hat 4.9.1-10), 64 bit).
I downloaded this framework from qt.io/download-open-source/
When I added a root lib I got an error.
Code for .pro file:
QT += core
QT -= gui
CONFIG += c++11
TARGET = Test_lib_links
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += "/home/darkside/Vlad_Programs/root-6.06.08/include"
LIBS += -L"/home/darkside/Vlad_Programs/root-6.06.08/lib" \
-lCore \
-lCling \
-lASImage \
-lASImageGui \
-lASImageGui \
-lcomplexDict \
-ldequeDict \
-lEG \
-lEve \
-lFitPanel \
-lFoam \
-lforward_listDict \
-lFTGL \
-lFumili \
-lGed \
-lGenetic \
-lGenVector \
-lGeomBuilder \
-lGeomPainter \
-lGeom \
-lGLEW \
-lGpad \
-lGraf3d \
-lGraf \
-lGuiBld \
-lGuiHtml \
-lGui \
-lGviz3d \
-lGX11 \
-lGX11TTF \
-lHbook \
-lHistPainter \
-lHist \
-lHtml \
-llistDict \
-lmap2Dict \
-lmapDict \
-lMathCore \
-lMatrix \
-lMemStat \
-lMinuit \
-lMLP \
-lmultimap2Dict \
-lmultimapDict \
-lMultiProc \
-lmultisetDict \
-lNet \
-lNew \
-lPhysics \
-lPostscript \
-lProofBench \
-lProofDraw \
-lProofPlayer \
-lProof \
-lQuadp \
-lRecorder \
-lRGL \
-lRint \
-lRIO \
-lRootAuth \
-lSessionViewer \
-lsetDict \
-lSmatrix \
-lSpectrumPainter \
-lSpectrum \
-lSPlot \
-lSQLIO \
-lSrvAuth \
-lThread \
-lTMVAGui \
-lTMVA \
-lTreePlayer \
-lTree \
-lTreeViewer \
-lunordered_mapDict \
-lunordered_multimapDict \
-lunordered_multisetDict \
-lunordered_setDict \
-lvalarrayDict \
-lvectorDict \
-lVMC \
-lX3d \
-lXMLIO
.cpp file:
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
cout << endl << "all is ok" << endl;
return 0;
}
I have this run-time error:
Error in <UnknownClass::InitInterpreter()>: LLVM SYMBOLS ARE EXPOSED TO CLING! This will cause problems; please hide them or dlopen() them after the call to TROOT::InitInterpreter()!
Fatal in <operator delete>: storage area overwritten
aborting
#0 0x00007f05a208cb0c in waitpid () from /lib64/libc.so.6
#1 0x00007f05a2011092 in do_system () from /lib64/libc.so.6
#2 0x00007f05b43a2cd9 in TUnixSystem::StackTrace() () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#3 0x00007f05b4318151 in DefaultErrorHandler(int, bool, char const*, char const*) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#4 0x00007f05b4317bca in ErrorHandler () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#5 0x00007f05b4318002 in Fatal(char const*, char const*, ...) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#6 0x00007f05a9145140 in operator delete(void*) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libNew.so
#7 0x00007f05b25815d6 in clang::driver::toolchains::Linux::Linux(clang::driver::Driver const&, llvm::Triple const&, llvm::opt::ArgList const&) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCling.so
#8 0x00007f05b25583a1 in clang::driver::Driver::getToolChain(llvm::opt::ArgList const&, llvm::StringRef) const () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCling.so
#9 0x00007f05b2560593 in clang::driver::Driver::BuildCompilation(llvm::ArrayRef<char const*>) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCling.so
#10 0x00007f05b2354de6 in (anonymous namespace)::createCIImpl(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, int, char const* const*, char const*, bool) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCling.so
#11 0x00007f05b235781b in cling::CIFactory::createCI(llvm::StringRef, int, char const* const*, char const*) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCling.so
#12 0x00007f05b23d9db5 in cling::IncrementalParser::IncrementalParser(cling::Interpreter*, int, char const* const*, char const*) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCling.so
#13 0x00007f05b23311c8 in cling::Interpreter::Interpreter(int, char const* const*, char const*, bool) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCling.so
#14 0x00007f05b22c3225 in TCling::TCling(char const*, char const*) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCling.so
#15 0x00007f05b22c449e in CreateInterpreter () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCling.so
#16 0x00007f05b42ed3b8 in TROOT::InitInterpreter() () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#17 0x00007f05b42ed736 in ROOT::Internal::GetROOT2() () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#18 0x00007f05a9145175 in operator delete(void*) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libNew.so
#19 0x00007f05b434cf2e in TClassTable::Add(char const*, short, std::type_info const&, TClass* (*)(), int) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#20 0x00007f05b4362b46 in ROOT::TGenericClassInfo::TGenericClassInfo(char const*, int, char const*, int, ROOT::Internal::TInitBehavior const*, TClass* (*)(), int) () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#21 0x00007f05b42c1588 in TMath::ROOT::GenerateInitInstance() () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#22 0x00007f05b425872c in _GLOBAL__sub_I_G__Core.cxx () from /home/darkside/Vlad_Programs/root-6.06.08/lib/libCore.so
#23 0x00007f05b471f3a3 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#24 0x00007f05b471146a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#25 0x0000000000000001 in ?? ()
#26 0x00007ffe94bb8911 in ?? ()
#27 0x0000000000000000 in ?? ()
Press <RETURN> to close this window...
Could you help?
Thank you in advance.
Best regard, Vladislav.