# Problem in building

**URL:** <https://geant4-forum.web.cern.ch/t/problem-in-building/4751>\
**Category:** Getting Started\
**Created:** [March 23, 2021, 12:54pm UTC](https://geant4-forum.web.cern.ch/t/problem-in-building/4751 "2021-03-23T12:54:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![faca87](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://geant4-forum.web.cern.ch/u/faca87)\
**Post date:** [March 23, 2021, 12:54pm UTC](https://geant4-forum.web.cern.ch/t/problem-in-building/4751/1 "2021-03-23T12:54:58Z")

</div>

Hello, a researcher gave me this G4 app to modify it…I tried first to compile it but I get error both on my computer (windows machine) and by using cvfmfs.

This is the error on cvmfs

 ![image](https://geant4-forum.web.cern.ch/uploads/default/original/2X/c/ceee8ebcee2668e2d4b38d32f9d9a14ae4c73769.png)  
and here the log [CMakeOutput - cvfms.txt](https://geant4-forum.web.cern.ch/uploads/short-url/zg0s9tgGpHYl5mZrzlUJFvmxW6F.txt) (83.0 KB)

This is the error on my computer

 ![image](https://geant4-forum.web.cern.ch/uploads/default/original/2X/d/da011ad14ae043305773a2cc66f26295763b6d9c.png)  
and here the log  
[CMakeOutput-windows.txt](https://geant4-forum.web.cern.ch/uploads/short-url/9KKByJktgWEINLITCyM86dlCeq7.txt) (9.7 KB)

I guess it’s a a Cmake problem…maybe it’s written using an old G4 version…is there a way to solve it?  
Thank you

---

<div class="post-metadata">

**Author:** ![faca87](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://geant4-forum.web.cern.ch/u/faca87)\
**Post date:** [March 23, 2021, 4:59pm UTC](https://geant4-forum.web.cern.ch/t/problem-in-building/4751/2 "2021-03-23T16:59:44Z")

</div>

Ok…I see the problem is the missing HepMC library, then I downloaded it here [HepMC / HepMC3](https://gitlab.cern.ch/hepmc/HepMC3) and I’m tryinh to install it on my computer following the instructions on that page, but I get error during the installation  
This is the full log on the terminal

[log.txt](https://geant4-forum.web.cern.ch/uploads/short-url/5mekZo8ReEXddTpp1ORN8OVDmus.txt) (3.6 KB)

and here the C:/Program Files/HepMC3-3.2.3-build/CMakeFiles/CMakeError.log". and C:/Program Files/HepMC3-3.2.3-build/CMakeFiles/CMakeOutput.log

[CMakeError.txt](https://geant4-forum.web.cern.ch/uploads/short-url/lEFT6UhLWiikrHSeECLkNeoTes.txt) (3.1 KB)

[CMakeOutput.txt](https://geant4-forum.web.cern.ch/uploads/short-url/t3zcetuGBtJ8uFFXwjqsmgIur86.txt) (19.3 KB)

@bmorgan, maybe you know how to solve it…

---

<div class="post-metadata">

**Author:** ![bmorgan](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/bmorgan/32/7_2.png) [@bmorgan](https://geant4-forum.web.cern.ch/u/bmorgan)\
**Post date:** [March 24, 2021, 1:02pm UTC](https://geant4-forum.web.cern.ch/t/problem-in-building/4751/3 "2021-03-24T13:02:38Z")

</div>

The log is telling you what the error is:

```auto
-- Could NOT find Python (missing: Python_EXECUTABLE Python_LIBRARIES Python_INCLUDE_DIRS Interpreter Development.Module) (Required is at least version "2")
CMake Error at python/CMakeLists.txt:282 (if):
  if given arguments:

    "Python_INCLUDE_DIRS" "AND" "Python_EXECUTABLE" "AND" "(" "(" "STREQUAL" "2" "AND" "X" "STREQUAL" "X" ")" "OR" "." "STREQUAL" "2.X" ")"

  Unknown arguments specified
Call Stack (most recent call first):
  python/CMakeLists.txt:522 (bindings)

-- Configuring incomplete, errors occurred!

```

It needs Python, but it’s not installed, or can’t be found, on the system.

---

<div class="post-metadata">

**Author:** ![faca87](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://geant4-forum.web.cern.ch/u/faca87)\
**Post date:** [March 25, 2021, 12:13pm UTC](https://geant4-forum.web.cern.ch/t/problem-in-building/4751/4 "2021-03-25T12:13:09Z")

</div>

Thank you @bmorgan but I’ve Python on my computer  
as you can see in this print screen

 ![image](https://geant4-forum.web.cern.ch/uploads/default/original/2X/6/649fe874e99bc784fb5f1d4205b6dc51e76ce07c.png)

and it’s strange that HepMC can’t find it, because I use ROOT and ROOT needs python too! (I mean, when I installed ROOT I had to install python first )…

is there a way to set manually the path of python for HepMC installation?  
Thank you

---

<div class="post-metadata">

**Author:** ![bmorgan](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/bmorgan/32/7_2.png) [@bmorgan](https://geant4-forum.web.cern.ch/u/bmorgan)\
**Post date:** [March 26, 2021, 11:52am UTC](https://geant4-forum.web.cern.ch/t/problem-in-building/4751/5 "2021-03-26T11:52:19Z")

</div>

Please see the HepMC3 project page for all of its build options: [HepMC / HepMC3](https://gitlab.cern.ch/hepmc/HepMC3)

---

<div class="post-metadata">

**Author:** ![faca87](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://geant4-forum.web.cern.ch/u/faca87)\
**Post date:** [March 27, 2021, 8:24am UTC](https://geant4-forum.web.cern.ch/t/problem-in-building/4751/6 "2021-03-27T08:24:00Z")

</div>

Thank you @bmorgan but these are instructions that I was following…

but when I run the command

`cmake -DHEPMC3_ENABLE_ROOTIO=OFF -DCMAKE_INSTALL_PREFIX=../hepmc3-install ../HepMC3-3.2.3`

I get the error showed in my previous message (the error regarding of python, even if I have python)…

Given that HepMC can’t find the python path, is there a way to set the path?

---

<div class="post-metadata">

**Author:** ![bmorgan](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/bmorgan/32/7_2.png) [@bmorgan](https://geant4-forum.web.cern.ch/u/bmorgan)\
**Post date:** [July 2, 2022, 4:55pm UTC](https://geant4-forum.web.cern.ch/t/problem-in-building/4751/7 "2022-07-02T16:55:06Z")

</div>

Closed on July 2, 2022, 4:55pm UTC


