# Unpleasantly late ROOT 6.10.04 compilation error with GCC 7.1

**URL:** <https://root-forum.cern.ch/t/unpleasantly-late-root-6-10-04-compilation-error-with-gcc-7-1/26074>\
**Category:** ROOT\
**Created:** [August 31, 2017, 1:38pm UTC](https://root-forum.cern.ch/t/unpleasantly-late-root-6-10-04-compilation-error-with-gcc-7-1/26074 "2017-08-31T13:38:26Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![ksmith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksmith/32/12567_2.png) [@ksmith](https://root-forum.cern.ch/u/ksmith)\
**Post date:** [August 31, 2017, 3:12pm UTC](https://root-forum.cern.ch/t/unpleasantly-late-root-6-10-04-compilation-error-with-gcc-7-1/26074/6 "2017-08-31T15:12:52Z")

</div>

Looks like all your problems stem from your gcc distribution. The CMake file shipped with ROOT copies the `wchar.h` file from your distribution before compilation (`core/clingutils/CMakeLists.txt`):

```auto
# These headers do not have complete include guards on all platforms we
# support. This means that the PCH cannot provide their representation at
# runtime and clang will hit disk, triggering a possible incompatibility
# of that file in build-time versus run-time (different length etc).
# Capture their build-time version here, and inject it into runtime.
foreach(file wchar.h bits/stat.h bits/time.h)
  if(EXISTS /usr/include/${file})
    list(APPEND copy_commands COMMAND ${CMAKE_COMMAND} -E copy /usr/include/${file} ${CMAKE_BINARY_DIR}/etc/cling/lib/clang/${LLVM_VERSION}/include/${file})
  endif()
endforeach()

```

Maybe you have clashing gcc packages? _**(EDIT: This was the issue with OP.)**_ Have you tried building something simple that use the string header?

---

_[View the full topic](https://root-forum.cern.ch/t/unpleasantly-late-root-6-10-04-compilation-error-with-gcc-7-1/26074)._
