Error when compiling T2K / ND280 ROOT v5r34p34n00 on LXPLUS

Dear Colleagues,

I am trying to install ROOT 5.34/34 and I get this error when compiling:

In file included from /usr/include/xrootd/XrdCl/XrdClXRootDResponses.hh:22,
                 from /usr/include/xrootd/XrdCl/XrdClFileSystem.hh:32,
                 from include/TNetXNGFile.h:28,
                 from /afs/cern.ch/work/c/cschloes/T2K/ND280/test_root/ROOT/v5r34p34n00/amd64_linux26/root/net/netxng/src/TNetXNGFile.cxx:21:
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:50: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:50: error: invalid constructor; you probably meant ‘XrdCl::Buffer (const XrdCl::Buffer&)’
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:58: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:249: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/include/xrootd/XrdCl/XrdClBuffer.hh: In member function ‘XrdCl::Buffer& XrdCl::Buffer::operator=(XrdCl::Buffer)’:
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:60: error: ‘move’ is not a member of ‘std’
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:60: error: ‘buffer’ was not declared in this scope
/usr/include/xrootd/XrdCl/XrdClBuffer.hh: In member function ‘void XrdCl::Buffer::Steal(XrdCl::Buffer)’:
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:251: error: ‘buffer’ was not declared in this scope
make[4]: *** [net/netxng/src/TNetXNGFile.o] Error 1
make[4]: Leaving directory `/afs/cern.ch/work/c/cschloes/T2K/ND280/test_root/ROOT/v5r34p34n00/amd64_linux26/root'
make[4]: Entering directory `/afs/cern.ch/work/c/cschloes/T2K/ND280/test_root/ROOT/v5r34p34n00/amd64_linux26/root'
bin/rmkdepend -R -fnet/netxng/src/TNetXNGFile.d -Y -w 1000 -- -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR__HAVE_CONFIG     -pthread -I/usr/include/xrootd -Wno-unused-parameter -Wno-shadow -D__cplusplus -- /afs/cern.ch/work/c/cschloes/T2K/ND280/test_root/ROOT/v5r34p34n00/amd64_linux26/root/net/netxng/src/TNetXNGFile.cxx
g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR__HAVE_CONFIG     -pthread -I/usr/include/xrootd -Wno-unused-parameter -Wno-shadow -o net/netxng/src/TNetXNGFile.o -c /afs/cern.ch/work/c/cschloes/T2K/ND280/test_root/ROOT/v5r34p34n00/amd64_linux26/root/net/netxng/src/TNetXNGFile.cxx
In file included from /usr/include/xrootd/XrdCl/XrdClXRootDResponses.hh:22,
                 from /usr/include/xrootd/XrdCl/XrdClFileSystem.hh:32,
                 from include/TNetXNGFile.h:28,
                 from /afs/cern.ch/work/c/cschloes/T2K/ND280/test_root/ROOT/v5r34p34n00/amd64_linux26/root/net/netxng/src/TNetXNGFile.cxx:21:
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:50: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:50: error: invalid constructor; you probably meant ‘XrdCl::Buffer (const XrdCl::Buffer&)’
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:58: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:249: error: expected ‘,’ or ‘...’ before ‘&&’ token
/usr/include/xrootd/XrdCl/XrdClBuffer.hh: In member function ‘XrdCl::Buffer& XrdCl::Buffer::operator=(XrdCl::Buffer)’:
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:60: error: ‘move’ is not a member of ‘std’
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:60: error: ‘buffer’ was not declared in this scope
/usr/include/xrootd/XrdCl/XrdClBuffer.hh: In member function ‘void XrdCl::Buffer::Steal(XrdCl::Buffer)’:
/usr/include/xrootd/XrdCl/XrdClBuffer.hh:251: error: ‘buffer’ was not declared in this scope
make[4]: *** [net/netxng/src/TNetXNGFile.o] Error 1
make[4]: Leaving directory `/afs/cern.ch/work/c/cschloes/T2K/ND280/test_root/ROOT/v5r34p34n00/amd64_linux26/root'
make[3]: *** [/afs/cern.ch/work/c/cschloes/T2K/ND280/test_root/ROOT/v5r34p34n00/amd64_linux26/ROOT.stamp] Error 2
make[2]: *** [ROOT] Error 2
make[1]: *** [common_target] Error 2
make: *** [check_config] Error 2
#CMT---> Error: execution_error : make

Has there been a problem with these libraries in /usr/include/xrootd/XrdCl/ before? Does anyone know how to fix this?

Thanks in advance!
Best,
Caspar

Hi Caspar,

Most probably 5.34.34 version cannot be compiled with newer compilers.

You should try either 5.34.38 release or v5-34-00-patches branch from repository.

Regards,
Sergey

What is the operating system version and what do you get from: g++ --version

Hi Wile_E_Coyote,

I am using CERN’s LXPLUS, so Scientific Linux CERN 6.
I get

g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)```

Thanks,
Caspar

Well, for the moment, I’m afraid you may need to “disable” it … in the ROOT/v5r34p34n00/src/compile_root file, add --disable-xrootd to another existing configure’s options there (then you need to build it from scratch again).

It seems to me that std::move requires at least C++11, which means that with g++ 4.4.7 you would need to use --std=c++0x (or --std=gnu++0x) but this may break another T2K / ND280 source code (including the used ROOT version itself).

Thanks for you help. I actually managed to compile with a newer version of g++ (4.8.5).
So far it didn’t seem to break anything else. If it does, I’ll just disable xrootd.

Best,
Caspar

This is somehow surprising.

Can you please try to run root-config --has-xrootd and see if you get “yes” and then root-config -- features and see is you have “builtin_xrootd” inside?
And then try: find ${ROOTSYS}/lib -name "libNetx*"

I think g++ 4.8.5 should also need: --std=c++11

@Axel It seems to me that there was a xrootd update recently. The new version xrootd-4.9.0 requires C++11 while the previous version xrootd-4.8.5 did not.

Hi Wile_E_Coyote,

When I run root-config --has-xrootd, I get yes. Running root-config --features does not give builtin_xrootd, just xrootd.
Running the find command (find ${ROOTSYS}/lib -name "libNetx*") does not give any output.
However, everything has compiled fine by just using g++ 4.8.5

Best,
Caspar

If you have no “libNetx*” (and there should be “libNetx.so*” and “libNetxNG.so*”) then your ROOT build died (but another features / libraries, which do not depend on xrootd and have already been built, will be fine, I guess).

So first off this doesn’t seem to be related to ROOT - it’s just triggered by ROOT:

the slc6 folks apparently installed a new xroot client version that cannot be compiled with the distro’s compiler. That’s just terrible. You might want to open a Service Now ticket with them; compiling a source file with the single line #include "xrootd/XrdCl/XrdClFileSystem.hh" should exhibit that error.

Cheers, Axel.

Actually, I think you should be able to compile it with gcc 4.4.7, you just need --std=c++0x (or --std=gnu++0x ).

The problem with the new xrootd is more general. It’s the “epel” repository which provides it and they simply committed the new version for SL(C) 6 and CentOS 7 (without checking that it requires some additional compilation flags). So, everybody, who uses this repository, got this update, too. What’s worse, the “epel” repository does not keep old versions of packages so, it is not that straightforward when you want to “downgrade” it.

And indeed, -std=c++0x is what the masters of xrootd recommend: https://github.com/xrootd/xrootd/blob/v4.7.0/docs/ReleaseNotes.txt#L72

So, they actually “Enable c++0x/c++11 by default” starting with the xrootd-4.7.0 release.
However, some weeks ago, I was able to built ROOT 5 with xrootd-4.8.5 (from “epel”) on a CentOS 7 machine. First xrootd-4.9.0 really broke it.

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