ROOT Version: 6.26/10
Platform: Debian GNU/Linux 11
Hi, all I downloaded and compiled and installed two versions of root, 6.26/10 and 6.28/04, but neither of them can find the TMCParticle.h header file. Neither under include/ nor under montecarlo/. Is there a problem with one of my steps?
I’ve also searched and looked at questions about the TMCParticle keyword, but they all seem to have the header file and are just having trouble using it, which I don’t have, plus I’ve added libPythia6.so to lib/, but haven’t done a recompile yet (because I’m not very familiar with cmake). Worried about what might happen if I go further.
If there’s any more necessary information that I haven’t provided, please leave a direct message and I’ll respond and fill it in promptly!
I would say that, for Pythia6 support to be enabled in ROOT, you have to specify
-Dpythia6=ON on your CMake command line and make sure that the ROOT build configuration is able to find the installation path of Pythia headers / libraries. Could you please post here CMake’s output?
Also see this related post: How to install ROOT with Pythia6.
- cmake -Dpythia6=ON -DPYTHIA6_DIR=/usr/local/Software/pythia6 …/root_src
-- Detected ROOT_VERSION 6.28.04
-- Checking internet connectivity
-- Checking internet connectivity - failed: will not automatically download external dependencies
-- No internet connection, disabling the 'clad' option
-- Looking for Python
-- Found Python3: /usr/bin/python3.9 (found version "3.9.2") found components: Interpreter Development NumPy Development.Module Development.Embed
-- Could NOT find Python2 (missing: Python2_NumPy_INCLUDE_DIRS NumPy) (found version "2.7.18")
-- Found GCC. Major version 10, minor version 2
-- ROOT Platform: linux
-- ROOT Compiler: GNU 10.2.1
-- ROOT Processor: x86_64
-- ROOT Architecture: linuxx8664gcc
-- Build Type: 'Release' (flags = '-O3 -DNDEBUG')
-- Compiler Flags: -std=c++14 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
-- ROOT default compression algorithm: zlib
-- PyROOT will be built for versions 3.9.2 (Main) and 2.7.18
-- Looking for ZLib
-- Looking for Freetype
-- Looking for PCRE
-- Building LZMA version 5.2.4 included in ROOT itself
-- Looking for X11
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Looking for OpenGL
-- Looking for GLEW
-- Looking for LibXml2
-- Looking for MySQL
-- Looking for Pythia6
-- Looking for Pythia8
-- Looking for FFTW3
-- Looking for CFITSIO
-- No internet connection, disabling 'builtin_xrootd' option
-- No internet connection, disabling 'builtin_tbb' and 'imt' options
-- No internet connection, disabling the 'builtin_vdt' option
-- Looking for VDT
-- Could NOT find Vdt (missing: VDT_LIBRARY) (found suitable version "0.4", minimum required is "0.4")
-- VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH
-- Cannot select cudnn without selecting cuda or tmva-gpu. Option is ignored
-- Building LLVM in 'Release' mode.
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Found Python3: /usr/bin/python3.9 (found suitable version "3.9.2", minimum required is "3.0") found components: Interpreter
-- Targeting X86
-- Targeting NVPTX
-- Clang version: 13.0.0
-- Not building amdgpu-arch: hsa-runtime64 not found
-- Cling version (from VERSION file): ROOT_1.0~dev
-- Cling will look for C++ headers in '/usr/include/c++/10:/usr/include/x86_64-linux-gnu/c++/10:/usr/include/c++/10/backward' at runtime.
-- And then fallback to: 'x86_64-linux-gnu-g++-10'
-- Use SSL API VERSION 1.1 for civetweb
-- Distributed RDataFrame enabled
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Failed
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Success
-- Performing Test found_stod_stringview
-- Performing Test found_stod_stringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Failed
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Failed
-- Performing Test found_stdindexsequence
-- Performing Test found_stdindexsequence - Success
-- ROOT Configuration
Processor 6 core Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz (x86_64)
Build type Release
Install path /usr/local/Software/root/root-6.28.04/root
Compiler GNU 10.2.1
C -Wno-implicit-fallthrough -pipe -Wall -W -pthread -O3 -DNDEBUG
C++ -std=c++14 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
Shared -Wl,--no-undefined -Wl,--hash-style="both"
-- Enabled support for: asimage builtin_afterimage builtin_clang builtin_cling builtin_gl2ps builtin_gtest builtin_llvm builtin_lz4 builtin_lzma builtin_nlohmannjson builtin_openui5 builtin_xxhash builtin_zstd dataframe exceptions fftw3 fitsio gdml http mathmore mlp minuit2 mysql opengl pyroot pythia6 pythia8 roofit rpath runtime_cxxmodules shared ssl tmva tmva-pymva spectrum x11 xml
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/Software/root/root-6.28.04/build
- cmake --build …/build/ --target install
[ 70%] Linking CXX shared library ../../lib/libEGPythia6.so
/usr/bin/ld: CMakeFiles/EGPythia6.dir/src/TPythia6.cxx.o: in function `TPythia6::TPythia6()':
TPythia6.cxx:(.text+0x6b8): undefined reference to `pythia6_common_address'
/usr/bin/ld: TPythia6.cxx:(.text+0x6c8): undefined reference to `pythia6_common_address'
/usr/bin/ld: TPythia6.cxx:(.text+0x6d8): undefined reference to `pythia6_common_address'
/usr/bin/ld: TPythia6.cxx:(.text+0x6e8): undefined reference to `pythia6_common_address'
/usr/bin/ld: TPythia6.cxx:(.text+0x6f8): undefined reference to `pythia6_common_address'
/usr/bin/ld: CMakeFiles/EGPythia6.dir/src/TPythia6.cxx.o:TPythia6.cxx:(.text+0x708): more undefined references to `pythia6_common_address' follow
/usr/bin/ld: CMakeFiles/EGPythia6.dir/src/TPythia6.cxx.o: in function `TPythia6::OpenFortranFile(int, char*)':
TPythia6.cxx:(.text+0xa80): undefined reference to `tpythia6_open_fortran_file_'
/usr/bin/ld: CMakeFiles/EGPythia6.dir/src/TPythia6.cxx.o: in function `TPythia6::CloseFortranFile(int)':
TPythia6.cxx:(.text+0xa9e): undefined reference to `tpythia6_close_fortran_file_'
collect2: error: ld returned 1 exit status
gmake: *** [montecarlo/pythia6/CMakeFiles/EGPythia6.dir/build.make:148: lib/libEGPythia6.so] Error 1
gmake: *** [CMakeFiles/Makefile2:41488: montecarlo/pythia6/CMakeFiles/EGPythia6.dir/all] Error 2
gmake: *** [Makefile:171: all] Error 2
this is my pythia6:
libPythia6.so makefile pythia6.f pythia6.o
your advice is very kind and useful, I had always assumed that things like PYTHIA 6 and 8 were on by default. Another problem here is that the pythia6 downloaded from the official website only has a pythia6.f file, the .o and .so were compiled by me through makefile.
@jalopezg Sorry I forgot to @ you.
Apparently, there are some references in the forum for this issue. This one can be particularly useful: Undefined reference to `pythia6_common_address__'. Let me know whether that helps!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.