# CMake configuration error since 76f472aca2

**URL:** <https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576>\
**Category:** ROOT\
**Tags:** cmake\
**Created:** [July 17, 2017, 11:05am UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576 "2017-07-17T11:05:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiroux](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/xiroux/32/12782_2.png) [@xiroux](https://root-forum.cern.ch/u/xiroux)\
**Post date:** [July 17, 2017, 11:05am UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/1 "2017-07-17T11:05:23Z")

</div>

Hi, guys!

I’m getting the following error when running cmake in a clean build directory:

```auto
CMake Error at CMakeLists.txt:209 (list):
  list GET given empty list

```

This happens since commit [76f472aca2](https://github.com/root-project/root/commit/76f472aca2f38d60a16fcc19d496827e20517664). I was bypassing the problem by just reverting that commit in my local copy of the repo. However, the latest changes in the file changed by that commit created conflicts with my revert, so better to know what’s happening and solve it instead of just ignoring it.

The error happens even when no options are passed to `cmake`; I also tested it with the `make` and `Ninja` build systems, but the error persists.

Any idea?

Thank you!

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [July 17, 2017, 11:59am UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/2 "2017-07-17T11:59:56Z")

</div>

Hi,  
what architecture/operating system/cmake version/compiler version are you on?

I think @teemperor or @amadio might help.

---

<div class="post-metadata">

**Author:** ![teemperor](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/teemperor/32/14099_2.png) [@teemperor](https://root-forum.cern.ch/u/teemperor)\
**Post date:** [July 17, 2017, 12:30pm UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/3 "2017-07-17T12:30:14Z")

</div>

After [PR #777](https://github.com/root-project/root/pull/777) is merged, we will print an warning instead of letting CMake fail, so this should get your builds running again.

However, there is an underlying problem that causes this error that should be fixed (otherwise you’ll run into obscure problems later on).

Can you test the commit from the PR and pastebin the whole CMake output? This way we can fix the actual problem that is causing the warning. Thanks!

---

<div class="post-metadata">

**Author:** ![xiroux](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/xiroux/32/12782_2.png) [@xiroux](https://root-forum.cern.ch/u/xiroux)\
**Post date:** [July 17, 2017, 3:46pm UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/4 "2017-07-17T15:46:48Z")

</div>

@eguiraud: I’m on Arch Linux, CMake version 3.8.2, compiler version 7.1.1.

@teemperor, the PR does solve the error and now outputs a warning. The output of `cmake` is here: [https://pastebin.com/LicdEhpD](https://pastebin.com/LicdEhpD)

Do you need anything else to help you with the error?

Thank you!

---

<div class="post-metadata">

**Author:** ![teemperor](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/teemperor/32/14099_2.png) [@teemperor](https://root-forum.cern.ch/u/teemperor)\
**Post date:** [July 17, 2017, 5:03pm UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/5 "2017-07-17T17:03:00Z")

</div>

Ok, so it seems like you already hit another warning on the way. So the problem is that we can’t find the c++ header files with the help of your compiler. I’m not sure your your g++ or ccache is configured, but could you try to run without ccache first? Maybe it’s returning the wrong output when we try to invoce `ccache -v`. Could you try without ccache?

---

<div class="post-metadata">

**Author:** ![xiroux](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/xiroux/32/12782_2.png) [@xiroux](https://root-forum.cern.ch/u/xiroux)\
**Post date:** [July 18, 2017, 7:05am UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/6 "2017-07-18T07:05:25Z")

</div>

I still have those two warnings: [https://pastebin.com/tCkF25Rg](https://pastebin.com/tCkF25Rg)

---

<div class="post-metadata">

**Author:** ![teemperor](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/teemperor/32/14099_2.png) [@teemperor](https://root-forum.cern.ch/u/teemperor)\
**Post date:** [July 18, 2017, 7:51am UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/7 "2017-07-18T07:51:22Z")

</div>

Ok, seems like CMake fails to parse the libstdc++ path that gcc is returning (this is why you get this warning).

Can you rerun cmake but add " --trace-expand" as an argument? E.g. `cmake <your normal args> --trace-expand ../path/to/root` and pastebin the output of this. It’s a lot of output as it prints every executed CMake statement, so you might want to add a `2>log.txt` at the end to save the debug output to this log file instead.

---

<div class="post-metadata">

**Author:** ![xiroux](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/xiroux/32/12782_2.png) [@xiroux](https://root-forum.cern.ch/u/xiroux)\
**Post date:** [July 18, 2017, 8:31am UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/8 "2017-07-18T08:31:19Z")

</div>

Done!

Standard output: [https://pastebin.com/6AEQt0JB](https://pastebin.com/6AEQt0JB)  
Debug output (+30MB): [https://filebin.ca/3Tm9V4LY3nB4](https://filebin.ca/3Tm9V4LY3nB4)

Btw, in case this helps you: I’m using no custom options with cmake in these tests, just `cmake --trace-expand ../root-source`

Thank you!

---

<div class="post-metadata">

**Author:** ![teemperor](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/teemperor/32/14099_2.png) [@teemperor](https://root-forum.cern.ch/u/teemperor)\
**Post date:** [July 18, 2017, 8:50am UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/9 "2017-07-18T08:50:07Z")

</div>

I see, it’s a locale problem. Please run `LANG=C cmake ../root-source` instead and it should work. I made a JIRA issue for this: ROOT-8917. It’s also fixed in [PR #780](https://github.com/root-project/root/pull/780), if you want, you can test this and confirm if it fixes your problem.

EDIT: Fixed in master now.

---

<div class="post-metadata">

**Author:** ![xiroux](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/xiroux/32/12782_2.png) [@xiroux](https://root-forum.cern.ch/u/xiroux)\
**Post date:** [July 18, 2017, 9:20am UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/10 "2017-07-18T09:20:00Z")

</div>

I just tested the PR and it seems to work fine: the configuration step completed successfully, and I’m now building with Ninja and ccache with no errors so far.

Thank you again 🙂

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 1, 2017, 9:20am UTC](https://root-forum.cern.ch/t/cmake-configuration-error-since-76f472aca2/25576/11 "2017-08-01T09:20:03Z")

</div>

Closed on August 1, 2017, 9:20am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
