gCling linking error when compiling ROOT 6.26/06

Hello,

I am having errors when running ROOT after updating to MacOS Ventura 13.0. Ventura requires updating Xcode to version 14.1, as well as updating CommandLineTools. My previous installation of ROOT would not even run after the update, so I re-installed it. Now, ROOT will run, but it throws errors, specifically about gCling.

input_line_2:3:1: error: unknown type name 'RuntimeOptions'
RuntimeOptions* gClingOpts=(RuntimeOptions*)0x7faf8f305f04;}}
^
input_line_2:3:29: error: use of undeclared identifier 'RuntimeOptions'
RuntimeOptions* gClingOpts=(RuntimeOptions*)0x7faf8f305f04;}}
                            ^
input_line_2:3:44: error: expected expression
RuntimeOptions* gClingOpts=(RuntimeOptions*)0x7faf8f305f04;}}
                                           ^
Replaced symbol atexit cannot be found in JIT!
Replaced symbol at_quick_exit cannot be found in JIT!
   ------------------------------------------------------------------
  | Welcome to ROOT 6.26/06                        https://root.cern |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosx64 on Jul 28 2022, 18:08:51                      |
  | From tags/v6-26-06@v6-26-06                                      |
  | With Apple clang version 13.1.6 (clang-1316.0.21.2.5)            |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

root [0] 4+4
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?

Any help would be appreciated!

ROOT Version: 6.26/06
Platform: MacOS Ventura 13.0
Compiler: clang 13.1.6


Hi @charris ,

sorry for the high latency and welcome to the ROOT forum!
How did you install ROOT exactly? Do you have a custom .rootrc file in your home directory?

@Axel any idea what this might be?

Cheers,
Enrico

Hi,

We never saw this. We are building on macOS 13, more or less happily. (More or less due to ACLiC issues with the new linker.)

So indeed: how did you build ROOT?

Cheers, Axel

In my original post I installed root using homebrew, and I do not have a custom .rootrc file as far as I know.

After reading through forum posts, I found that people were able to run root on 13.0 by building from source from the master branch. This did not work for me either, as cmake would throw errors before the build completed.

Errors:

[ 61%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TListOfFunctions.cxx.o
In file included from /Applications/root-master/core/base/src/TApplication.cxx:23:
In file included from /Applications/root-master/core/base/inc/TApplication.h:30:
In file included from /Applications/root-master/core/base/inc/TQObject.h:42:
/Applications/root-master/core/base/inc/TVirtualQConnection.h:34:30: error: unknown type name 'Longptr_t'
   virtual void SetArg(const Longptr_t *, Int_t = -1) = 0;
                             ^
/Applications/root-master/core/base/inc/TVirtualQConnection.h:74:23: error: unknown type name 'Longptr_t'
   void SetArgs(const Longptr_t* argArray, Int_t nargs = -1)
                      ^
/Applications/root-master/core/base/inc/TVirtualQConnection.h:36:43: error: use of undeclared identifier 'Longptr_t'
   void SetArg(const void *ptr) { SetArg((Longptr_t)ptr); };
                                          ^
/Applications/root-master/core/base/inc/TVirtualQConnection.h:36:28: warning: unused parameter 'ptr' [-Wunused-parameter]
   void SetArg(const void *ptr) { SetArg((Longptr_t)ptr); };
                           ^
/Applications/root-master/core/base/inc/TVirtualQConnection.h:43:18: error: use of undeclared identifier 'Longptr_t'
         SetArg((Longptr_t)val);
                 ^
/Applications/root-master/core/base/inc/TVirtualQConnection.h:45:18: error: use of undeclared identifier 'ULongptr_t'; did you mean 'kLong_t'?
         SetArg((ULongptr_t)val);
                 ^~~~~~~~~~
                 kLong_t
/usr/local/include/TDataType.h:30:36: note: 'kLong_t' declared here
   kInt_t    = 3,  kUInt_t   = 13, kLong_t     = 4,  kULong_t  = 14,
                                   ^
In file included from /Applications/root-master/core/base/src/TApplication.cxx:23:
In file included from /Applications/root-master/core/base/inc/TApplication.h:30:
In file included from /Applications/root-master/core/base/inc/TQObject.h:42:
/Applications/root-master/core/base/inc/TVirtualQConnection.h:40:25: warning: unused parameter 'val' [-Wunused-parameter]
   void SetArg(const T& val)
                        ^
In file included from /Applications/root-master/core/base/src/TApplication.cxx:23:
/Applications/root-master/core/base/inc/TApplication.h:86:12: error: unknown type name 'Longptr_t'
   virtual Longptr_t  ProcessRemote(const char *line, Int_t *error = nullptr);
           ^
/Applications/root-master/core/base/inc/TApplication.h:113:12: error: unknown type name 'Longptr_t'
   virtual Longptr_t ProcessLine(const char *line, Bool_t sync = kFALSE, Int_t *error = nullptr);
           ^
/Applications/root-master/core/base/inc/TApplication.h:114:12: error: unknown type name 'Longptr_t'
   virtual Longptr_t ProcessFile(const char *file, Int_t *error = nullptr, Bool_t keep = kFALSE);
           ^
/Applications/root-master/core/base/inc/TApplication.h:157:11: error: unknown type name 'Longptr_t'
   static Longptr_t ExecuteFile(const char *file, Int_t *error = nullptr, Bool_t keep = kFALSE);
          ^
In file included from /Applications/root-master/core/base/src/TApplication.cxx:26:
/Applications/root-master/core/base/inc/TVirtualX.h:108:33: error: unknown type name 'ULongptr_t'
   virtual Int_t     InitWindow(ULongptr_t window);
                                ^
/Applications/root-master/core/base/inc/TVirtualX.h:109:32: error: unknown type name 'ULongptr_t'
   virtual Int_t     AddWindow(ULongptr_t qwid, UInt_t w, UInt_t h);
                               ^
/Applications/root-master/core/base/inc/TVirtualX.h:110:32: error: unknown type name 'ULongptr_t'
   virtual Int_t     AddPixmap(ULongptr_t pixid, UInt_t w, UInt_t h);
                               ^
/Applications/root-master/core/base/inc/TVirtualX.h:111:35: error: unknown type name 'ULongptr_t'
   virtual void      RemoveWindow(ULongptr_t qwid);
                                  ^
/Applications/root-master/core/base/inc/TVirtualX.h:170:36: error: unknown type name 'ULongptr_t'
   virtual Bool_t       NeedRedraw(ULongptr_t tgwindow, Bool_t force);
                                   ^
In file included from /Applications/root-master/core/base/src/TApplication.cxx:27:
/Applications/root-master/core/base/inc/TROOT.h:293:4: error: unknown type name 'Longptr_t'
   Longptr_t         Macro(const char *filename, Int_t *error = nullptr, Bool_t padUpdate = kTRUE);
   ^
/Applications/root-master/core/base/inc/TROOT.h:297:4: error: unknown type name 'Longptr_t'
   Longptr_t         ProcessLine(const char *line, Int_t *error = nullptr);
   ^
/Applications/root-master/core/base/inc/TROOT.h:298:4: error: unknown type name 'Longptr_t'
   Longptr_t         ProcessLineSync(const char *line, Int_t *error = nullptr);
   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make[2]: *** [core/base/CMakeFiles/Base.dir/src/TApplication.cxx.o] Error 1
make[1]: *** [core/base/CMakeFiles/Base.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I also found another post with similar cmake errors, but they were able to fix it by uninstalling root and then trying again. I think I have already uninstalled root completely, but is there any way to make sure I have removed it entirely?

Thanks!
Caley

Hi,

The error message points out where your ROOT installations are:

/Applications/root-master/core/base/inc/TVirtualQConnection.h:45:18
...
/usr/local/include/TDataType.h:30:36:

You want to remove / rename the one in /usr/local.

Cheers, Axel

1 Like

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