ROOT v5-34-00-patches and v5-34-36 on Ubuntu 16.04

Here’s my “report” from building ROOT v5-34-00-patches (as of 2016.06.11 09:27 UTC) and v5-34-36 on Ubuntu 16.04 LTS / x86_64 with gcc 5.3.1 (5.3.1-14ubuntu2.1 20160413) and “./configure”.

Configure does not find the installed “PYTHIA 8” and one needs to manually set: --with-pythia8-incdir=/usr/include/Pythia8"

Configure does not find the installed “iODBC” and one needs to manually set: --with-odbc-incdir=/usr/include/iodbc"

Building of “davix” generates a warning: /opt/ROOT/debug/v5-34-00-patches/net/davix/src/TDavixSystem.cxx: In member function ‘virtual Int_t TDavixSystem::Locate(const char*, TString&)’: /opt/ROOT/debug/v5-34-00-patches/net/davix/src/TDavixSystem.cxx:168:41: warning: ‘dav_ssize_t Davix::DavFile::getAllReplicas(const Davix::RequestParams*, Davix::ReplicaVec&, Davix::DavixError**)’ is deprecated [-Wdeprecated-declarations] &davixErr)) < 0) { ^ In file included from /usr/include/davix/utils/davix_types.hpp:43:0, from /usr/include/davix/davix_file_types.hpp:25, from /usr/include/davix/davix.hpp:48, from /opt/ROOT/debug/v5-34-00-patches/net/davix/src/TDavixSystem.cxx:45: /usr/include/davix/file/davfile.hpp:382:28: note: declared here DEPRECATED(dav_ssize_t getAllReplicas(const RequestParams* params, ^ /usr/include/davix/utils/davix_config.hpp:127:26: note: in definition of macro ‘DEPRECATED’ #define DEPRECATED(func) func __attribute__ ((deprecated)) ^

Building of “gfal” dies with an error: g++ -g -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -I/usr/include/python2.7 -o bindings/pyroot/src/TSetItemHolder.o -c /opt/ROOT/debug/v5-34-00-patches/bindings/pyroot/src/TSetItemHolder.cxx /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx: In member function ‘virtual Int_t TGFALFile::SysOpen(const char*, Int_t, UInt_t)’: /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:211:16: error: ‘::gfal_open64’ has not been declared Int_t ret = ::gfal_open64(pathname, flags, (Int_t) mode); ^ /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx: In member function ‘virtual Long64_t TGFALFile::SysSeek(Int_t, Long64_t, Int_t)’: /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:253:19: error: ‘::gfal_lseek64’ has not been declared Long64_t ret = ::gfal_lseek64(fd, offset, whence); ^ /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx: In member function ‘virtual Int_t TGFALFile::SysStat(Int_t, Long_t*, Long64_t*, Long_t*, Long_t*)’: /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:271:11: error: ‘::gfal_stat64’ has not been declared if (::gfal_stat64(fRealName, &statbuf) >= 0) ^ /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx: In member function ‘virtual void* TGFALSystem::OpenDirectory(const char*)’: /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:388:8: error: ‘::gfal_stat64’ has not been declared if (::gfal_stat64(url.GetFileAndOptions(), &finfo) < 0) ^ /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx: In member function ‘virtual const char* TGFALSystem::GetDirEntry(void*)’: /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:428:12: error: ‘::gfal_readdir64’ has not been declared dp = ::gfal_readdir64((DIR*)dirp); ^ /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx: In member function ‘virtual Int_t TGFALSystem::GetPathInfo(const char*, FileStat_t&)’: /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:448:16: error: ‘::gfal_stat64’ has not been declared if (path && ::gfal_stat64(url.GetFileAndOptions(), &sbuf) >= 0) { ^ so, one needs to enforce: --disable-gfal

Building of “ruby” dies with an error: In file included from /usr/include/ruby-2.3.0/ruby.h:33:0, from /opt/ROOT/debug/v5-34-00-patches/bindings/ruby/src/TRuby.cxx:15: /usr/include/ruby-2.3.0/ruby/ruby.h:24:25: fatal error: ruby/config.h: No such file or directory compilation terminated. Makefile:701: recipe for target 'bindings/ruby/src/TRuby.o' failed make: *** [bindings/ruby/src/TRuby.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from /usr/include/ruby-2.3.0/ruby.h:33:0, from /opt/ROOT/debug/v5-34-00-patches/bindings/ruby/src/drr.cxx:26: /usr/include/ruby-2.3.0/ruby/ruby.h:24:25: fatal error: ruby/config.h: No such file or directory compilation terminated. Makefile:701: recipe for target 'bindings/ruby/src/drr.o' failed make: *** [bindings/ruby/src/drr.o] Error 1 so, one needs to enforce: --disable-ruby Note: the “missing” (?) file is there: /usr/include/x86_64-linux-gnu/ruby-2.3.0/ruby/config.h BTW. on Ubuntu 14.04, this file exists as: /usr/include/ruby-1.9.1/x86_64-linux/ruby/config.h

Please fix the reported problems.

Hi Pepe,

We’re not maintaining 5.34 anymore. If you find similar errors with v6 then please let us know!

Cheers, Axel.

Attached is a small file with patches which fix all reported bugs.
Please apply them to the current “v5-34-00-patches” branch.
Just some trivial modifications of the “configure” script and the “io/gfal/src/TGFALFile.cxx” file were required.
Note: I did not fix the “davix” warning about “deprecated getAllReplicas” call.
v5-34-00-patches.2016.06.16.11.13.tar.gz (58.4 KB)

Thanks for suggested fixes. I preferred to fix the Module.mk (following what was done in CMake) instead of the source file.

You now unconditionally define “GFAL2_API” in the “io/gfal/Module.mk” and the “io/gfal/CMakeLists.txt” files.
I don’t think this is a good idea.

This particular macro is internally used / defined by some versions of “gfal_api.h” (but not by all of them -> that’s where the problem with “io/gfal/src/TGFALFile.cxx” originated), so we should NOT redefine it (we also cannot guarantee that it will not be used in future again for different purposes).
If you want to modify the “io/gfal/Module.mk” and the “io/gfal/CMakeLists.txt” files (the way you did it), then please define another, completely new macro (using another, ROOT specific name) and then modify also the “io/gfal/src/TGFALFile.cxx” file to use this new (ROOT specific) macro INSTEAD of “GFAL2_API” (note: exactly the same changes need to be applied to the “v5-34-00-patches” and “v6-06-04” branches).
Please fix it.

Note: with your current modifications of the “io/gfal/Module.mk” file, buiding of “gfal2” on Ubuntu 14.04.4 dies with the error: [code]g++ -g -pipe -m64 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -I/usr/include/gfal2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -D_FILE_OFFSET_BITS=64 -D_GFAL2_API_ -o io/gfal/src/TGFALFile.o -c /opt/R
OOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:77:24: error: redefinition of ‘struct stat’
#define stat64 stat
^
In file included from /usr/include/fcntl.h:68:0,
from include/TSystem.h:28,
from include/TGFALFile.h:71,
from /opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:80:
/usr/include/x86_64-linux-gnu/bits/stat.h:46:8: error: previous definition of ‘struct stat’
struct stat
^
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx: In constructor ‘TGFALFile::TGFALFile(const char*, Option_t*, const char*, Int_t)’:
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:128:11: error: ‘::gfal_access’ has not been declared
if (::gfal_access(fname, kFileExists) == 0)
^
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:129:10: error: ‘::gfal_unlink’ has not been declared
::gfal_unlink(fname);
^
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:134:18: error: ‘::gfal_access’ has not been declared
if (create && ::gfal_access(fname, kFileExists) == 0) {

(…)

/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:76:24: error: forward declaration of ‘struct TGFALSystem::GetDirEntry(void*)::dirent’
#define dirent64 dirent
^
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:425:11: note: in expansion of macro ‘dirent64’
struct dirent64 dp;
^
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx: In member function ‘virtual Int_t TGFALSystem::GetPathInfo(const char
, FileStat_t&)’:
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:448:16: error: ‘::gfal_stat’ has not been declared
if (path && ::gfal_stat64(url.GetFileAndOptions(), &sbuf) >= 0) {
^
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx: In member function ‘virtual Bool_t TGFALSystem::AccessPathName(const char*, EAccessMode)’:
/opt/ROOT/debug/v5-34-00-patches/io/gfal/src/TGFALFile.cxx:473:8: error: ‘::gfal_access’ has not been declared
if (::gfal_access(url.GetFileAndOptions(), mode) == 0)
^
make: *** [io/gfal/src/TGFALFile.o] Error 1[/code]
The brutal fix, needed for the moment, is: sed -i -e '{s/_GFAL2_API_/_KILROY_WAS_HERE_/}' `grep -r -l "_GFAL2_API_" ./`

It should be fixed now following you suggestions.

Everything builds smoothly now (on both, Ubuntu 14.04.4 and 16.04 / both x86_64). =D>

BTW. Just for future reference purposes … for the time being, different versions of “/usr/include/gfal2/gfal_api.h” define “GFAL2_API” or “GFAL2_API_H_” … however, in anticipation of any possible future versions … I “protected” the “io/gfal/src/TGFALFile.cxx” file using a “superset” of possible defines: #if defined(_GFAL2_API_) || defined(GFAL2_API_) || defined(_GFAL2_API) || defined(_GFAL2_API_H_) || defined(GFAL2_API_H_) || defined(_GFAL2_API_H)

This thread helped me a lot. Thank you so much for sharing.