ROOT Version: 6.14.04, 6.14.06, and 6.16.00
Platform: CentOS 6.10
Compiler: gcc 9.1
Hi,
I’m having issues compiling the latest root 6 versions (6.14.04, 6.14.06, or 6.16.00) on CentOS 6.10 using gcc 9.1.
I’ve installed gcc 9.1 in /opt/gcc9 and adjusted the PATH and LD_LIBRARY_PATH accordingly (also ran ldconfig). The 6.14 versions compile fine using gcc 4.9.3 installed similarly under /usr/local (6.16 fails to compile using gcc 4.9.3 as well).
The errors are for 6.14.04 and 6.14.06:
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::ReOpen(char const*)':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:354: undefined reference to `XrdCl::File::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::GetVectorReadLimits()':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:725: undefined reference to `XrdCl::File::GetProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:727: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::SetEnv()':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:781: undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:786: undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:791: undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:796: undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:801: undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o:/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:806: more undefined references to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' follow
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile::SetEnv()':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:836: undefined reference to `XrdCl::Env::PutString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:841: undefined reference to `XrdCl::Env::PutString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:846: undefined reference to `XrdCl::Env::PutString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:849: undefined reference to `XrdCl::Env::PutInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `TNetXNGFile':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:141: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:174: undefined reference to `XrdCl::File::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, XrdCl::ResponseHandler*, unsigned short)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGFile.cxx:183: undefined reference to `XrdCl::File::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::OpenFlags::Flags, XrdCl::Access::Mode, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGFile.cxx.o: In function `_ZNK5XrdCl12XRootDStatus5ToStrB5cxx11Ev':
/usr/include/xrootd/XrdCl/XrdClXRootDResponses.hh:261: undefined reference to `_ZNK5XrdCl6Status8ToStringB5cxx11Ev'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::GetDirEntry(void*)':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:163: undefined reference to `XrdCl::FileSystem::DirList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::DirListFlags::Flags, XrdCl::DirectoryList*&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `DirectoryInfo':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:54: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::MakeDirectory(char const*)':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:127: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:128: undefined reference to `XrdCl::FileSystem::MkDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::MkDirFlags::Flags, XrdCl::Access::Mode, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::Unlink(char const*)':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:284: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:287: undefined reference to `XrdCl::FileSystem::Stat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::StatInfo*&, unsigned short)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:294: undefined reference to `XrdCl::FileSystem::RmDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:296: undefined reference to `XrdCl::FileSystem::Rm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::GetPathInfo(char const*, FileStat_t&)':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:192: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:193: undefined reference to `XrdCl::FileSystem::Stat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::StatInfo*&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::ConsistentWith(char const*, void*)':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:248: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:89: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:90: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::Stage(TCollection*, unsigned char)':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:416: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:419: undefined reference to `XrdCl::FileSystem::Prepare(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, XrdCl::PrepareFlags::Flags, unsigned char, XrdCl::Buffer*&, unsigned short)'
CMakeFiles/NetxNG.dir/src/TNetXNGSystem.cxx.o: In function `TNetXNGSystem::Locate(char const*, TString&)':
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:330: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:333: undefined reference to `XrdCl::FileSystem::Locate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, XrdCl::OpenFlags::Flags, XrdCl::LocationInfo*&, unsigned short)'
/opt/cern/root/root-6.14.04/net/netxng/src/TNetXNGSystem.cxx:342: undefined reference to `XrdCl::URL::URL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libNetxNG.so] Error 1
make[1]: *** [net/netxng/CMakeFiles/NetxNG.dir/all] Error 2
make: *** [all] Error 2
For 6.16.00 the errors are the same whether using gcc 4.9.3 or 9.1 (or even trying to compile root 7):
/opt/cern/root/root-6.16.00/tree/dataframe/src/RSqliteDS.cxx: In function ‘int {anonymous}::VfsRdOnlyOpen(sqlite3_vfs*, const char*, sqlite3_file*, int, int*)’:
/opt/cern/root/root-6.16.00/tree/dataframe/src/RSqliteDS.cxx:205:4: error: too many initializers for ‘const sqlite3_io_methods’
};
^
/opt/cern/root/root-6.16.00/tree/dataframe/src/RSqliteDS.cxx: At global scope:
/opt/cern/root/root-6.16.00/tree/dataframe/src/RSqliteDS.cxx:332:1: error: too many initializers for ‘sqlite3_vfs’
};
^
/opt/cern/root/root-6.16.00/tree/dataframe/src/RSqliteDS.cxx: In destructor ‘virtual ROOT::RDF::RSqliteDS::~RSqliteDS()’:
/opt/cern/root/root-6.16.00/tree/dataframe/src/RSqliteDS.cxx:480:34: error: ‘sqlite3_close_v2’ was not declared in this scope
sqlite3_close_v2(fDataSet->fDb);
^
/opt/cern/root/root-6.16.00/tree/dataframe/src/RSqliteDS.cxx: In member function ‘void ROOT::RDF::RSqliteDS::SqliteError(int)’:
/opt/cern/root/root-6.16.00/tree/dataframe/src/RSqliteDS.cxx:632:36: error: ‘sqlite3_errstr’ was not declared in this scope
errmsg += sqlite3_errstr(errcode);
Is this a know error aka should I use a different version of gcc, or am I doing something wrong?