Unresolved symbol cling::runtime::gCling for tutorial examples

Hello,

I have compiled root (git master) using gcc 4.9.2 on Linux RHES 6.4 using cmake (cmake Log can be provided):

However, when trying to run the tutorial examples, root reports unresolved symbols (see below).

$ root graph.C
error: OPTIMIZE predefined macro was enabled in PCH file but is currently disabled

| Welcome to ROOT 6.05/01 root.cern.ch |
| © 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From heads/master@v6-05-01-289-gd028fb0, Jul 03 2015, 14:33:00 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

root [0]
Processing graph.C…
IncrementalExecutor::executeFunction: symbol ‘_ZN5cling7runtime6gClingE’ unresolved while linking [cling interface function]!
You are probably missing the definition of cling::runtime::gCling
Maybe you need to load the corresponding shared library?
root [1] gSystem->Load(“libCLing.so”)
IncrementalExecutor::executeFunction: symbol ‘_ZN5cling7runtime6gClingE’ unresolved while linking [cling interface function]!
You are probably missing the definition of cling::runtime::gCling
Maybe you need to load the corresponding shared library?
root [2]

Any hint is appreciated.

Hi,

Working on it…

Axel.

Hi,

having same problem when building ROOT 5.34.02 on debian, it turned out to be caused by default debian g++ flags - namely these two:

-fstack-protector-strong
-D_FORTIFY_SOURCE=2

Removing them fixed the problem.
Pavel

Hi,

It’s fixed now.

This cannot be the same problem in ROOT 5 because that doesn’t use cling.

Cheers, Axel.

Hi,
I’m running into the same bug. Before updating my toolchain, I would like to know if this is fixed in 6.05.02? I cannot seem to find its ChangeLog, and I cannot discern whether that is supposed to be a stable release, this information appears to have been lost in the website upgrade.

Thanks!

I am getting this same error on CentOS 8. Did you install from source again with these flags? Where did you exactly put these flags?

These are the compiler flags (CMAKE_CXX_FLAGS I believe). Running “cmake -LAH” should show you, what flags CentOS is trying to use: search for “Compiler Flags” in the output of the “cmake -LAH” command.

PS: But, it is long time ago I reported that (and obviously for the wrong ROOT version), things may have changed significantly.

Following is what I get after running cmake -LAH and searching for compiler flags. It has > 100 compiler flags. Which one should I look for?cmake-flags.txt (92.8 KB)

We need way more info:

  • how did you get ROOT?
  • what do you do to see the error?
  • which platform / compiler?

Also, please start new threads in the future, instead of reviving 5 year old threads :slight_smile:

The log you have provided did not pass well (see the error at the very beginning). The g++ flags thus did not show up (the flags you see are cmake flags). The cmake -LAH command needs to be run using the pure downloaded root source.

A post was split to a new topic: Missing symbol in cling