ROOT 6.25/01 with clang: several warnings for 'REMOVE_THIS_NOW' [-Wunknown-attributes] during root compilation

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.25/01
Platform: Darwin 20.5.0 (OS Big Sur)
Compiler: Apple clang 12.0.5

These warnings were discussed and removed previously: ROOT 6.23/01 with GCC 10: Too many warnings

They seem to have come back in 6.25/01. I am installing from the git repo using the tag 6-25-01 and these appear while compiling root with cmake (specifying only the install prefix).

In file included from /Users/ayanpaul/opt/packages/root/core/macosx/src/
/Users/ayanpaul/opt/packages/root/core/foundation/inc/TError.h:42:38: warning: unknown attribute 'REMOVE_THIS_NOW' ignored [-Wunknown-attributes]
R__EXTERN TVirtualMutex *gErrorMutex R__DEPRECATED(6,26, "ROOT stopped exporting gErrorMutex.");
/Users/ayanpaul/opt/packages/root/core/foundation/inc/ROOT/RConfig.hxx:523:3: note: expanded from macro 'R__DEPRECATED'
  _R__JOIN3_(_R__DEPRECATED_,MAJOR,MINOR)("will be removed in ROOT v" #MAJOR "." #MINOR ": " REASON)
/Users/ayanpaul/opt/packages/root/core/foundation/inc/ROOT/RConfig.hxx:454:30: note: expanded from macro '_R__JOIN3_'
#   define _R__JOIN3_(F,X,Y) _NAME3_(F,X,Y)
/Users/ayanpaul/opt/packages/root/core/foundation/inc/ROOT/RConfig.hxx:436:39: note: expanded from macro '_NAME3_'
#   define _NAME3_(name1,name2,name3) name1##name2##name3
<scratch space>:51:1: note: expanded from here
/Users/ayanpaul/opt/packages/root/core/foundation/inc/ROOT/RConfig.hxx:510:37: note: expanded from macro '_R__DEPRECATED_626'
/Users/ayanpaul/opt/packages/root/core/foundation/inc/ROOT/RConfig.hxx:482:57: note: expanded from macro '_R_DEPRECATED_REMOVE_NOW'
1 warning generated.


Hi @talismanbrandi,
welcome to the ROOT forum and thank you for your report, we will fix this in the next tag.

I think you can either:

  • use latest master instead of the v6.25.01 tag
  • use the latest stable release rather than a development release, i.e. 6.24.02 at the time of writing


Hi @talismanbrandi,

To complement @eguiraud’s reply, since a few weeks the latest stable ROOT version can be obtained by checking out the latest-stable branch, i.e.

$ git clone -b latest-stable
# or this, if you already have a local clone
$ git checkout latest-stable

I would recommend checking out the current master only if you want to have bleeding-edge ROOT.


Thanks a lot @eguiraud and @jalopezg !

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