Building ROOT with tests

Hello everyone,

I need some help regarding building tests for tmvadnn/root project. I am trying to solve the tasks given for GSoC’18. I am able to build the project from source. But I am not able to run tests for the project. I followed two different ways.

  1. I tried to build the root project with the tests using this command,

cmake …/root -Dtesting=true -DBLAS_FOUND=true ( mentioned here : Generating tests in TMVA-DNN )

and got the log as

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found GCC. Major version 5, minor version 4
-- Performing Test HAS_CXX11
-- Performing Test HAS_CXX11 - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found a 64bit system
-- Found GNU compiler collection
-- Performing Test GLIBCXX_USE_CXX11_ABI
-- Performing Test GLIBCXX_USE_CXX11_ABI - Success
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: RelWithDebInfo
-- Compiler Flags:  -pipe -m64  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -O2 -g -DNDEBUG
-- Looking for ZLib
-- Found ZLIB: /home/ravi/anaconda2/lib/libz.so (found version "1.2.11") 
-- Looking for Unuran
-- Could NOT find UNURAN (missing:  UNURAN_LIBRARY UNURAN_INCLUDE_DIR) 
-- Unuran not found. Switching on builtin_unuran option
-- Looking for Freetype
-- Found Freetype: /home/ravi/anaconda2/lib/libfreetype.so (found version "2.8.0") 
-- Looking for PCRE
-- Found PCRE: /home/ravi/anaconda2/include  
-- Looking for LZMA
-- Found LZMA includes at /home/ravi/anaconda2/include
-- Found LZMA library at /home/ravi/anaconda2/lib/liblzma.so
-- Looking for LZ4
-- LZ4 not found. Switching on builtin_lz4 option
-- Building LZ4 version v1.7.5 included in ROOT itself
-- Looking for X11
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- X11_INCLUDE_DIR: /usr/include
-- X11_LIBRARIES: /usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- X11_Xpm_INCLUDE_PATH: /usr/include
-- X11_Xpm_LIB: /usr/lib/x86_64-linux-gnu/libXpm.so
-- X11_Xft_INCLUDE_PATH: /usr/include
-- X11_Xft_LIB: /usr/lib/x86_64-linux-gnu/libXft.so
-- X11_Xext_INCLUDE_PATH: 
-- X11_Xext_LIB: /usr/lib/x86_64-linux-gnu/libXext.so
-- Could NOT find GIF (missing:  GIF_LIBRARY GIF_INCLUDE_DIR) 
-- Found TIFF: /home/ravi/anaconda2/lib/libtiff.so (found version "4.0.9") 
-- Found PNG: /home/ravi/anaconda2/lib/libpng.so (found version "1.6.32") 
-- Found JPEG: /home/ravi/anaconda2/lib/libjpeg.so  
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Found GSL: /usr/include (found suitable version "2.1", minimum required is "1.10") 
-- Found PythonInterp: /home/ravi/anaconda2/bin/python (found version "2.7.14") 
-- Found PythonLibs: /home/ravi/anaconda2/lib/libpython2.7.so (found version "2.7.14") 
-- Found NUMPY: /home/ravi/.local/lib/python2.7/site-packages/numpy/core/include (found version "1.13.3") 
-- Looking for OpenGL
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Looking for gl2ps
-- Could NOT find GL2PS (missing:  GL2PS_LIBRARY GL2PS_INCLUDE_DIR) 
-- gl2ps not found. Switching on builtin_gl2ps option
-- Looking for LibXml2
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.3") 
-- Looking for OpenSSL
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g") 
-- Looking for Castor
-- Could NOT find CASTOR (missing:  CASTOR_shift_LIBRARY CASTOR_INCLUDE_DIR) 
-- Castor not found. Switching off castor option
-- Looking for MySQL
-- Found MYSQL: /usr/include/mysql  
-- Looking for Oracle
-- Oracle not found.
-- Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client
--    currently found includes: 
-- Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib
--    currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
-- Oracle not found. Switching off oracle option
-- Looking for PostgreSQL
-- Could NOT find PostgreSQL (missing:  POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARY) 
-- PostgreSQL not found. Switching off pgsql option
-- Looking for SQLite
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found Sqlite: /home/ravi/anaconda2/include  
-- Looking for Pythia6
-- Pythia6 not found. Switching off pythia6 option
-- Looking for Pythia8
-- Could NOT find Pythia8 (missing:  PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY) 
-- Pythia8 not found. Switching off pythia8 option
-- Looking for FFTW3
-- Found fftw3 includes at /usr/include
-- Found fftw3 library at /usr/lib/x86_64-linux-gnu/libfftw3.so
-- Looking for CFITSIO
-- Found CFITSIO: /usr/include  
-- Found CFITSIO version: 3.37
-- Looking for XROOTD
-- XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation
--                   Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally
--                   For the time being switching OFF 'xrootd' option
-- Could NOT find GFAL (missing:  GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARY) 
-- GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
                      and the variable SRM_IFCE_DIR to the srm_ifce installation
-- For the time being switching OFF 'gfal' option
-- Looking for DAVIX
-- Could NOT find DAVIX (missing:  DAVIX_INCLUDE_DIR DAVIX_LIBRARY) 
-- Davix not found. You can enable the option 'builtin_davix' to build the library internally'
--                  For the time being switching off 'davix' option
-- Looking for TBB
-- Could NOT find TBB (missing:  TBB_ROOT_DIR TBB_INCLUDE_DIR TBB_LIBRARY) 
-- TBB not found. Switching on builtin_tbb option
-- Performing Test CXX_HAS_mno_rtm
-- Performing Test CXX_HAS_mno_rtm - Success
-- Looking for BLAS for optional parts of TMVA
-- Looking for dgemm_
-- Looking for dgemm_ - found
-- A library with BLAS API found.
-- Enabled support for:  asimage astiff builtin_afterimage builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_lz4 builtin_tbb builtin_unuran cling cxx11 exceptions explicitlink fftw3 fitsio gdml genvector http imt mathmore mysql opengl pch python roofit shared sqlite ssl thread tmva x11 xft xml
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include  
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- SysLibs: rt;dl;tinfo;-lpthread;/home/ravi/anaconda2/lib/libz.so
-- Targeting X86
-- Could NOT find Z3 (missing:  Z3_LIBRARIES Z3_INCLUDE_DIR) (Required is at least version "4.5")
-- Clang version: 5.0.0
-- Cling version (from VERSION file): ROOT_0.6~dev
-- Cling will look for C++ headers in '/usr/include/c++/5:/usr/include/x86_64-linux-gnu/c++/5:/usr/include/c++/5/backward' at runtime.
-- And if not found, will invoke: 'g++-5' for them.
-- Performing Test CXX_HAS_Wno_maybe_uninitialized
-- Performing Test CXX_HAS_Wno_maybe_uninitialized - Success
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Success
-- Performing Test C_HAS_Wno_strict_overflow
-- Performing Test C_HAS_Wno_strict_overflow - Success
-- Performing Test C_HAS_Wno_maybe_uninitialized
-- Performing Test C_HAS_Wno_maybe_uninitialized - Success
-- Performing Test C_HAS_Wno_parentheses_equality
-- Performing Test C_HAS_Wno_parentheses_equality - Success
-- Performing Test CXX_HAS_fno_strict_aliasing
-- Performing Test CXX_HAS_fno_strict_aliasing - Success
-- Performing Test CXX_HAS_Wno_parentheses_equality
-- Performing Test CXX_HAS_Wno_parentheses_equality - Success
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Success
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Failed
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Failed
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Failed
-- Performing Test found_attribute_always_inline
-- Performing Test found_attribute_always_inline - Success
Running /media/ravi/Studies/GSOC/CERN-HCF/Tasks/root/build/unix/compiledata.sh
Making /media/ravi/Studies/GSOC/CERN-HCF/Tasks/bld/include/compiledata.h
-- 238/739 tutorials have been vetoed for various reasons
-- Configuring done
-- Generating done
-- Build files have been written to: /media/ravi/Studies/GSOC/CERN-HCF/Tasks/bld
Target testForwardPass already exists. Renaming target name to testForwardPass_new
Target testForwardPassCpu already exists. Renaming target name to testForwardPassCpu_new
CMake Warning at cmake/modules/RootNewMacros.cmake:627 (add_library):
  Cannot generate a safe runtime search path for target RHTTP because files
  in some directories may conflict with libraries in implicit directories:

   runtime library [libssl.so.1.0.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/ravi/anaconda2/lib
    runtime library [libcrypto.so.1.0.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/ravi/anaconda2/lib

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  cmake/modules/RootNewMacros.cmake:954 (ROOT_LINKER_LIBRARY)
  net/http/CMakeLists.txt:55 (ROOT_STANDARD_LIBRARY_PACKAGE)

I am able to run the test as

ctest -j4 -R TMVA-DNN*

but I got all the tests failed as in,

Test project /media/ravi/Studies/GSOC/CERN-HCF/Tasks/bld
      Start 132: TMVA-DNN-Arithmetic-Cpu
      Start 133: TMVA-DNN-Activation-Functions-Cpu
      Start 134: TMVA-DNN-Loss-Functions-Cpu
      Start 135: TMVA-DNN-Derivatives-Cpu
 1/43 Test #134: TMVA-DNN-Loss-Functions-Cpu ............***Failed    0.02 sec
 2/43 Test #133: TMVA-DNN-Activation-Functions-Cpu ......***Failed    0.03 sec
 3/43 Test #135: TMVA-DNN-Derivatives-Cpu ...............***Failed    0.03 sec
 4/43 Test #132: TMVA-DNN-Arithmetic-Cpu ................***Failed    0.03 sec
      Start 136: TMVA-DNN-Backpropagation-Cpu
      Start 137: TMVA-DNN-Backpropagation-DL-Cpu
      Start 138: TMVA-DNN-Data-Loader-Cpu
      Start 139: TMVA-DNN-Minimization-Cpu
 5/43 Test #139: TMVA-DNN-Minimization-Cpu ..............***Failed    0.03 sec
 6/43 Test #138: TMVA-DNN-Data-Loader-Cpu ...............***Failed    0.03 sec
 7/43 Test #136: TMVA-DNN-Backpropagation-Cpu ...........***Failed    0.04 sec
 8/43 Test #137: TMVA-DNN-Backpropagation-DL-Cpu ........***Failed    0.04 sec
      Start 140: TMVA-DNN-Activation-Functions
      Start 141: TMVA-DNN-Loss-Functions
      Start 142: TMVA-DNN-Derivatives
      Start 143: TMVA-DNN-Backpropagation
 9/43 Test #141: TMVA-DNN-Loss-Functions ................***Failed    0.02 sec
10/43 Test #143: TMVA-DNN-Backpropagation ...............***Failed    0.02 sec
11/43 Test #142: TMVA-DNN-Derivatives ...................***Failed    0.03 sec
12/43 Test #140: TMVA-DNN-Activation-Functions ..........***Failed    0.03 sec
      Start 144: TMVA-DNN-Backpropagation-DL
      Start 145: TMVA-DNN-Data-Loader
      Start 146: TMVA-DNN-CNN-Im2Col
      Start 147: TMVA-DNN-CNN-Downsample
13/43 Test #146: TMVA-DNN-CNN-Im2Col ....................***Failed    0.03 sec
14/43 Test #145: TMVA-DNN-Data-Loader ...................***Failed    0.03 sec
15/43 Test #147: TMVA-DNN-CNN-Downsample ................***Failed    0.03 sec
16/43 Test #144: TMVA-DNN-Backpropagation-DL ............***Failed    0.03 sec
      Start 148: TMVA-DNN-CNN-testFlatten
      Start 149: TMVA-DNN-CNN-rotWeights
      Start 150: TMVA-DNN-CNN-Forward
      Start 151: TMVA-DNN-CNN-Loss
17/43 Test #150: TMVA-DNN-CNN-Forward ...................***Failed    0.02 sec
18/43 Test #151: TMVA-DNN-CNN-Loss ......................***Failed    0.03 sec
19/43 Test #149: TMVA-DNN-CNN-rotWeights ................***Failed    0.03 sec
20/43 Test #148: TMVA-DNN-CNN-testFlatten ...............***Failed    0.04 sec
      Start 152: TMVA-DNN-CNN-Pred
      Start 153: TMVA-DNN-CNN-Backpropagation
      Start 154: TMVA-DNN-Tensor-Data-Loader
      Start 155: TMVA-DNN-CNN-Minimization
21/43 Test #152: TMVA-DNN-CNN-Pred ......................***Failed    0.03 sec
22/43 Test #154: TMVA-DNN-Tensor-Data-Loader ............***Failed    0.02 sec
23/43 Test #155: TMVA-DNN-CNN-Minimization ..............***Failed    0.03 sec
24/43 Test #153: TMVA-DNN-CNN-Backpropagation ...........***Failed    0.03 sec
      Start 156: TMVA-DNN-CNN-MethodDL
      Start 157: TMVA-DNN-CNN-Im2Col-CPU
      Start 158: TMVA-DNN-CNN-Downsample-CPU
      Start 159: TMVA-DNN-CNN-rotWeights-CPU
25/43 Test #158: TMVA-DNN-CNN-Downsample-CPU ............***Failed    0.02 sec
26/43 Test #157: TMVA-DNN-CNN-Im2Col-CPU ................***Failed    0.03 sec
27/43 Test #156: TMVA-DNN-CNN-MethodDL ..................***Failed    0.03 sec
28/43 Test #159: TMVA-DNN-CNN-rotWeights-CPU ............***Failed    0.02 sec
      Start 160: TMVA-DNN-CNN-Forward-CPU
      Start 161: TMVA-DNN-CNN-Loss-CPU
      Start 162: TMVA-DNN-CNN-Pred-CPU
      Start 163: TMVA-DNN-Tensor-Data-Loader-CPU
29/43 Test #163: TMVA-DNN-Tensor-Data-Loader-CPU ........***Failed    0.02 sec
30/43 Test #161: TMVA-DNN-CNN-Loss-CPU ..................***Failed    0.03 sec
31/43 Test #162: TMVA-DNN-CNN-Pred-CPU ..................***Failed    0.03 sec
32/43 Test #160: TMVA-DNN-CNN-Forward-CPU ...............***Failed    0.03 sec
      Start 164: TMVA-DNN-CNN-Minimization-CPU
      Start 165: TMVA-DNN-DAE-CorruptionLayer
      Start 166: TMVA-DNN-DAE-CompressionLayer
      Start 167: TMVA-DNN-DAE-ReconstructionLayer
33/43 Test #165: TMVA-DNN-DAE-CorruptionLayer ...........***Failed    0.03 sec
34/43 Test #167: TMVA-DNN-DAE-ReconstructionLayer .......***Failed    0.02 sec
35/43 Test #166: TMVA-DNN-DAE-CompressionLayer ..........***Failed    0.03 sec
36/43 Test #164: TMVA-DNN-CNN-Minimization-CPU ..........***Failed    0.03 sec
      Start 168: TMVA-DNN-DAE-LogisticRegressionLayer
      Start 169: TMVA-DNN-DAE-NetPreTrain
      Start 170: TMVA-DNN-DAE-NetFineTune
      Start 171: TMVA-DNN-RNN-Backpropagation
37/43 Test #170: TMVA-DNN-DAE-NetFineTune ...............***Failed    0.03 sec
38/43 Test #169: TMVA-DNN-DAE-NetPreTrain ...............***Failed    0.03 sec
39/43 Test #168: TMVA-DNN-DAE-LogisticRegressionLayer ...***Failed    0.03 sec
40/43 Test #171: TMVA-DNN-RNN-Backpropagation ...........***Failed    0.02 sec
      Start 172: TMVA-DNN-RNN-Forward
      Start 173: TMVA-DNN-RNN-FullRNN
      Start 174: TMVA-DNN-RNN-Forward-Cpu
41/43 Test #174: TMVA-DNN-RNN-Forward-Cpu ...............***Failed    0.02 sec
42/43 Test #173: TMVA-DNN-RNN-FullRNN ...................***Failed    0.02 sec
43/43 Test #172: TMVA-DNN-RNN-Forward ...................***Failed    0.03 sec

0% tests passed, 43 tests failed out of 43

Total Test time (real) =   0.83 sec

The following tests FAILED:
	132 - TMVA-DNN-Arithmetic-Cpu (Failed)
	133 - TMVA-DNN-Activation-Functions-Cpu (Failed)
	134 - TMVA-DNN-Loss-Functions-Cpu (Failed)
	135 - TMVA-DNN-Derivatives-Cpu (Failed)
	136 - TMVA-DNN-Backpropagation-Cpu (Failed)
	137 - TMVA-DNN-Backpropagation-DL-Cpu (Failed)
	138 - TMVA-DNN-Data-Loader-Cpu (Failed)
	139 - TMVA-DNN-Minimization-Cpu (Failed)
	140 - TMVA-DNN-Activation-Functions (Failed)
	141 - TMVA-DNN-Loss-Functions (Failed)
	142 - TMVA-DNN-Derivatives (Failed)
	143 - TMVA-DNN-Backpropagation (Failed)
	144 - TMVA-DNN-Backpropagation-DL (Failed)
	145 - TMVA-DNN-Data-Loader (Failed)
	146 - TMVA-DNN-CNN-Im2Col (Failed)
	147 - TMVA-DNN-CNN-Downsample (Failed)
	148 - TMVA-DNN-CNN-testFlatten (Failed)
	149 - TMVA-DNN-CNN-rotWeights (Failed)
	150 - TMVA-DNN-CNN-Forward (Failed)
	151 - TMVA-DNN-CNN-Loss (Failed)
	152 - TMVA-DNN-CNN-Pred (Failed)
	153 - TMVA-DNN-CNN-Backpropagation (Failed)
	154 - TMVA-DNN-Tensor-Data-Loader (Failed)
	155 - TMVA-DNN-CNN-Minimization (Failed)
	156 - TMVA-DNN-CNN-MethodDL (Failed)
	157 - TMVA-DNN-CNN-Im2Col-CPU (Failed)
	158 - TMVA-DNN-CNN-Downsample-CPU (Failed)
	159 - TMVA-DNN-CNN-rotWeights-CPU (Failed)
	160 - TMVA-DNN-CNN-Forward-CPU (Failed)
	161 - TMVA-DNN-CNN-Loss-CPU (Failed)
	162 - TMVA-DNN-CNN-Pred-CPU (Failed)
	163 - TMVA-DNN-Tensor-Data-Loader-CPU (Failed)
	164 - TMVA-DNN-CNN-Minimization-CPU (Failed)
	165 - TMVA-DNN-DAE-CorruptionLayer (Failed)
	166 - TMVA-DNN-DAE-CompressionLayer (Failed)
	167 - TMVA-DNN-DAE-ReconstructionLayer (Failed)
	168 - TMVA-DNN-DAE-LogisticRegressionLayer (Failed)
	169 - TMVA-DNN-DAE-NetPreTrain (Failed)
	170 - TMVA-DNN-DAE-NetFineTune (Failed)
	171 - TMVA-DNN-RNN-Backpropagation (Failed)
	172 - TMVA-DNN-RNN-Forward (Failed)
	173 - TMVA-DNN-RNN-FullRNN (Failed)
	174 - TMVA-DNN-RNN-Forward-Cpu (Failed)
  1. I tried to build the root project with tests using the command,

cmake …/root -Dtesting=ON -Droottest=ON ( mentioned here : https://github.com/root-project/roottest )

and got the log as,

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found GCC. Major version 5, minor version 4
-- Performing Test HAS_CXX11
-- Performing Test HAS_CXX11 - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found a 64bit system
-- Found GNU compiler collection
-- Performing Test GLIBCXX_USE_CXX11_ABI
-- Performing Test GLIBCXX_USE_CXX11_ABI - Success
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: RelWithDebInfo
-- Compiler Flags:  -pipe -m64  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -O2 -g -DNDEBUG
-- Looking for ZLib
-- Found ZLIB: /home/ravi/anaconda2/lib/libz.so (found version "1.2.11") 
-- Looking for Unuran
-- Could NOT find UNURAN (missing:  UNURAN_LIBRARY UNURAN_INCLUDE_DIR) 
-- Unuran not found. Switching on builtin_unuran option
-- Looking for Freetype
-- Found Freetype: /home/ravi/anaconda2/lib/libfreetype.so (found version "2.8.0") 
-- Looking for PCRE
-- Found PCRE: /home/ravi/anaconda2/include  
-- Looking for LZMA
-- Found LZMA includes at /home/ravi/anaconda2/include
-- Found LZMA library at /home/ravi/anaconda2/lib/liblzma.so
-- Looking for LZ4
-- LZ4 not found. Switching on builtin_lz4 option
-- Building LZ4 version v1.7.5 included in ROOT itself
-- Looking for X11
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- X11_INCLUDE_DIR: /usr/include
-- X11_LIBRARIES: /usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- X11_Xpm_INCLUDE_PATH: /usr/include
-- X11_Xpm_LIB: /usr/lib/x86_64-linux-gnu/libXpm.so
-- X11_Xft_INCLUDE_PATH: /usr/include
-- X11_Xft_LIB: /usr/lib/x86_64-linux-gnu/libXft.so
-- X11_Xext_INCLUDE_PATH: 
-- X11_Xext_LIB: /usr/lib/x86_64-linux-gnu/libXext.so
-- Could NOT find GIF (missing:  GIF_LIBRARY GIF_INCLUDE_DIR) 
-- Found TIFF: /home/ravi/anaconda2/lib/libtiff.so (found version "4.0.9") 
-- Found PNG: /home/ravi/anaconda2/lib/libpng.so (found version "1.6.32") 
-- Found JPEG: /home/ravi/anaconda2/lib/libjpeg.so  
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Found GSL: /usr/include (found suitable version "2.1", minimum required is "1.10") 
-- Found PythonInterp: /home/ravi/anaconda2/bin/python (found version "2.7.14") 
-- Found PythonLibs: /home/ravi/anaconda2/lib/libpython2.7.so (found version "2.7.14") 
-- Found NUMPY: /home/ravi/.local/lib/python2.7/site-packages/numpy/core/include (found version "1.13.3") 
-- Looking for OpenGL
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Looking for gl2ps
-- Could NOT find GL2PS (missing:  GL2PS_LIBRARY GL2PS_INCLUDE_DIR) 
-- gl2ps not found. Switching on builtin_gl2ps option
-- Looking for LibXml2
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.3") 
-- Looking for OpenSSL
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g") 
-- Looking for Castor
-- Could NOT find CASTOR (missing:  CASTOR_shift_LIBRARY CASTOR_INCLUDE_DIR) 
-- Castor not found. Switching off castor option
-- Looking for MySQL
-- Found MYSQL: /usr/include/mysql  
-- Looking for Oracle
-- Oracle not found.
-- Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client
--    currently found includes: 
-- Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib
--    currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
-- Oracle not found. Switching off oracle option
-- Looking for PostgreSQL
-- Could NOT find PostgreSQL (missing:  POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARY) 
-- PostgreSQL not found. Switching off pgsql option
-- Looking for SQLite
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found Sqlite: /home/ravi/anaconda2/include  
-- Looking for Pythia6
-- Pythia6 not found. Switching off pythia6 option
-- Looking for Pythia8
-- Could NOT find Pythia8 (missing:  PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY) 
-- Pythia8 not found. Switching off pythia8 option
-- Looking for FFTW3
-- Found fftw3 includes at /usr/include
-- Found fftw3 library at /usr/lib/x86_64-linux-gnu/libfftw3.so
-- Looking for CFITSIO
-- Found CFITSIO: /usr/include  
-- Found CFITSIO version: 3.37
-- Looking for XROOTD
-- XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation
--                   Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally
--                   For the time being switching OFF 'xrootd' option
-- Could NOT find GFAL (missing:  GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARY) 
-- GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
                      and the variable SRM_IFCE_DIR to the srm_ifce installation
-- For the time being switching OFF 'gfal' option
-- Looking for DAVIX
-- Could NOT find DAVIX (missing:  DAVIX_INCLUDE_DIR DAVIX_LIBRARY) 
-- Davix not found. You can enable the option 'builtin_davix' to build the library internally'
--                  For the time being switching off 'davix' option
-- Looking for TBB
-- Could NOT find TBB (missing:  TBB_ROOT_DIR TBB_INCLUDE_DIR TBB_LIBRARY) 
-- TBB not found. Switching on builtin_tbb option
-- Performing Test CXX_HAS_mno_rtm
-- Performing Test CXX_HAS_mno_rtm - Success
-- Looking for BLAS for optional parts of TMVA
-- Looking for dgemm_
-- Looking for dgemm_ - found
-- A library with BLAS API found.
-- Enabled support for:  asimage astiff builtin_afterimage builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_lz4 builtin_tbb builtin_unuran cling cxx11 exceptions explicitlink fftw3 fitsio gdml genvector http imt mathmore mysql opengl pch python roofit shared sqlite ssl thread tmva x11 xft xml
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include  
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- SysLibs: rt;dl;tinfo;-lpthread;/home/ravi/anaconda2/lib/libz.so
-- Targeting X86
-- Could NOT find Z3 (missing:  Z3_LIBRARIES Z3_INCLUDE_DIR) (Required is at least version "4.5")
-- Clang version: 5.0.0
-- Cling version (from VERSION file): ROOT_0.6~dev
-- Cling will look for C++ headers in '/usr/include/c++/5:/usr/include/x86_64-linux-gnu/c++/5:/usr/include/c++/5/backward' at runtime.
-- And if not found, will invoke: 'g++-5' for them.
-- Performing Test CXX_HAS_Wno_maybe_uninitialized
-- Performing Test CXX_HAS_Wno_maybe_uninitialized - Success
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Success
-- Performing Test C_HAS_Wno_strict_overflow
-- Performing Test C_HAS_Wno_strict_overflow - Success
-- Performing Test C_HAS_Wno_maybe_uninitialized
-- Performing Test C_HAS_Wno_maybe_uninitialized - Success
-- Performing Test C_HAS_Wno_parentheses_equality
-- Performing Test C_HAS_Wno_parentheses_equality - Success
-- Performing Test CXX_HAS_fno_strict_aliasing
-- Performing Test CXX_HAS_fno_strict_aliasing - Success
-- Performing Test CXX_HAS_Wno_parentheses_equality
-- Performing Test CXX_HAS_Wno_parentheses_equality - Success
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Success
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Failed
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Failed
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Failed
-- Performing Test found_attribute_always_inline
-- Performing Test found_attribute_always_inline - Success
Running /media/ravi/Studies/GSOC/CERN-HCF/Tasks/root/build/unix/compiledata.sh
Making /media/ravi/Studies/GSOC/CERN-HCF/Tasks/bld2/include/compiledata.h
Target testForwardPass already exists. Renaming target name to testForwardPass_new
Target testForwardPassCpu already exists. Renaming target name to testForwardPassCpu_new
-- 238/739 tutorials have been vetoed for various reasons
-- Found Git: /usr/bin/git (found version "2.16.2") 
-- Could not find roottest directory! Cloning from the repository...
Cloning into 'roottest'...
warning: redirecting to https://github.com/root-project/roottest.git/
fatal: Remote branch HEAD not found in upstream origin
CMake Error at CMakeLists.txt:459 (add_subdirectory):
  add_subdirectory given source "roottest" which is not an existing
  directory.


-- Configuring incomplete, errors occurred!
See also "/media/ravi/Studies/GSOC/CERN-HCF/Tasks/bld2/CMakeFiles/CMakeOutput.log".
See also "/media/ravi/Studies/GSOC/CERN-HCF/Tasks/bld2/CMakeFiles/CMakeError.log".

I am getting “No tests were found!!!” here.

Could you please suggest me a solution?

Dear @ravikiran0606
appear to be that you have conflicts between the system libraries and anaconda libraries.

runtime library [libssl.so.1.0.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/ravi/anaconda2/lib
runtime library [libcrypto.so.1.0.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/home/ravi/anaconda2/lib

try removing anaconda environment.

for tests just run cmake -Dtmva=ON -Dtesting=ON
Cheers.

1 Like

Dear @omazapa,

Thanks for the solution. It worked. Now I am able to build the project with tests and tests were also passed. I need some example of adding a new test for my new code ( new layer in CNN ). I am not clear with this doc ( https://github.com/root-project/roottest ). I would like to know if there is another doc for adding tests or any example procedure?

I would also like to know what files should I modify to add a new test?

Thanks.

1 Like

Hi,

For TMVA, the tests are currently located in the main root repo under tmva/tmva/test where you can see how they are added to cmake and some examples.

Do note that new tests should use googletest if at all possible.

Cheers,
Kim

1 Like

ranjeet@ranjeet-Aspire-ES1-512:~/Downloads/root-6.16.00$ cmake /home/ranjeet/Downloads/root-6.16.00/
– ROOT default compression algorithm: zlib
– Found GCC. Major version 8, minor version 8
– Found a 64bit system
– Found GNU compiler collection
– ROOT Platform: linux
– ROOT Architecture: linuxx8664gcc
– Build Type: RelWithDebInfo
– Compiler Flags: -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -std=c++11 _
CMake Error at cmake/modules/RootNewMacros.cmake:1073 (message):
_ ROOT should be built as an out of source build, to keep the source

_ directory clean. Please create a extra build directory and run the command_
_ ‘cmake <path_to_source_dir>’ in this newly created directory. You have_
_ also to delete the directory CMakeFiles and the file CMakeCache.txt in the_
_ source directory. Otherwise cmake will complain even if you run it from an_
_ out-of-source directory._
Call Stack (most recent call first):
_ CMakeLists.txt:147 (ROOT_CHECK_OUT_OF_SOURCE_BUILD)_

– Configuring incomplete, errors occurred!
See also “/home/ranjeet/Downloads/root-6.16.00/CMakeFiles/CMakeOutput.log”.
See also “/home/ranjeet/Downloads/root-6.16.00/CMakeFiles/CMakeError.log”.
Please help me to fix it.

Hi!

First, in the future, please create a new topic for your question instead of reviving an old one.

Second, I think the solution is in the error message. Let me make it a bit more clear :slight_smile:

So delete the folder CMakeFiles and the file CMakeCache.txt that was created in the ROOT directory.

Then create a new directory somewhere (e.g. by mkdir ../root-build). Then cd into this dir and run e.g. cmake ../root-src and finally cmake —build . — -j4.

This having a separate directory for the compilation is called an out-of-source build and keeps the source directory tidy.

Thanks to answer this problem. I really appreciate for your reply. I apolozize

Thanks to answer this problem. I really appreciate for you reply.
I apologize for asking question on someone else’s blog, and for being replied late.

With regards

  • Ranjeet Walia

3rd Year Student

Bachelor of Technology

Computer Science & Engineering

NIT Hamirpur, India