Errors when compiling using custom GCC location

Hello,

I have had the somewhat unfortunate experience of trying to install ROOT on an older Centos 6.4 system which does not have the appropriate GCC version(s) needed to compile the latest versions of ROOT (gcc versions in its yum repo stop at 4.4.7), so I had to grab GCC 4.8.2 and compile it to a custom location on our network file system and point to it. I know that the new compiler works, as I have compiled other programs that need GCC 4.8 or above against it so far, but I keep running into a particular problem trying to compile ROOT on my current system.

I ran the ./configure script and have pointed it to my gcc binaries, and also in my latest iteration of the command tried tacking on the library directory location, but it still continues to stall on the same step during the subsequent ‘make’ despite my iterations on the configure script. The make happily plugs along for about 60 seconds and then eventually errors out on this:

/bin/date > /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/.dir llvm[3]: Linking Release executable FileCheck (without symbols) /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/g++ -m64 -O3 -Wl,--gc-sections -Wl,-R -Wl,'$ORIGIN/../lib' -L/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/lib -L/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/lib -Wl,--version-script=/root/compile_root/root-6.04.02/interpreter/llvm/src/autoconf/ExportMap.map -o /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck /root/compile_root/root-6.04.02/interpreter/llvm/obj/utils/FileCheck/Release/FileCheck.o -lLLVMSupport \ -lz -ltinfo -lrt -ldl -lm /usr/bin/ld: /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck: undefined reference to symbol '__pthread_key_create@@GLIBC_2.2.5' /usr/bin/ld: note: '__pthread_key_create@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line /lib64/libpthread.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[3]: *** [/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck] Error 1 make[3]: Leaving directory `/root/compile_root/root-6.04.02/interpreter/llvm/obj/utils/FileCheck' make[2]: *** [FileCheck/.makeall] Error 2

In the GCC 4.8.2 usr/lib64 subdirectory there is a “libpthread.so” file but not a “libpthread.so.0” file (or symlink). I’m no compiling guru so I would appreciate any pointers about what has gone amiss here. I suspect some package version or a missing library but I’m not sure.

My current configure command looks like this (and I am doubtful whether –libdir is a valid parameter but I saw it listed in the configure file itself as a comment so I thought I would try it):

Any suggestions?

Thanks!

The full output of my ./configure command (which I notice still has many options pointing to /usr/lib64 instead of under my custom GCC location):

[code]./configure --prefix=/gpfs/gpfs1/software/ROOT-6.04 --with-cc="/gpfs/gpfs1/software/gcc-4.8.2/usr/bin/gcc" --with-cxx="/gpfs/gpfs1/software/gcc-4.8.2/usr/bin/g++" --libdir="/gpfs/gpfs1/software/gcc-4.8.2/usr/lib64"
Checking for source directory … /root/compile_root/root-6.04.02
Configuring for linuxx8664gcc
Checking for GNU Make version >= 3.80 … ok
Checking for C compiler … /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/gcc
Checking for C++ compiler … /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/g++
Checking for linker (LD) … g++
Checking for F77 compiler … gfortran
Checking whether compiler can generate dependencies … yes
Checking whether c++11 mode is supported … yes
Checking for string_view implementation … using builtin string_view
Checking for Python version >= 2.7 … yes
Checking for libX11 … /usr/lib64
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/lib64
Checking for libXft … /usr/lib64
Checking for libXext … /usr/lib64
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/lib64
Checking whether to build included zlib … no
Checking for lzma.h … /usr/include
Checking for liblzma … /usr/lib64
Checking whether to build included lzma … no
Checking for GL/gl.h, or gl.h … /usr/include
Checking for libGL, or libMesaGL … /usr/lib64
Checking for libGLU, or libMesaGLU … /usr/lib64
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 … no
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 … /usr/include
Checking for libsqlite3 … /usr/lib64
Checking for sql.h … no
Checking for libsqlod … no
Checking for sqlext.h … no
Checking for libiodbc, libodbc, or odbc32 … no
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/lib64
Checking for fitsio.h … no
Checking for libcfitsio, or cfitsio … no
Checking for gvc.h … no
Checking for libgvc, or gvc … no
Checking for libgraph, graph, libcgraph, or cgraph … no
Checking for libcdt, or cdt … no
Checking for libpathplan, or pathplan … no
Checking for libexpat, or expat … no
Checking for libgvplugin_dot_layout, or gvplugin_dot_layout … no
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 … /usr/java/default/include
Checking for libhdfs … no
Checking for libjvm … /usr/java/default/jre/lib/amd64/server
Checking for dns_sd.h … no
Checking for libdns_sd … 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/lib64
Checking for libtiff … no
Checking for libz … /usr/lib64
Checking for libpng … /usr/lib64
Checking whether to build included libAfterImage … yes
Checking for ldap.h … no
Checking for libldap … no
Checking for PyROOT prerequisites … yes
Checking for Python.h … /gpfs/gpfs1/software/Python-2.7.2/include/python2.7
Checking for python2.7, libpython2.7, libpython, python, or Python … /gpfs/gpfs1/software/Python-2.7.2/lib
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/lib64
Checking for libcrypto … /usr/lib64
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/lib64
Checking whether we’re using MIT Kerberos … yes
Checking for krb5_c_valid_cksumtype in /usr/lib64/libk5crypto.so … ok
Checking for valid_cksumtype in /usr/lib64/libk5crypto.so … ok
Checking for libkrb5 … /usr/lib64
Checking for kinit … no
Checking for libcom_err … /usr/lib64
Checking for shadow passwords … yes
Checking for gsl/gsl_version.h … /usr/include
Checking for GSL version >= 1.10 … ok
Checking for libgsl, gslML, or gsl … /usr/lib64
Checking for libgslcblas, gslcblasML, gslcblas, or cblas … /usr/lib64
Checking whether to build libMathMore … yes
Checking whether to build libRInterface … no
Checking whether to build libGenVector … yes
Checking whether to build libRooFit … no
Checking whether to build libMinuit2 … no
Checking whether to build libUnuran … no
Checking whether to build libVc … no
Checking whether to install VDT … yes
Checking whether to build libGdml … no
Checking whether to build libTable … no
Checking whether to build libTMVA … yes
Checking whether to build libRHTTP … no
Checking whether to build libMemStat … yes
Checking whether to build afdsmgrd … no
Checking whether setresuid declared in /usr/include/unistd.h … yes
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_llvm, explicitlink, fftw3, genvector, krb5, mathmore, memstat, opengl, python, shadowpw, shared, sqlite, ssl, tmva, vdt, x11, xft, xml.

To build ROOT type:

make
make install[/code]

Try (note that you will need gfortran, too, and I assume that your new gcc/g++/gfortran are in your “${PATH}”): ./configure --with-cc="/gpfs/gpfs1/software/gcc-4.8.2/usr/bin/gcc" --with-cxx="/gpfs/gpfs1/software/gcc-4.8.2/usr/bin/g++" --with-f77="/gpfs/gpfs1/software/gcc-4.8.2/usr/bin/gfortran" --prefix=/gpfs/gpfs1/software/ROOT-6.04 --enable-soversion --all Try “./configure --help” in order to see available options and their meanings.

Hi Wile,

Thanks for the response!

It turns out that gfortran was indeed missing from that location so I installed the gcc-gfortran rpm and confirmed the binary was there and ran the configure again with your suggested parameters but still got a the same error:

/root/compile_root/root-6.04.02/interpreter/llvm/src/autoconf/mkinstalldirs /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin > /dev/null /bin/date > /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/.dir llvm[3]: Linking Release executable FileCheck (without symbols) /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/g++ -m64 -O3 -Wl,--gc-sections -Wl,-R -Wl,'$ORIGIN/../lib' -L/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/lib -L/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/lib -Wl,--version-script=/root/compile_root/root-6.04.02/interpreter/llvm/src/autoconf/ExportMap.map -o /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck /root/compile_root/root-6.04.02/interpreter/llvm/obj/utils/FileCheck/Release/FileCheck.o -lLLVMSupport \ -lz -ltinfo -lrt -ldl -lm /usr/bin/ld: /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck: undefined reference to symbol '__pthread_key_create@@GLIBC_2.2.5' /usr/bin/ld: note: '__pthread_key_create@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line /lib64/libpthread.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[3]: *** [/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck] Error 1 make[3]: Leaving directory `/root/compile_root/root-6.04.02/interpreter/llvm/obj/utils/FileCheck' make[2]: *** [FileCheck/.makeall] Error 2 make[2]: Leaving directory `/root/compile_root/root-6.04.02/interpreter/llvm/obj/utils' make[1]: *** [all] Error 1 make[1]: Leaving directory `/root/compile_root/root-6.04.02/interpreter/llvm/obj' make: *** [interpreter/llvm/inst/lib/libclangSema.a] Error 2

Ideas? I didn’t point the ./configure command specifically to any library directories this time.

Here the ./configure output (I noticed the LD linker just says g++, perhaps I should point it explicitly to my custom directory for g++ with –with-ld):

Checking for source directory ... /root/compile_root/root-6.04.02
Configuring for linuxx8664gcc
Checking for GNU Make version >= 3.80 ... ok
Checking for C compiler ... /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/gcc
Checking for C++ compiler ... /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/g++
Checking for linker (LD) ... g++
Checking for F77 compiler ... /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/gfortran
Checking whether compiler can generate dependencies ... yes
Checking whether c++11 mode is supported ... yes
Checking for string_view implementation ... using builtin string_view
Checking for Python version >= 2.7 ... yes
Checking for libX11 ... /usr/lib64
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/lib64
Checking for libXft ... /usr/lib64
Checking for libXext ... /usr/lib64
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/lib64
Checking whether to build included zlib ... no
Checking for lzma.h ... /usr/include
Checking for liblzma ... /usr/lib64
Checking whether to build included lzma ... no
Checking for GL/gl.h, or gl.h ... /usr/include
Checking for libGL, or libMesaGL ... /usr/lib64
Checking for libGLU, or libMesaGLU ... /usr/lib64
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 ... no
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 ... /usr/include
Checking for libsqlite3 ... /usr/lib64
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 ... no
Checking for moc or moc.exe ... no
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/lib64
Checking for fitsio.h ... no
Checking for libcfitsio, or cfitsio ... no
Checking for gvc.h ... no
Checking for libgvc, or gvc ... no
Checking for libgraph, graph, libcgraph, or cgraph ... no
Checking for libcdt, or cdt ... no
Checking for libpathplan, or pathplan ... no
Checking for libexpat, or expat ... no
Checking for libgvplugin_dot_layout, or gvplugin_dot_layout ... no
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 ... /usr/java/default/include
Checking for libhdfs ... no
Checking for libjvm ... /usr/java/default/jre/lib/amd64/server
Checking for dns_sd.h ... no
Checking for libdns_sd ... 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/lib64
Checking for libtiff ... no
Checking for libz ... /usr/lib64
Checking for libpng ... /usr/lib64
Checking whether to build included libAfterImage ... yes
Checking for XCAFApp_Application.hxx ... no
Checking for libTKXCAF ... no
Checking for ldap.h ... no
Checking for libldap ... no
Checking for PyROOT prerequisites ... yes
Checking for Python.h ... /gpfs/gpfs1/software/Python-2.7.2/include/python2.7
Checking for python2.7, libpython2.7, libpython, python, or Python ... /gpfs/gpfs1/software/Python-2.7.2/lib
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/lib64
Checking for libcrypto ... /usr/lib64
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/lib64
Checking whether we're using MIT Kerberos ... yes
Checking for krb5_c_valid_cksumtype in /usr/lib64/libk5crypto.so ... ok
Checking for valid_cksumtype in /usr/lib64/libk5crypto.so ... ok
Checking for libkrb5 ... /usr/lib64
Checking for kinit ... no
Checking for libcom_err ... /usr/lib64
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/lib64
Checking for libgslcblas, gslcblasML, gslcblas, or cblas ... /usr/lib64
Checking whether to build libMathMore ... yes
Checking whether to build libRInterface ... no
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
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_llvm, explicitlink, fftw3, gdml, genvector, http, krb5, mathmore, memstat, minuit2, opengl, python, roofit, shadowpw, shared, soversion, sqlite, ssl, table, tmva, unuran, vc, vdt, x11, xft, xml.

To build ROOT type:

   make 
   make  install

The –with-ld option didn’t seem to help.

Let me ask this though, what do I need to set ROOTSYS to if anything (currently I have it unset). Also I can’t understand this portion of the ./configure --help output as to whether parameters like --libdir and --bindir are the compiler’s lib and bin directories or if it means ROOT’s output bin and lib directories (such as --prefix does):

[code]The architecture to build for will be guessed from the output of ‘uname’.
If, however, that fails, or you don’t want the ‘native’ compiler on the
host platform, you can specify the architecture to use by passing as the
FIRST argument one of the architecures given at the end of this message.

FLAG DESCRIPTION DEFAULT
–aclocaldir Autoconf macro install dir(/share/aclocal)
–bindir Binary installation dir (/bin)
–build Build configuration [debug, …],
overrides the ROOTBUILD shell variable
–cflags Flags to pass to the C compiler that change the ABI, none by default
–cxxflags Flags to pass to the C++ compiler that change the ABI, none by default
–datadir Data installation dir (/share/root)
–docdir Documentation (/share/doc/root)
–elispdir Where to put Emacs Lisp (/share/emacs/site-lisp)
–etcdir Config installation dir (/etc/root)
–fontdir Font installation dir (/fonts)
–iconpath Icon installation dir (/icons)
–incdir Header installation dir (/include/root)
–libdir Library installation dir (/lib/root)
–macrodir Macro installation dir (/macros)
–mandir Manpages installation dir (/share/man/man1)
–no-create Do not create output files, dry run
–prefix Installation prefix (/usr/local)
–srcdir Sources installation dir (/src)
–testdir Tests (/test)
–tutdir Tutorials (/tutorial)

If any of the flags --datadir, --docdir, --etcdir, --iconpath
–incdir, --libdir, --macrodir, --mandir, or --prefix is given,
ROOT will be compiled with static directory names, and you should not set
the ROOTSYS environment variable.[/code]

It looks like it is tacked on to the base of --prefix. What I need however is something to point the compiler to the right libraries, since (as you can see in my last post) it is still looking under /usr/lib64 instead of the lib64 dir in my custom location.

I decided to directly execute the g++ step in question to confirm the error:

bashprompt> /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/g++ -m64 -O3 -Wl,--gc-sections -Wl,-R -Wl,'$ORIGIN/../lib' -L/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/lib -L/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/lib -Wl,--version-script=/root/compile_root/root-6.04.02/interpreter/llvm/src/autoconf/ExportMap.map -o /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck /root/compile_root/root-6.04.02/interpreter/llvm/obj/utils/FileCheck/Release/FileCheck.o -lLLVMSupport -lz -ltinfo -lrt -ldl -lm /usr/bin/ld: /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck: undefined reference to symbol '__pthread_key_create@@GLIBC_2.2.5' /usr/bin/ld: note: '__pthread_key_create@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line /lib64/libpthread.so.0: could not read symbols: Invalid operation

Then in order to try a different ld binary, I put my custom dir first in my PATH variable:

PATH="/gpfs/gpfs1/software/gcc-4.8.2/usr/bin/:/gpfs/gpfs1/software/Python-2.7.2/bin:$PATH"

Same error. Then I added “-L/gpfs/gpfs1/software/gcc-4.8.2/usr/lib64” to the library import commands (at least, that’s what I think that does) and got this:

/gpfs/gpfs1/software/gcc-4.8.2/usr/bin/g++ -m64 -O3 -Wl,--gc-sections -Wl,-R -Wl,'$ORIGIN/../lib' -L/gpfs/gpfs1/software/gcc-4.8.2/usr/lib64 -L/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/lib -L/root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/lib -Wl,--version-script=/root/compile_root/root-6.04.02/interpreter/llvm/src/autoconf/ExportMap.map -o /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck /root/compile_root/root-6.04.02/interpreter/llvm/obj/utils/FileCheck/Release/FileCheck.o -lLLVMSupport -lz -ltinfo -lrt -ldl -lm /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/ld: /root/compile_root/root-6.04.02/interpreter/llvm/obj/Release/bin/FileCheck: undefined reference to symbol '__pthread_key_create@@GLIBC_2.2.5' /gpfs/gpfs1/software/gcc-4.8.2/usr/bin/ld: note: '__pthread_key_create@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line /lib64/libpthread.so.0: could not read symbols: Invalid operation

Maybe I just need to find an rpm that has an updated libpthread.so file in it.

The library is a symlink:

[root@login.morgan compile_root]$ ls -la /lib64/libpthread.so.0
lrwxrwxrwx. 1 root root 18 Apr 2 2014 /lib64/libpthread.so.0 -> libpthread-2.12.so

Is it the version of GLIBC that needs to change? Currently GLIBC 2.12 is installed. What is the significance of the symbol its erroring on having “@@GLIBC_2.2.5” at the end?

For fun I dumped the symbol table in /lib64/libpthread.so.0 to grep for ‘key’:

nm -D /lib64/libpthread.so.0 | grep -i key

0000003c8280c5f0 T __pthread_key_create
0000003c8280c5f0 T pthread_key_create
0000003c8280c650 T pthread_key_delete

Interestingly when I follow these instructions to add -lpthread to the GCC command it no longer fails:

"Missing symbols means the component (library in this case) is not linked to the program you are building. Try going into the Makefile and adding ‘-L /lib64 -l pthread’ to the variable LDFLAGS."
linuxforums.org/forum/coffee … 2-5-a.html

The command was:

It returned no error, only a blank line. And ‘echo $?’ return 0 indicating the command was successful.

What does that mean though? And how can I get that flag added during the normal ROOT compile?

I added that flag it to the ROOT compile using LDFLAGS, by the way, and it actually got the compile further only to encounter more errors that got increasingly esoteric, similar to the the BFD (binary file descriptor) elflink.c errors shown here: stackoverflow.com/questions/8003 … h-on-linux

I’m abandoning this as a lost cause because there are too many packages (and package versions which are not up to date enough) in play to get this working on Centos6. I’m going to have to boot this up to my higher ups to see if we can just upgrade our environment to Centos7, because I was already able to get this to compile with no issues in a Centos7 test VM.