ROOT-6 Compilation Issues on Ubuntu

Hello Rooter’s,

I’ve found 1 similar topic on the forum, but it was of not help ([url]ROOT 6.0 installation with CMake fails

I’m trying to compile root-6 on this machine:

uname -a Linux cornavin 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

With

g++ —version g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2

by doing:

git clone http://root.cern.ch/git/root.git cd root git checkout -b v6-00-00 v6-00-00 ./configure —all make -j 2 &>makeroot.log &

But I am getting this error:

/home/wsfreund/root/interpreter/llvm/inst/lib/libLLVMAsmPrinter.a(DwarfUnit.o): In function `llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType)': DwarfUnit.cpp:(.text._ZN4llvm9DwarfUnit16constructTypeDIEERNS_3DIEENS_15DICompositeTypeE+0x74): relocation truncated to fit: R_X86_64_PC32 against `.rodata._ZN4llvm9DwarfUnit16constructTypeDIEERNS_3DIEENS_15DICompositeTypeE' collect2: error: ld returned 1 exit status make: *** [core/utils/src/rootcling_tmp] Error 1

Any ideas? If the entire compilation log would help I can make it available here.

Thanks in advance,
Werner.

Hi Werner,

could you try from the sources tarball? You can find it here:
ftp://root.cern.ch/root/root_v6.00.00.source.tar.gz

Cheers,
Danilo

Hi, thanks for your reply…

wget ftp://root.cern.ch/root/root_v6.00.00.source.tar.gz gzip -dc root_v6.00.00.source.tar.gz | tar -xf - cd root ./configure --all make -j 2 &>makeroot.log &

/home/wsfreund/root/interpreter/llvm/inst/lib/libLLVMMCParser.a(AsmParser.o): In function `(anonymous namespace)::AsmParser::parseDirectiveSymbolAttribute(llvm::MCSymbolAttr)': AsmParser.cpp:(.text.unlikely._ZN12_GLOBAL__N_19AsmParser29parseDirectiveSymbolAttributeEN4llvm12MCSymbolAttrE+0x111): relocation truncated to fit: R_X86_64_PC32 against `.LC1' /home/wsfreund/root/interpreter/llvm/inst/lib/libclangSerialization.a(ASTReader.o): In function `clang::serialization::reader::HeaderFileInfoTrait::ComputeHash(clang::serialization::reader::HeaderFileInfoTrait::internal_key_type const&)': ASTReader.cpp:(.text._ZN5clang13serialization6reader19HeaderFileInfoTrait11ComputeHashERKNS2_17internal_key_typeE+0x6): relocation truncated to fit: R_X86_64_PC32 against symbol `guard variable for llvm::hashing::detail::get_execution_seed()::seed' defined in .bss._ZGVZN4llvm7hashing6detail18get_execution_seedEvE4seed[_ZGVZN4llvm7hashing6detail18get_execution_seedEvE4seed] section in /home/wsfreund/root/interpreter/llvm/inst/lib/libclangFrontend.a(CompilerInvocation.o) collect2: error: ld returned 1 exit status make: *** [core/utils/src/rootcling_tmp] Error 1 [1]+ Exit 2 make -j 2 &> makeroot.log

Hi,

you seem to have an issue building a root tool linked against llvm, rootcling. This is clearly not expected on ubuntu 14.04. Could you share the output of configure? Do you see the same effect building with CMake?

Cheers,
Danilo

Hi,

yes, the problem seems to be on llvm. Below, I post the ./configure —all output:

[code]wsfreund@cornavin:~/root$ ./configure --all
Checking for source directory … /home/wsfreund/root
Configuring for linuxx8664gcc
Checking for GNU Make version >= 3.80 … ok
Checking for C compiler … gcc
Checking for C++ compiler … g++
Checking for linker (LD) … g++
Checking for F77 compiler … gfortran
Checking whether c++11 mode is supported … yes
Checking for Python version >= 2.5 … yes
Checking for libX11 … /usr/lib/x86_64-linux-gnu
Checking for X11/Xlib.h … /usr/include
Checking for X11/xpm.h … /usr/include
Checking for X11/Xft/Xft.h … /usr/include
Checking for X11/extensions/shape.h … /usr/include
Checking for libXpm … /usr/lib/x86_64-linux-gnu
Checking for libXft … /usr/lib/x86_64-linux-gnu
Checking for libXext … /usr/lib/x86_64-linux-gnu
Checking for freetype-config … /usr/bin/freetype-config
Checking for libfreetype version >= 9.3.0 … ok
Checking whether to build included libfreetype6 … no
Checking for pcre-config … /usr/bin/pcre-config
Checking for libpcre version >= 3.9 … ok
Checking whether to build included libpcre … no
Checking for zlib.h … /usr/include
Checking for libz … /usr/lib/x86_64-linux-gnu
Checking whether to build included zlib … no
Checking for lzma.h … no
Checking for liblzma … no
Checking whether to build included lzma … yes
Checking for GL/gl.h, or gl.h … /usr/include
Checking for libGL, or libMesaGL … /usr/lib/x86_64-linux-gnu
Checking for libGLU, or libMesaGLU … /usr/lib/x86_64-linux-gnu
Checking for GL/glew.h … no
Checking for libGLEW … no
Checking whether to build included GLEW … yes
Checking for pkg-config … /usr/bin/pkg-config
Checking for libftgl … no
Checking whether to build included libftgl … yes
Checking for mysql_config … /usr/bin/mysql_config
Checking for libmysqlclient version >= 3.23.* … ok
Checking for mysql.h … /usr/include/mysql
Checking for occi.h … no
Checking for libclntsh, or oci … no
Checking for libocci, or oraocci10 … no
Checking for libpq-fe.h … no
Checking for libpq … no
Checking for sqlite3.h … no
Checking for libsqlite3 … no
Checking for sql.h … no
Checking for libsqlod … no
Checking for sqlext.h … no
Checking for libiodbc, libodbc, or odbc32 … no
Checking for Qt/qglobal.h … /usr/include/qt4
Checking for 4.8.0 <= Qt version < 5.0.0 … 4.8.6
Checking for libQtCore, QtCore, QtCore4, or QtCore4 … /usr/lib/x86_64-linux-gnu
Checking for libQtGui, QtGui, QtGui4, or QtGui4 … /usr/lib/x86_64-linux-gnu
Checking for libQt3Support, Qt3Support, Qt3Support4, or Qt3Support4 … /usr/lib/x86_64-linux-gnu
Checking for moc or moc.exe … /usr/bin/moc-qt4
Checking for rfio_api.h … no
Checking for librfio, libdpm, libcastorrfio, libshift, shiftmd, or shift … no
Checking for rfio_api.h … no
Checking for stager_api.h … no
Checking for libcastorrfio, libshift, shiftmd, or shift … no
Checking for gfal_api.h … no
Checking for libgfal … no
Checking for gfal_srm_ifce_types.h … no
Checking for ApMon.h … no
Checking for libapmoncpp … no
Checking for fftw3.h … /usr/include
Checking for libfftw3, or libfftw3-3 … /usr/lib/x86_64-linux-gnu
Checking for fitsio.h … /usr/include
Checking for libcfitsio, or cfitsio … /usr/lib/x86_64-linux-gnu
Checking for gvc.h … /usr/include/graphviz
Checking for libgvc, or gvc … /usr/lib
Checking for libgraph, graph, libcgraph, or cgraph … /usr/lib
Checking for libcdt, or cdt … /usr/lib
Checking for libpathplan, or pathplan … /usr/lib
Checking for libexpat, or expat … /usr/lib/x86_64-linux-gnu
Checking for libgvplugin_dot_layout, or gvplugin_dot_layout … /usr/lib/graphviz
Checking for libPythia6 … no
Checking for Pythia8/Pythia.h … no
Checking for libpythia8 … no
Checking for dcap.h … no
Checking for libdcap … no
Checking for davix.hpp … no
Checking for libdavix … no
Checking for chirp_reli.h … no
Checking for libchirp_client … no
Checking for hdfs.h … no
Checking for jni.h … no
Checking for libhdfs … no
Checking for libjvm … no
Checking for dns_sd.h … /usr/include
Checking for libdns_sd … /usr/lib/x86_64-linux-gnu
Checking for avahi-client/client.h … /usr/include
Checking for avahi-common/strlst.h … /usr/include
Checking for avahi-core/core.h … no
Checking for libavahi-client … /usr/lib/x86_64-linux-gnu
Checking for libavahi-common … /usr/lib/x86_64-linux-gnu
Checking for libavahi-core … no
Checking for libglite-api-wrapper … no
Checking for gapiUI.h … no
Checking for libgapiUI … no
Checking for jpeglib.h … /usr/include
Checking for png.h … /usr/include
Checking for tiffio.h … no
Checking for libjpeg … /usr/lib/x86_64-linux-gnu
Checking for libtiff … no
Checking for libz … /usr/lib/x86_64-linux-gnu
Checking for libpng … /usr/lib/x86_64-linux-gnu
Checking whether to build included libAfterImage … yes
Checking for XCAFApp_Application.hxx … no
Checking for libTKXCAF … no
Checking for ldap.h … /usr/include
Checking for libldap … /usr/lib/x86_64-linux-gnu
Checking for liblber … /usr/lib/x86_64-linux-gnu
Checking for PyROOT prerequisites … yes
Checking for Python.h … /usr/include/python2.7
Checking for python2.7, libpython2.7, libpython, python, or Python … /usr/lib/x86_64-linux-gnu
Checking for xml2-config … /usr/bin/xml2-config
Checking for libxml2 version >= 2.4.x … ok
Checking for XrdVersion.hh … no
Checking for libssl … /usr/lib/x86_64-linux-gnu
Checking for libcrypto … /usr/lib/x86_64-linux-gnu
Checking for openssl/bio.h … /usr/include
Checking for openssl/blowfish.h … /usr/include
Checking for openssl/err.h … /usr/include
Checking for openssl/pem.h … /usr/include
Checking for openssl/rand.h … /usr/include
Checking for openssl/rsa.h … /usr/include
Checking for t_server.h … no
Checking for libsrp … no
Checking for libgmp … no
Checking for libmisc … no
Checking for pwauth.h … no
Checking for krb5.h … /usr/include
Checking for krb5.h redirect … /usr/include/krb5/krb5.h
Checking for krb5_c_valid_cksumtype in krb5.h … yes
Checking for valid_cksumtype in krb5.h … no
Checking for libk5crypto … /usr/lib/x86_64-linux-gnu
Checking whether we’re using MIT Kerberos … yes
Checking for krb5_c_valid_cksumtype in /usr/lib/x86_64-linux-gnu/libk5crypto.so … ok
Checking for valid_cksumtype in /usr/lib/x86_64-linux-gnu/libk5crypto.so … ok
Checking for libkrb5 … /usr/lib/x86_64-linux-gnu
Checking for kinit … no
Checking for libcom_err … /usr/lib/x86_64-linux-gnu
Checking for shadow passwords … yes
Checking required compiler/assembler workarounds … -Wno-unused-function
Checking SIMD specific compiler flags … -mavx -msse4.1 -mssse3 -msse3 -msse2 -DVC_IMPL=SSE+XOP+FMA4~-mxop~-mfma4 -mavx~-mxop~-mfma4
Checking ABI version compiler flags … -fabi-version=0
Checking for gsl/gsl_version.h … /usr/include
Checking for GSL version >= 1.10 … ok
Checking for libgsl, gslML, or gsl … /usr/lib
Checking for libgslcblas, gslcblasML, gslcblas, or cblas … /usr/lib
Checking whether /usr/lib/libgsl.a is compiled with -fPIC … yes
Checking whether /usr/lib/libgslcblas.a is compiled with -fPIC … no
Checking for shared library versions using gsl-config … yes
Checking whether to build libMathMore … yes
Checking whether to build libGenVector … yes
Checking whether to build libRooFit … yes
Checking whether to build libMinuit2 … yes
Checking whether to build libUnuran … yes
Checking whether to build libVc … yes
Checking whether to install VDT … yes
Checking whether to build libGdml … yes
Checking whether to build libTable … yes
Checking whether to build libTMVA … yes
Checking whether to build libRHTTP … yes
Checking for fcgiapp.h … no
Checking for libfcgi … no
Checking whether to build libMemStat … yes
Checking whether to build afdsmgrd … no
Checking whether setresuid declared in /usr/include/unistd.h … yes
Creating include … done
Creating bin … done
Creating lib … done
Writing config/Makefile.config … done
Writing config/Makefile.comp … done
Writing include/RConfigure.h … done
Writing include/RConfigOptions.h … done
Writing bin/root-config … done
Writing etc/system.rootrc … done
Writing etc/system.rootauthrc … done
Writing etc/system.rootdaemonrc … done
Writing etc/root.mimes … done
Writing etc/daemons/rootd.rc.d … done
Writing etc/daemons/rootd.xinetd … done
Writing etc/daemons/proofd.rc.d … done
Writing etc/daemons/proofd.xinetd … done
Writing main/src/proofserv.sh … done
Writing main/src/roots.sh … done
Writing bin/memprobe … done
Writing build/misc/root-help.el … done
Writing macros/html.C … done
Writing bin/thisroot.sh … done
Writing bin/thisroot.csh … done
Writing bin/setxrd.sh … done
Writing bin/setxrd.csh … done
Writing config.status … done

Enabled support for asimage, astiff, builtin_afterimage, builtin_ftgl, builtin_glew, builtin_lzma, builtin_llvm, explicitlink, fftw3, fitsio, gviz, gdml, genvector, http, krb5, l
ap, mathmore, memstat, minuit2, mysql, opengl, python, qt, qtgsi, roofit, shadowpw, shared, ssl, table, tmva, unuran, vc, vdt, x11, xft, xml.

To build ROOT type:

make
[/code]

Following your instructions, I tried to compile with

cmake root -DCMAKE_INSTALL_PREFIX=$PWD make

Results were:

Scanning dependencies of target obj.LTO [ 54%] Building CXX object tools/lto/CMakeFiles/obj.LTO.dir/LTODisassembler.cpp.o [ 55%] Building CXX object tools/lto/CMakeFiles/obj.LTO.dir/lto.cpp.o [ 55%] Built target obj.LTO Scanning dependencies of target LTO Linking CXX shared library ../../lib/libLTO.so ../../lib/libLLVMX86CodeGen.a(X86FrameLowering.cpp.o): In function `llvm::X86FrameLowering::emitPrologue(llvm::MachineFunction&) const': X86FrameLowering.cpp:(.text._ZNK4llvm16X86FrameLowering12emitPrologueERNS_15MachineFunctionE+0xb61): relocation truncated to fit: R_X86_64_PLT32 against symbol `llvm::MachineFunction::CreateMachineInstr(llvm::MCInstrDesc const&, llvm::DebugLoc, bool)' defined in .text._ZN4llvm15MachineFunction18CreateMachineInstrERKNS_11MCInstrDescENS_8DebugLocEb section in ../../lib/libLLVMCodeGen.a(MachineFunction.cpp.o) ../../lib/libLLVMAnalysis.a(ConstantFolding.cpp.o): In function `llvm::canConstantFoldCallTo(llvm::Function const*)': ConstantFolding.cpp:(.text._ZN4llvm21canConstantFoldCallToEPKNS_8FunctionE+0x43f): relocation truncated to fit: R_X86_64_PLT32 against symbol `memcmp@@GLIBC_2.2.5' defined in .text section in /lib/x86_64-linux-gnu/libc.so.6 ../../lib/libLLVMInstCombine.a(InstructionCombining.cpp.o): In function `llvm::InstCombineWorklist::AddUsersToWorkList(llvm::Instruction&)': InstructionCombining.cpp:(.text._ZN4llvm19InstCombineWorklist18AddUsersToWorkListERNS_11InstructionE[_ZN4llvm19InstCombineWorklist18AddUsersToWorkListERNS_11InstructionE]+0x1e0): relocation truncated to fit: R_X86_64_PLT32 against symbol `llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long)' defined in .text._ZN4llvm15SmallVectorBase8grow_podEPvmm section in ../../lib/libLLVMSupport.a(SmallVector.cpp.o) collect2: error: ld returned 1 exit status make[5]: *** [lib/libLTO.so] Error 1 make[4]: *** [tools/lto/CMakeFiles/LTO.dir/all] Error 2 make[3]: *** [all] Error 2 make[2]: *** [LLVM/src/LLVM-stamp/LLVM-build] Error 2 make[1]: *** [CMakeFiles/LLVM.dir/all] Error 2 make: *** [all] Error 2

I also tried to change compiler to clang:

cmake root -DCMAKE_INSTALL_PREFIX=$PWD -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ make

[ 14%] Building CXX object core/utils/CMakeFiles/rootcling.dir/__/metautils/src/TMetaUtils.cxx.o Linking CXX executable ../../bin/rootcling ../base/CMakeFiles/Base.dir/src/TMessageHandler.cxx.o: In function `TMessageHandler::ShowMembers(TMemberInspector&) const': /home/wsfreund/root_cmake/root/core/base/inc/TMessageHandler.h:72:(.text._ZThn64_NK15TMessageHandler11ShowMembersER16TMemberInspector[_ZThn64_NK15TMessageHandler11ShowMembersER16TMemberInspector]+0xc): relocation truncated to fit: R_X86_64_PLT32 against symbol `TMessageHandler::Class()' defined in .text section in ../base/CMakeFiles/Base.dir/G__Core.cxx.o clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/rootcling] Error 1 make[1]: *** [core/utils/CMakeFiles/rootcling.dir/all] Error 2 make: *** [all] Error 2

Cheers,
Werner.

Hello, it seems that the problem was with the machine. Sorry for the inconvenience and thanks for your feedback.

wsfreund, I am having the same problem. Can you tell me what you mean exactly by “the problem was with the machine”. Thanks in advance