# Build fails with internal compiler error on CentOS 7

**URL:** <https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840>\
**Category:** O²\
**Tags:** build\
**Created:** [February 18, 2021, 6:58am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840 "2021-02-18T06:58:19Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![tdietel](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/t/9dc877/32.png) [@tdietel](https://alice-talk.web.cern.ch/u/tdietel)\
**Post date:** [February 18, 2021, 6:58am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/1 "2021-02-18T06:58:19Z")

</div>

Dear experts,

I have a problem with O2 building failing on a CentOS 7 computer. All dependencies compile fine (and with aliBuild 1.7.2 the dependency checks are a bit faster, thanks!). But the actual compilation fails at 87% in the analysis code. I uploaded the [logfile](https://cernbox.cern.ch/index.php/s/diqKYyr1Dox1zHm) to my CERNbox.

I have been struggling with this build for a few days now, and tried different versions of the dev branch as well as the latest release (21.07, I think). They all crash around 90%, although I’m not sure if it is always the exact same error and I did not keep the logfiles.

Any help would be greatly appreciated. Thanks,

- Tom.

---

<div class="post-metadata">

**Author:** ![tdietel](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/t/9dc877/32.png) [@tdietel](https://alice-talk.web.cern.ch/u/tdietel)\
**Post date:** [February 18, 2021, 7:00am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/2 "2021-02-18T07:00:27Z")

</div>

Here is the relevant section from the logfile (with a bit of extra context):

Scanning dependencies of target O2exe-analysis-cascadefinder  
[87%] Building CXX object Analysis/Tasks/ALICE3/CMakeFiles/O2exe-analysis-alice3-trackselection.dir/alice3-trackselection.cxx.o  
Scanning dependencies of target O2exe-analysis-lambdakzeroanalysis  
[87%] Building CXX object Analysis/Tasks/PWGLF/CMakeFiles/O2exe-analysis-cascadebuilder.dir/cascadebuilder.cxx.o  
[87%] Building CXX object Analysis/Tasks/PWGLF/CMakeFiles/O2exe-analysis-cascadefinder.dir/cascadefinder.cxx.o  
[87%] Building CXX object Analysis/Tasks/PWGLF/CMakeFiles/O2exe-analysis-lambdakzeroanalysis.dir/lambdakzeroanalysis.cxx.o  
Scanning dependencies of target O2exe-analysis-track-checks  
[87%] Building CXX object Analysis/Tasks/PWGLF/CMakeFiles/O2exe-analysis-track-checks.dir/trackchecks.cxx.o  
[87%] Built target O2exe-analysis-lambdakzerofinder  
Scanning dependencies of target O2exe-analysis-nucleispectra-task-skim-analyser  
[87%] Building CXX object Analysis/Tasks/SkimmingTutorials/CMakeFiles/O2exe-analysis-nucleispectra-task-skim-analyser.dir/spectraNucleiAnalyse  
r.cxx.o  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-alice3-trackselection  
c++: internal compiler error: Killed (program cc1plus)  
Please submit a full bug report,  
with preprocessed source if appropriate.  
See [https://gcc.gnu.org/bugs/](https://gcc.gnu.org/bugs/) for instructions.  
gmake[2]: \*\*\* [Analysis/Tasks/PWGLF/CMakeFiles/O2exe-analysis-cascadefinder.dir/build.make:82: Analysis/Tasks/PWGLF/CMakeFiles/O2exe-analysis-cascadefinder.dir/cascadefinder.cxx.o] Error 4  
gmake[1]: \*\*\* [CMakeFiles/Makefile2:40373: Analysis/Tasks/PWGLF/CMakeFiles/O2exe-analysis-cascadefinder.dir/all] Error 2  
gmake[1]: \*\*\* Waiting for unfinished jobs…  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-tpcspectra-task-skim-reference  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-tpcspectra-task-skim-analyser  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-nucleispectra-task-skim-analyser  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-upc  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-lambdakzeroanalysis  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-nucleispectra-task-skim-provider  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-lambdakzerobuilder  
[87%] Built target O2exe-analysis-alice3-trackselection  
[87%] Built target O2exe-analysis-tpcspectra-task-skim-analyser  
[87%] Built target O2exe-analysis-nucleispectra-task-skim-provider  
[87%] Built target O2exe-analysis-tpcspectra-task-skim-reference  
[87%] Built target O2exe-analysis-nucleispectra-task-skim-analyser  
[87%] Built target O2exe-analysis-upc  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-nucleispectra-task-skim-reference  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-track-checks  
[87%] Built target O2exe-analysis-nucleispectra-task-skim-reference  
[87%] Built target O2exe-analysis-track-checks  
[87%] Linking CXX executable …/…/…/stage/bin/o2-analysis-cascadebuilder  
[87%] Built target O2exe-analysis-cascadebuilder  
[87%] Built target O2exe-analysis-lambdakzeroanalysis  
[87%] Built target O2exe-analysis-lambdakzerobuilder  
gmake: \*\*\* [Makefile:182: all] Error 2

---

<div class="post-metadata">

**Author:** ![laphecet](https://alice-talk.web.cern.ch/user_avatar/alice-talk.web.cern.ch/laphecet/32/12_2.png) [@laphecet](https://alice-talk.web.cern.ch/u/laphecet)\
**Post date:** [February 18, 2021, 7:16am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/3 "2021-02-18T07:16:07Z")

</div>

Hi Tom,

Just in case you actually do _not_ need the analysis part, note that you can go to the build directory, and change a bit how cmake is configured to disable analysis :

```auto
cmake -DBUILD_ANALYSIS=OFF .
cmake --build . 
cmake --install . 

```

---

<div class="post-metadata">

**Author:** ![tklemenz](https://alice-talk.web.cern.ch/user_avatar/alice-talk.web.cern.ch/tklemenz/32/115_2.png) [@tklemenz](https://alice-talk.web.cern.ch/u/tklemenz)\
**Post date:** [February 18, 2021, 8:23am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/4 "2021-02-18T08:23:17Z")

</div>

Hi Tom,

this looks like you ran out of memory. You could also try to run aliBuild on less cores e.g. `-j 1` or `-j 2`.  
See [here](https://alice-talk.web.cern.ch/t/memory-consumption-of-the-analysis-framework-during-the-build-phase/637) for the full discussion.

But @laphecet’s solution is probably the way to go.

Cheers,  
Thomas

---

<div class="post-metadata">

**Author:** ![tdietel](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/t/9dc877/32.png) [@tdietel](https://alice-talk.web.cern.ch/u/tdietel)\
**Post date:** [February 18, 2021, 8:34am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/5 "2021-02-18T08:34:32Z")

</div>

Hello Thomas,

I saw the thread and tried to limit to 1 core, and that did not help either. We have 24 GB of memory, so I did not expect it to be the issue, and the compiler did not report a memory issue.

I am trying @laphecet 's suggestion now. Thanks, Laurent.

Cheers, Tom.

---

<div class="post-metadata">

**Author:** ![eulisse](https://alice-talk.web.cern.ch/user_avatar/alice-talk.web.cern.ch/eulisse/32/19_2.png) [@eulisse](https://alice-talk.web.cern.ch/u/eulisse)\
**Post date:** [February 18, 2021, 8:40am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/6 "2021-02-18T08:40:07Z")

</div>

For the record, I reduced the number of parallel compilation jobs for analysis. Could you try again?

---

<div class="post-metadata">

**Author:** ![laphecet](https://alice-talk.web.cern.ch/user_avatar/alice-talk.web.cern.ch/laphecet/32/12_2.png) [@laphecet](https://alice-talk.web.cern.ch/u/laphecet)\
**Post date:** [February 18, 2021, 8:49am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/7 "2021-02-18T08:49:31Z")

</div>

@eulisse do I understand correctly that you are limiting the number of parallel compilations for analysis using the JOB\_POOL\_COMPILE cmake option ? But then, that’s only relevant for Ninja builds, isn’t ? (seems Tom’s build was a make one)

---

<div class="post-metadata">

**Author:** ![tdietel](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/t/9dc877/32.png) [@tdietel](https://alice-talk.web.cern.ch/u/tdietel)\
**Post date:** [February 18, 2021, 9:01am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/8 "2021-02-18T09:01:46Z")

</div>

At the moment, I am running a build (using aliBuild and a patched alidist/o2.sh) following Laurent’s suggestion.  
I am not sure how to load all the alienv dependencies for building O2, hence the patched alidist.

It takes quite some time for aliBuild to check all the dependencies - maybe because Cape Town is far from some servers at CERN?

I can try with fewer cores afterwards.

---

<div class="post-metadata">

**Author:** ![eulisse](https://alice-talk.web.cern.ch/user_avatar/alice-talk.web.cern.ch/eulisse/32/19_2.png) [@eulisse](https://alice-talk.web.cern.ch/u/eulisse)\
**Post date:** [February 18, 2021, 11:46am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/9 "2021-02-18T11:46:26Z")

</div>

I think we use ninja by default now, no?

---

<div class="post-metadata">

**Author:** ![eulisse](https://alice-talk.web.cern.ch/user_avatar/alice-talk.web.cern.ch/eulisse/32/19_2.png) [@eulisse](https://alice-talk.web.cern.ch/u/eulisse)\
**Post date:** [February 18, 2021, 11:47am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/10 "2021-02-18T11:47:13Z")

</div>

I’ve done some improvement in aliBuild 1.7.2 which should parallelise the check for dependencies. Could bump your version and see if there is any improvement?

---

<div class="post-metadata">

**Author:** ![laphecet](https://alice-talk.web.cern.ch/user_avatar/alice-talk.web.cern.ch/laphecet/32/12_2.png) [@laphecet](https://alice-talk.web.cern.ch/u/laphecet)\
**Post date:** [February 18, 2021, 12:06pm UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/11 "2021-02-18T12:06:14Z")

</div>

AFAIK we use ninja by default _if_ it’s available on the machine. Or do we have it as a mandatory dep (that we build if not present) and I’ve missed that ?

---

<div class="post-metadata">

**Author:** ![eulisse](https://alice-talk.web.cern.ch/user_avatar/alice-talk.web.cern.ch/eulisse/32/19_2.png) [@eulisse](https://alice-talk.web.cern.ch/u/eulisse)\
**Post date:** [February 18, 2021, 2:39pm UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/12 "2021-02-18T14:39:52Z")

</div>

you are right… Time to change that?

---

<div class="post-metadata">

**Author:** ![tdietel](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/t/9dc877/32.png) [@tdietel](https://alice-talk.web.cern.ch/u/tdietel)\
**Post date:** [February 19, 2021, 10:36am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/13 "2021-02-19T10:36:56Z")

</div>

I can confirm that ninja is only used when it is found on the system, and on our one, `yum install ninja` did not find it.

---

<div class="post-metadata">

**Author:** ![tdietel](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/t/9dc877/32.png) [@tdietel](https://alice-talk.web.cern.ch/u/tdietel)\
**Post date:** [February 19, 2021, 10:40am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/14 "2021-02-19T10:40:10Z")

</div>

I have tried the compilation without the analysis code, and this did indeed work. For now, this should give us everything we need, but we will have to come back to this at some point.

---

<div class="post-metadata">

**Author:** ![tdietel](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/t/9dc877/32.png) [@tdietel](https://alice-talk.web.cern.ch/u/tdietel)\
**Post date:** [February 19, 2021, 10:45am UTC](https://alice-talk.web.cern.ch/t/build-fails-with-internal-compiler-error-on-centos-7/840/15 "2021-02-19T10:45:50Z")

</div>

I have used aliBuild 1.7.2, and it still seemed quite slow, although it might have been faster than 1.7.1. But I think this is something for a different thread.
