# make: \*\*\* \[Makefile:156: all\] Error 2

**URL:** https://discourse.cmake.org/t/make-makefile-all-error-2/6373
**Category:** Usage
**Tags:** os:linux
**Created:** [August 29, 2022, 11:04am UTC](https://discourse.cmake.org/t/make-makefile-all-error-2/6373 "2022-08-29T11:04:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Asmae](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@Asmae](https://discourse.cmake.org/u/Asmae)
#### Post date: [August 29, 2022, 11:04am UTC](https://discourse.cmake.org/t/make-makefile-all-error-2/6373/1 "2022-08-29T11:04:42Z")

</div>

I did this command **make -j8** until 97% of the installation, I got this Error:

make[2]: \*\*\* [source/persistency/CMakeFiles/G4persistency.dir/build.make:398: source/persistency/CMakeFiles/G4persistency.dir/ascii/src/G4tgrEvaluator.cc.o] Error 1  
make[1]: \*\*\* [CMakeFiles/Makefile2:4310: source/persistency/CMakeFiles/G4persistency.dir/all] Error 2  
make: \*\*\* [Makefile:156: all] Error 2

Do you have any idea how to fixe this error ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [August 29, 2022, 11:06am UTC](https://discourse.cmake.org/t/make-makefile-all-error-2/6373/2 "2022-08-29T11:06:13Z")

</div>

More context is needed. What shows up with a plain `make` (no parallelism). Note that parallel `make` will stop _scheduling jobs_ when it detects an error, so there can be as many as `N-1` outputs before the error message at the very bottom.

---

<div class="post-metadata">

### Author: ![Asmae](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@Asmae](https://discourse.cmake.org/u/Asmae)
#### Post date: [August 29, 2022, 11:10am UTC](https://discourse.cmake.org/t/make-makefile-all-error-2/6373/3 "2022-08-29T11:10:44Z")

</div>

so what I should do now

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [August 29, 2022, 11:24am UTC](https://discourse.cmake.org/t/make-makefile-all-error-2/6373/4 "2022-08-29T11:24:53Z")

</div>

Just run `make` and get the error from the compiler itself (`make` is just reporting that something failed when building the `G4persistency` target and is not very useful otherwise).

---

<div class="post-metadata">

### Author: ![madscientist](https://discourse.cmake.org/user_avatar/discourse.cmake.org/madscientist/32/109_2.png) [@madscientist](https://discourse.cmake.org/u/madscientist)
#### Post date: [August 29, 2022, 12:39pm UTC](https://discourse.cmake.org/t/make-makefile-all-error-2/6373/5 "2022-08-29T12:39:46Z")

</div>

Maybe I can make Ben’s answer more clear.

The messages you pasted into your question are not the error messages that tell you why the build failed. They are just messages from make telling you about the fact that _some_ build command failed, for _some_ reason.

To know which command failed and why (the reason), you have to look at the output BEFORE these messages and find the error messages that were generated by the command that failed (in this case, the compiler). The compiler will tell you what was wrong. Then you fix that thing, and re-run the build.

If you didn’t save all the output of the previous build, you can re-run the build which will re-run the compiler which will fail again and then you can see the compiler error messages.

Make is just a simple tool that runs other commands (like the compiler) in a specific order. It’s the other commands that actually do the work of building your code into a program and so it’s the output from the other commands that will show you what is wrong with your code.
