Problem while running code

Hello,
I’ve been using Root only for a few months, I have ROOT Version:_ 6.18/04 installed on the Windows 10 subsystem of Ubuntu 18.04.

While trying to run a .c++ file provided by my professor, I get the following error

Processing letturaFile.C++("lens.txt",40,200,300)...
Info in <TUnixSystem::ACLiC>: creating shared library /home/ubuntu/uni/./letturaFile_C.so
Warning in cling::IncrementalParser::CheckABICompatibility():
  Possible C++ standard library mismatch, compiled with __GLIBCXX__ '20181206'
  Extraction of runtime standard library version was: '20191114'
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
Error in <TGHScrollBar::TGHScrollBar>: arrow_*.xpm not found
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
Error in <TGVScrollBar::TGVScrollBar>: arrow_*.xpm not found
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libtiff.so.5: cannot open shared object file: No such file or directory

 *** Break *** segmentation violation
 Generating stack trace...
 0x00007f9b199d7399 in TGCompositeFrame::MapSubwindows() + 0xa9 from /home/ubuntu/Applications/root/lib/libGui.so.6.18.04
 0x00007f9b199d7399 in TGCompositeFrame::MapSubwindows() + 0xa9 from /home/ubuntu/Applications/root/lib/libGui.so.6.18.04
 0x00007f9b19ac9e92 in TRootCanvas::CreateCanvas(char const*) + 0x1982 from /home/ubuntu/Applications/root/lib/libGui.so.6.18.04
 0x00007f9b19aca95c in TRootCanvas::TRootCanvas(TCanvas*, char const*, int, int, unsigned int, unsigned int) + 0x7c from /home/ubuntu/Applications/root/lib/libGui.so.6.18.04
 0x00007f9b19ad7dee in TRootGuiFactory::CreateCanvasImp(TCanvas*, char const*, int, int, unsigned int, unsigned int) + 0x4e from /home/ubuntu/Applications/root/lib/libGui.so.6.18.04
 0x00007f9b1bf2f3e1 in TCanvas::Constructor(char const*, char const*, int, int, int, int) + 0x2b1 from /home/ubuntu/Applications/root/lib/libGpad.so.6.18.04
 0x00007f9b1bf3177f in TCanvas::TCanvas(char const*, char const*, int, int, int, int) + 0xef from /home/ubuntu/Applications/root/lib/libGpad.so.6.18.04
 0x00007f9b1b222384 in letturaFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double const&, double const&, double const&) + 0x314 from /home/ubuntu/uni/letturaFile_C.so
 0x00007f9b2b6410b8 in <unknown function>
 0x00007f9b25ab0440 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const + 0x380 from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007f9b25a43217 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) + 0xa7 from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007f9b25a4487f in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) + 0x1df from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007f9b25a44b27 in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) + 0x177 from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007f9b25b07acd in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) + 0x1ed from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007f9b259c3a2e in <unknown> from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007f9b259d81af in <unknown> from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007f9b259cc8d7 in <unknown> from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007f9b2acdff48 in TApplication::ExecuteFile(char const*, int*, bool) + 0x528 from /home/ubuntu/Applications/root/lib/libCore.so.6.18
 0x00007f9b2acdf6ec in TApplication::ProcessLine(char const*, bool, int*) + 0xa7c from /home/ubuntu/Applications/root/lib/libCore.so.6.18
 0x00007f9b2b1e1912 in TRint::ProcessLineNr(char const*, char const*, int*) + 0x62 from /home/ubuntu/Applications/root/lib/libRint.so.6.18
 0x00007f9b2b1e3209 in TRint::Run(bool) + 0x1a9 from /home/ubuntu/Applications/root/lib/libRint.so.6.18
 0x00007f9b2b800a3c in <unknown> from /home/ubuntu/Applications/root/bin/root.exe
 0x00007f9b2a141b97 in __libc_start_main + 0xe7 from /lib/x86_64-linux-gnu/libc.so.6
 0x00007f9b2b800a9a in _start + 0x2a from /home/ubuntu/Applications/root/bin/root.exe

I’m assuming the error isn’t caused by the file itself, but I can’t figure out the problem. I tried to look at old topics, but I haven’t found a solution yet.
Any help is very much welcome, thanks in advance

Try: sudo apt-get install libtiff5

Thanks for the answer,
I tried that, now the error is similar, although shorter:

Processing letturaFile.C++("lens.txt",40,200,300)...
Info in <TUnixSystem::ACLiC>: creating shared library /home/ubuntu/uni/./letturaFile_C.so
Warning in cling::IncrementalParser::CheckABICompatibility():
  Possible C++ standard library mismatch, compiled with __GLIBCXX__ '20181206'
  Extraction of runtime standard library version was: '20191114'
Warning in <Fit>: Fit data is empty

 *** Break *** segmentation violation
 Generating stack trace...
 0x00007fefb5cb0440 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const + 0x380 from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007fefb5c43217 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) + 0xa7 from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007fefb5c4487f in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) + 0x1df from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007fefb5c44b27 in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) + 0x177 from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007fefb5d07acd in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) + 0x1ed from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007fefb5bc3a2e in <unknown> from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007fefb5bd81af in <unknown> from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007fefb5bcc8d7 in <unknown> from /home/ubuntu/Applications/root/lib/libCling.so
 0x00007fefbaedff48 in TApplication::ExecuteFile(char const*, int*, bool) + 0x528 from /home/ubuntu/Applications/root/lib/libCore.so.6.18
 0x00007fefbaedf6ec in TApplication::ProcessLine(char const*, bool, int*) + 0xa7c from /home/ubuntu/Applications/root/lib/libCore.so.6.18
 0x00007fefbb3e1912 in TRint::ProcessLineNr(char const*, char const*, int*) + 0x62 from /home/ubuntu/Applications/root/lib/libRint.so.6.18
 0x00007fefbb3e3209 in TRint::Run(bool) + 0x1a9 from /home/ubuntu/Applications/root/lib/libRint.so.6.18
 0x00007fefbba00a3c in <unknown> from /home/ubuntu/Applications/root/bin/root.exe
 0x00007fefba341b97 in __libc_start_main + 0xe7 from /lib/x86_64-linux-gnu/libc.so.6
 0x00007fefbba00a9a in _start + 0x2a from /home/ubuntu/Applications/root/bin/root.exe
Root >

That’s for the author of “letturaFile.C” and / or “lens.txt” to inspect.

The issue here is that other students executing those files didn’t run into similar problems

ROOT binaries, which you use, do not fully correspond to your operating system.

The ROOT team provides ready-to-use binary distributions for some systems, including various Ubuntu versions, which you just need to download and unpack (see “Using binaries” therein).

I have installed Release 6.20/04 for Ubuntu 18 gcc7.5, do you know what should I have installed instead/how to know what to install? Because besides Ubuntu version I dont know what to check.

Check:
cat /etc/issue*
gcc --version

I got:

Ubuntu 18.04.4 LTS \n \l

Ubuntu 18.04.4 LTS`

and

gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

That I think is the version I installed Root for.

So it should be fine (the “library mismatch” warning is just due to the fact that, in the meantime, Ubuntu has upgraded its libraries).

I have noticed another thing though, when I start Root the message is “Welcome to ROOT 6.18/04” and gROOT->GetVersion() seems to confirm this.
That seems to me very strange, considering the file I used very recently is the one called “root_v6.20.02.Linux-ubuntu18-x86_64-gcc7.5.tar.gz”.

In you previous post, you said “I have installed Release 6.20/04”.
Now you say “I used very recently … root_v6.20.02…”.
And your running ROOT says “6.18/04”.
Why don’t you clean up that mess on your computer?

I feel like I have expressed myself very poorly. I recently had to uninstall Ubuntu, and, after reinstalling, I have installed the binary called “Ubuntu 18 gcc7.5”. I’m sure I used that while installing, since I still have the file downloaded with that name.
I tried just now to uninstall and reinstall.
To uninstall I used:

sudo apt-get purge root-system* root-plugin* libroot*

I then downloaded again the binary called “Ubuntu 18 gcc7.5” and compiled it.

Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libMathCore_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libMatrix_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libPhysics_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libHist_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGraf_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGpad_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGraf3d_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libEG_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGeom_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libVMC_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libXMLParser_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libUnfold_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRHTTP_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRHTTPSniff_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libHistPainter_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libNet_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libTree_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libMultiProc_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libXMLIO_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libTreePlayer_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libMinuit_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libROOTVecOps_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libROOTDataFrame_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libTMVA_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libPyMVA_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRDAVIX_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGui_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libFitPanel_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libProofDraw_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRMySQL_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libUnuran_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libQuadp_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGeomPainter_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGenetic_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGed_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRGL_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libEve_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libTreeViewer_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libPgSQL_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libFoam_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRooFitCore_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libHistFactory_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libSpectrum_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libHtml_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGuiHtml_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libTMVAGui_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libPostscript_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libFumili_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libX3d_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libSPlot_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libHbook_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libEGPythia8_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRooFit_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRooStats_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGeomBuilder_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libProof_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libFITSIO_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRecorder_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libFFTW_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGuiBld_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libSQLIO_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGX11_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGX11TTF_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libProofPlayer_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libASImage_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libMathMore_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libProofx_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libNetx_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libSpectrumPainter_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libMinuit2_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libMLP_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGenVector_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGenVector_G__GenVector32_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libNetxNG_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libRootAuth_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libASImageGui_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGdml_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libProofBench_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libGviz3d_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libSmatrix_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libSmatrix_G__Smatrix32_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libPyROOT_rdict.pcm' is both in Module extension and in File system.
Error in <TCling::RegisterRdictForLoadPCM>: Rdict '/home/ubuntu/root/lib/libSessionViewer_rdict.pcm' is both in Module extension and in File system.
   ------------------------------------------------------------------
  | Welcome to ROOT 6.20/02                        https://root.cern |
  | (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Mar 15 2020, 15:25:34                 |
  | From tags/v6-20-02@v6-20-02                                      |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

Running the file .c I get,

Warning in <TFile::Init>: no StreamerInfo found in /home/ubuntu/root/lib/libMathCore_rdict.pcm therefore preventing schema evolution when reading this file. The file was produced with version 6.14/02 of ROOT.
root [0]
Processing letturaFile.C++("lens.txt",40,200,300)...
Info in <TUnixSystem::ACLiC>: creating shared library /home/ubuntu/uni/./letturaFile_C.so
Warning in <TFile::Init>: no StreamerInfo found in /home/ubuntu/root/lib/libMatrix_rdict.pcm therefore preventing schema evolution when reading this file. The file was produced with version 6.14/02 of ROOT.
Warning in <TFile::Init>: no StreamerInfo found in /home/ubuntu/root/lib/libHist_rdict.pcm therefore preventing schema evolution when reading this file. The file was produced with version 6.14/02 of ROOT.
Warning in <TFile::Init>: no StreamerInfo found in /home/ubuntu/root/lib/libGraf_rdict.pcm therefore preventing schema evolution when reading this file. The file was produced with version 6.14/02 of ROOT.
Warning in <TFile::Init>: no StreamerInfo found in /home/ubuntu/root/lib/libGpad_rdict.pcm therefore preventing schema evolution when reading this file. The file was produced with version 6.14/02 of ROOT.
Warning in <TFile::Init>: no StreamerInfo found in /home/ubuntu/root/lib/libGX11_rdict.pcm therefore preventing schema evolution when reading this file. The file was produced with version 6.14/02 of ROOT.
Warning in <TFile::Init>: no StreamerInfo found in /home/ubuntu/root/lib/libGui_rdict.pcm therefore preventing schema evolution when reading this file. The file was produced with version 6.14/02 of ROOT.
Warning in <TFile::Init>: no StreamerInfo found in /home/ubuntu/root/lib/libGX11TTF_rdict.pcm therefore preventing schema evolution when reading this file. The file was produced with version 6.14/02 of ROOT.
Warning in <Fit>: Fit data is empty

 *** Break *** segmentation violation
 Generating stack trace...
 0x00007f123fd24210 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const + 0x380 from /home/ubuntu/root/lib/libCling.so
 0x00007f123fcb3286 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) + 0x96 from /home/ubuntu/root/lib/libCling.so
 0x00007f123fcb4909 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) + 0x209 from /home/ubuntu/root/lib/libCling.so
 0x00007f123fcb4b8a in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) + 0x10a from /home/ubuntu/root/lib/libCling.so
 0x00007f123fd7495d in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) + 0x1ed from /home/ubuntu/root/lib/libCling.so
 0x00007f123fc23d4e in <unknown> from /home/ubuntu/root/lib/libCling.so
 0x00007f123fc35cef in <unknown> from /home/ubuntu/root/lib/libCling.so
 0x00007f123fc361c2 in <unknown> from /home/ubuntu/root/lib/libCling.so
 0x00007f1245269988 in TApplication::ExecuteFile(char const*, int*, bool) + 0x528 from /home/ubuntu/root/lib/libCore.so.6.20
 0x00007f12452691b0 in TApplication::ProcessLine(char const*, bool, int*) + 0xa30 from /home/ubuntu/root/lib/libCore.so.6.20
 0x00007f12457dff92 in TRint::ProcessLineNr(char const*, char const*, int*) + 0x62 from /home/ubuntu/root/lib/libRint.so.6.20
 0x00007f12457e1889 in TRint::Run(bool) + 0x1a9 from /home/ubuntu/root/lib/libRint.so.6.20
 0x00007f1245e00a3c in <unknown> from /home/ubuntu/root/bin/root.exe
 0x00007f1244741b97 in __libc_start_main + 0xe7 from /lib/x86_64-linux-gnu/libc.so.6
 0x00007f1245e00a9a in _start + 0x2a from /home/ubuntu/root/bin/root.exe
Root > Warning in <TFile::Init>: no StreamerInfo found in /home/ubuntu/root/lib/libHistPainter_rdict.pcm therefore preventing schema evolution when reading this file. The file was produced with version 6.14/02 of ROOT.

I feel like you are quite right about it being a mess, but I honestly have no clue how to solve it/clean it.

Try to find the origin of these offending files:
locate libMathCore_rdict.pcm

Try to completely destroy the current distribution:
sudo rm -rf /home/ubuntu/root/

If this is a ready-to-use “binary distribution” … what do you mean by “I … compiled it”?

I meant to say I run the pre-compiled installer (English is not my first language, as you might have guessed).

I tried to destroy it and install it again and it did the trick, the version is the right one now.
I still run into the Fit data is empty error followed by the whole *** Break *** segmentation violation.
and I’m not sure if it caused by the file or by something else.

Anyways, you’ve been very very helpful, thank you so much, at least now I’m not running into problems caused by weird old files and similar issues.

The “segmentation violation” is most probably a consequence of “Fit data is empty”.

Okay, I’ll se what I can find, thank you again

In your first posts, I can see another ROOT distribution which you’d better completely destroy, too:
sudo rm -rf /home/ubuntu/Applications/root

BTW. If you do not manage to fix the “Fit data is empty” problem yourself, you will need to attach both “letturaFile.C” and “lens.txt” files here for inspection.

If I want to discuss the code itself do I need another topic or can I ask in this one?

It doesn’t really matter. Just attach it here.