iLCSoft / LCIO

Linear Collider I/O
BSD 3-Clause "New" or "Revised" License
17 stars 34 forks source link

Errors generating while installing with ROOT dictionary #148

Closed Saumyenk closed 1 year ago

Saumyenk commented 2 years ago

Hi I was trying to install LCIO with ROOT dictionary on my local machine with Ubuntu-20.04, GCC-9.4.0, CMake-3.16.3, ROOT-6.24/06. I tried installing v02-15-02, v02-15-04 and v02-17 too. The same result I am getting. The commands I used are git checkout v02-17 mkdir build && cd build cmake -DBUILD_ROOTDICT=ON -D CMAKE_CXX_STANDARD=17 .. make -j 10 install I have attached the build-log and the install-log herewith. I would appreciate any help to sort these issues out.

With thanks and regards, Saumyen

build.log install.log

andresailer commented 2 years ago
[ 69%] generating: /home/photoniman/HEP_Packages/LCIO/build/lib/UTIL.cxx /home/photoniman/HEP_Packages/LCIO/build/lib/UTIL.h
In file included from /usr/local/include/TString.h:29,
                 from /usr/local/include/TNamed.h:26,
                 from /usr/local/include/TSystem.h:34,
                 from /home/photoniman/HEP_Packages/LCIO/src/cpp/src/EXAMPLE/lcio_io_benchmark.cc:13:
/usr/local/include/ROOT/RStringView.hxx:32:10: error: conflicting declaration of template ‘template<class _CharT, class _Traits> using basic_string_view = std::experimental::fundamentals_v1::basic_string_view<_CharT, _Traits>’
   32 |    using basic_string_view = ::std::experimental::basic_string_view<_CharT,_Traits>;
      |          ^~~~~~~~~~~~~~~~~

I think this means you are using different c++ standards to compile ROOT and LCIO. Was ROOT also compiled with c++17?

Saumyenk commented 2 years ago

Could you (if possible) tell me how I can check that? It was compiled long back and I didn't give much attention to that too.

Thanks a lot. Saumyen

tmadlener commented 2 years ago

You can do root-config --has-cxx17 to check whether it has been built with c++17.

Saumyenk commented 2 years ago

Thanks for the command. Yes, you are right. ROOT was installed with C++14. So now I tried installing LCIO with C++14 and it was successful. Thank you so much. Regards, Saumyen