Score:0

Cannot make HepMC work in Ubuntu 20.04 LTS

gt flag

I am trying to work in the field of particle physics and I need help configuring software for that. I am trying to install HepMC3 in my ubuntu 20.04 but I am unaware of how to run it. I have followed all the installation instructions listed on their website. I am mentioning the command for installation below

$wget http://hepmc.web.cern.ch/hepmc/releases/HepMC3-3.2.2.tar.gz
  tar -xzf HepMC3-3.2.2.tar.gz
  mkdir hepmc3-build
  cd hepmc3-build
  cmake -DHEPMC3_ENABLE_ROOTIO:BOOL=OFF -DHEPMC3_ENABLE_TEST:BOOL=OFF  \
      -DHEPMC3_INSTALL_INTERFACES:BOOL=ON -DHEPMC3_ENABLE_PYTHON:BOOL=ON -DHEPMC3_PYTHON_VERSIONS=2.7  \
      -DHEPMC3_BUILD_STATIC_LIBS:BOOL=OFF -DHEPMC3_BUILD_DOCS:BOOL=OFF  \
      -DCMAKE_INSTALL_PREFIX=../hepmc3-install   \
      -DHEPMC3_Python_SITEARCH27=../hepmc3-install/lib/python2.7/site-packages \
      ../HepMC3-3.2.2
  make
  make install

After that, I want to compile example files present in the HepMC-3.2.2/examples/RootIOExample3. For that,

$cmake -DUSE_INSTALLED_HEPMC3=ON -DHepMC3_DIR=/home/aritra/Desktop/Project/HepMC3-3.2.3 CMakeLists.txt I ran the following code in the example folder:

But it is giving me the following error:

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:26 (install):
  install DIRECTORY given no DESTINATION!


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.16)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/aritra/Desktop/Project/HepMC3-3.2.3/examples/RootIOExample3/CMakeFiles/CMakeOutput.log".

Please help me figure out what I am doing wrong. Here is the readme file for HepMC for reference.

Knud Larsen avatar
by flag
»» See ... RootIOExample3/CMakeFiles/CMakeOutput.log «« : Please read. (Your text isn't really errors, just cmake messages about cmake.) ... Suggest : Install { `hepmc-examples libhepmc3 libhepmc3-dev` } with `apt` https://packages.ubuntu.com/search?suite=focal&searchon=names&keywords=hepmc .... Might be more coherent than the source packages.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.