Install ROOT6 in cluster locally error

Hi, all

I don’t know whether there is a “cluster version root”, so I just install ROOT6 using the same way in cluster (local path without root) as I did in laptop. Using commands,

cmake -all=ON ~/tools/root-source
make -j4

But there is a error,

[ 49%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TargetLoweringBase.cpp.o
[ 49%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TargetOptionsImpl.cpp.o
[ 49%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TargetPassConfig.cpp.o
[ 49%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TargetRegisterInfo.cpp.o
[ 49%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TargetSchedule.cpp.o
[ 50%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TwoAddressInstructionPass.cpp.o
[ 50%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/UnreachableBlockElim.cpp.o
[ 50%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/VirtRegMap.cpp.o
[ 50%] Building CXX object interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/WinEHPrepare.cpp.o
[ 50%] Linking CXX static library ../../../../lib/libclangSema.a
[ 50%] Linking CXX static library ../libLLVMCodeGen.a
[ 50%] Built target clangSema
[ 50%] Built target LLVMCodeGen
make: *** [all] Error 2

I don’t know why. I use “linuxbrew” for installing packages locally. Here is my gcc and clang,

~/.linuxbrew/bin/gcc
gcc (Homebrew gcc 5.3.0) 5.3.0

~/.linuxbrew/bin/clang
clang version 3.9.0 (tags/RELEASE_390/final)

What can I do to fix it?

And, I download ROOT using git.

git clone http://root.cern.ch/git/root.git

So it should be the latest version.

Update the question:

Finally I successfully installed it with ( I find one of the reasons is that many optional packages haven’t been installed):

./configure --minimal

But I still have some confusions.

  1. Since I don’t use “–all” or “–enable-” , why “./configure” and “cmake” failed?

  2. After installation, I don’t find “root” in my “ROOTSYS/bin”, instead I just find

(py2.7) [@login2 bin]$ ls
g2root     pq2            rootcint     rootnb.exe  setxrd.sh
genreflex  proofd         rootcling    rootn.exe   ssh2rpd
h2root     proofserv      root-config  roots       thisroot.csh
hadd       proofserv.exe  rootd        roots.exe   thisroot.sh
memprobe   rmkdepend      root.exe     setxrd.csh  xpdtest
(py2.7) [@login2 bin]$ source thisroot.sh 
(py2.7) [@login2 bin]$ ./root.exe
   ----------------------------------------------------------------
  | Welcome to ROOT 6.09/01                    http://root.cern.ch |
  |                                   (c) 1995-2016, The ROOT Team |
  | Built for linuxx8664gcc                                        |
  | From heads/master@v6-09-01-576-ge9b3622, Dec 04 2016, 20:38:39 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'     |
   ----------------------------------------------------------------

root [0] cout<<"hello"
hello(std::basic_ostream<char, std::char_traits<char> > &) @0x2adf3a8875e0

It’s strange.

Can anyone tell me what’s wrong in my installation?
If you need any information, please just reply.

Hi,

  • The ‘root’ executable is not built with ‘minimal’ (it requires graphics, which is switched off with minimal).
  • The supported way of building is CMake. Can you provide the complete output of your first attempt? The few lines you pasted do not include the actual error.

Pere

Hi, mato

I think in cluster, I have to disable x11, so that there is no graphics and I should use root.exe instead using root ?

And how can I disable x11 using CMake?

And, I tried CMake with clang and gcc both. let me provide clang out put first. The screen out put is “clang_result.log” and the other two files may help. ( I find I can not upload file with extension “.log” so I instead them with extension “.txt”)
CMakeOutput.txt (17.5 KB)
CMakeError.txt (1.94 KB)
clang_result.txt (714 Bytes)

Hi, mato

And these are output of gcc compile. the “gcc_result” is the screen output of “cmake” and the “gcc_result2” is the screen output of “make”.

I guess there are three possibilities of error:

  1. Lack of some optional packages like libldap-dev but I can’t install them. ( I didn’t find the source so I can’t install them locally).
    But I think the installation should ignore them (when they are missed) since they are optional.

  2. No x11

  3. The version of gcc and clang.

But I am still confused.
gcc_result2.txt (192 KB)
gcc_result.txt (11.8 KB)
CMakeOutput.txt (222 KB)
CMakeError.txt (28.2 KB)

Hi,

  • I still do not see the actual build error. The file gcc_result2 is truncated at [ 54%].
  • I do not understand what compiler are you using? gcc or clang? Some logs are for gcc and some for clang.
  • I do not see the problem with X11. The library is found in /usr/lib64/libX11.so. Why you want to disable it? To disable it you you can add into the cmake command ‘-Dx11=OFF’.
  • I am probably as confused as you are. It would be nice if we tackle one problem at the time. What you want to achieve, how you do it (all the commands), and what errors you get.

Pere

Hi mato,

Sorry for late reply. I just find iTerm2 provide a better output so I tried again.

Let me answer your questions one by one,

  • The problem is just that the installation stop. I will show you a full screen output result.

  • I tried both clang and gcc and neither work. The first reply is clang result and the second is gcc result.

  • I am not sure. Maybe you are right.

  • Ok, let’s deal with installation with gcc first. I will provide a full commands inputed and result.
    I want to install root 6 with pyroot, and the commands and output is too long, so I put them in the attachment.
    Makefile.txt (202 KB)
    gcc.txt (210 KB)

What is the output of:

locate libxcb.so.1
locate libfontconfig.so.1
locate libXrender.so.1

If found, try to add these paths to the DYLD_LIBRARY_PATH and call make again. If not found, try to install them.
root.cern.ch/build-prerequisites

This is much better, thanks. The error has to do with a bad or incomplete installation of X11.

/home/huangli/.linuxbrew/bin/ld: warning: libxcb.so.1, needed by /usr/lib64/libX11.so, not found (try using -rpath or -rpath-link)
/home/huangli/.linuxbrew/bin/ld: warning: libfontconfig.so.1, needed by /usr/lib64/libXft.so, not found (try using -rpath or -rpath-link)
/home/huangli/.linuxbrew/bin/ld: warning: libXrender.so.1, needed by /usr/lib64/libXft.so, not found (try using -rpath or -rpath-link)
/usr/lib64/libXft.so: undefined reference to `FcFreeTypeCharIndex'
/usr/lib64/libXft.so: undefined reference to `FcPatternAddString'
/usr/lib64/libXft.so: undefined reference to `XRenderCompositeString8'
/usr/lib64/libXft.so: undefined reference to `XRenderFreeGlyphs'
/usr/lib64/libXft.so: undefined reference to `XRenderChangePicture'
/usr/lib64/libX11.so: undefined reference to `xcb_get_maximum_request_length'
/usr/lib64/libXft.so: undefined reference to `FcNameParse'
...

You can either:

  • switch off the use of X11 (with -Dx11=OFF), but then ROOT will not have any graphics
  • fix the installation of X11. Since you are using a mix of system and linuxbrew installation I have not the experience. You need to install properly all these packages:

libx11-dev: for usr/include/X11/Xlib.h and for /usr/lib/libX11.so
libxpm-dev: for /usr/include/X11/xpm.h and for /usr/lib/libXpm.so
libxft-dev: for /usr/include/X11/Xft/Xft.h and for /usr/lib/libXft.so
libxext-dev: for /usr/include/X11/extensions/shape.h and for /usr/lib/libXext.so
See the prerequisite page root.cern.ch/build-prerequisites

Pere

Hi,

Thanks very much, since I can’t install x11 so I switch it off.
And I checked the necessary packages:

(py2.7) (py2.7) [huangli@login2 root6]$ which git
~/.linuxbrew/bin/git
(py2.7) (py2.7) [huangli@login2 root6]$ which make
~/.linuxbrew/bin/make
(py2.7) (py2.7) [huangli@login2 root6]$ which cmake
~/.linuxbrew/bin/cmake
(py2.7) (py2.7) [huangli@login2 root6]$ which gcc
~/.linuxbrew/bin/gcc
(py2.7) (py2.7) [huangli@login2 root6]$ which python
~/bin/pyEV/py2.7/bin/python
(py2.7) (py2.7) [huangli@login2 root6]$ which ld
~/.linuxbrew/bin/ld

I don’t know what’s

 redhat-lsb-core

Then I install again but failed. The commands and result is in the attachment.

It seems lack of some packages, can I ignore the optional function when the optional packages is missed?

Best,
Li
gcc2.txt (266 KB)

You could try to add the flag -Dfortran=OFF

Hi,

Thanks and I tried but failed. Stop at the same point.

Best,
Li

Ah, sorry, those fortran things were only warnings.

So, it seems that error is is that lzma is not found. What is the output of:

ldconfig -p | grep lzma

Maybe you can add /usr/lib64 to the DYLD_LIBRARY_PATH and make again. Or sudo apt-get install liblzma-dev?

See groups.google.com/forum/#!topic … PrZlro7QbU

And I think

/home/huangli/.linuxbrew/bin/ld: warning: libpcre.so.0, needed by ../lib/libCore.so, not found (try using -rpath or -rpath-link) /home/huangli/.linuxbrew/bin/ld: warning: liblzma.so.0, needed by ../lib/libCore.so, not found (try using -rpath or -rpath-link)

said a lack of “pcre” and “lzma”, but I have installed them.

like:

code (py2.7) [huangli@login2 root6]$ brew list
binutils expat gmp libidn llvm ncurses xz
bison freetype gpatch libmpc m4 openssl zlib
bzip2 gcc isl libpng make patchelf
cmake git libedit libxml2 makedepend pcre
curl glibc libffi linux-headers mpfr pkg-config[/code]

This is a list of packages I installed using brew. pcre and xz are there.

Hi,
Thanks!

and the result of your command is:

(py2.7) (py2.7) [huangli@login2 root6]$ ldconfig -p | grep lzma
ldconfig: Can't open cache file /home/huangli/.linuxbrew/Cellar/glibc/2.19/etc/ld.so.cache
: No such file or directory

And my lzma is in:

/home/huangli/.linuxbrew/bin

So that I use:

export DYLD_LIBRARY_PATH=/home/huangli/.linuxbrew/lib64

But failed with the same reason.

Maybe I need to check how my lzma installed.

Best,
Li

Can you make a test for me. You could define the environment CMAKE_PREFIX_PATH=/home/huangli/.linuxbrew before invoking cmake in a clean build area. In this case all packages will be search in /home/huangli/.linuxbrew

It seems a nice way.

But after I add DYLD_LIBRARY_PATH and LD_LIBRARY_PATH with /home/huangli/.linuxbrew/lib and /home/huangli/.linuxbrew/lib64 in the .bash_profile and source the .bash_profile, most of the commands like ls, vim lead to Segmentation fault

:unamused:

This is somehow expected. Mixing executables from /usr/bin with the libraries installed with libuxbrew is perhaps not a good idea. Did you also prefix PATH with /home/huangli/.linuxbrew/bin ?

Hi,

I tried follow your instruction. But unlucky.

Best,
Li
gcc3.txt (266 KB)