Problems while building CERN ROOT form source (gmake: *** [all] Error)

I was working on the building process for Root from listed here :

However after use ¨cmake --build . --target install¨ or ¨cmake -j1¨
i reach a 93% and then get this error:

usr/lib/ error adding symbols: File in wrong format collect2: 
error: ld returned 1 exit status 
gmake[2]: *** [lib/] Error 1 
gmake[1]: *** [graf2d/asimage/CMakeFiles/ASImage.dir/all] Error 2 
gmake: *** [all] Error 2

I think the problems could be due to some wrong location of libgif, but i don’t know how figure out.

Have you guys faced this issue before?

Any suggestion would be appreciate…

It looks like you’re trying to link against the 32 bit version of Try to install the x86_64 version of it

1 Like

Thanks for your response!!

This will be basic questions…
rpm -ql shows /usr/lib64/
and /usr/lib64/ . Are those the correct versions? if so, How can i indicate in the build process to search in /lib64 instead of /lib?

But ld complains about usr/lib/ - I hope that’s actually /usr/lib/ What does file /usr/lib/ say? Could you post your CMakeCache.txt? Which version of CMake do you use? Which operating system is this on?

1 Like

Hi Alex, thanks for your response!
Here is what i got:

  1. file /usr/lib/ gives /usr/lib/ symbolic link to'

  2. Cmake version is 3.15.2

  3. for cat CmakeCache.txt…I didn’t get if you were asking for some specific line or the complete file. let me know about it to edit this message since i can’t paste all the info due to the limit number of characters for this message(Cache file is ~150000/32000 :grimacing:).

  1. Could you attach CmakeCache.txt?
  2. What does file /usr/lib/ show?
  3. Which operating system is this on?
1 Like

Here is what i got:

  1. file /usr/lib/ gives /usr/lib/ ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=a688fbf12df2ef8ef5dec5cd658d1d9d22b5607a, stripped

  2. file /usr/lib64/ gives: /usr/lib64/ ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=1019d5696d5724e1eabe8725aa77df05f0439849, stripped

  3. My os is : SLF 7.8 (Nitrogen)

lastly my .txt file

CMakeCache.txt (133.4 KB)

OK so CMake prefers a 32bit library over the correct 64bit library, for some reason. You initially invoked cmake with some flags (you can see them with cat recmake_* in the build directory).

Can you rm CmakeCache.txt and re-run cmake with those flags? What is the output? It should say “Looking for gif…” or similar - that’s what I care about. And: what are the cmake flags you use?

Cheers, Axel.

1 Like

…and btw you should be able to take our CentOS7 binaries for your system, or even pull in the packages from EPEL - in general there’s no need for your to build ROOT yourself unless you need to debug something, develop ROOT,…

1 Like

Hi Alex!! first of all, thanks for all your help so far, I really appreciate the time you spent in this post…
I’m trying to set up all this software in a Server, i tried to use yum ... the first time but then i realized that i don’t have any root privilege in the server. That’s why i’m doing all this stuff (If there is an easier way to setup the software without using “root-privileges” and i’m to dumb to see it, please let me know)

for cat recmake_* in ../root-6.20.04/build-root

rm -f CMakeCache.txt
/emph/app/ydeniz/local/bin/cmake  -DCMAKE_INSTALL_PREFIX="/emph/app/ydeniz/Cern_Root/root-6.20.04/install-root" /emph/app/ydeniz/Cern_Root/root-6.20.04


rm -f CMakeCache.txt
/emph/app/ydeniz/local/bin/cmake  -DCMAKE_INSTALL_PREFIX="/emph/app/ydeniz/Cern_Root/root-6.20.04/install-root" /emph/app/ydeniz/Cern_Root/root-6.20.04

I’m following the instructions here:
in my first attempt the flags were:

 cmake -DCMAKE_INSTALL_PREFIX=../root-6.20.04/install-root   /root-6.20.04


cmake --build . -- install -j1 # i got in troubles  in this step.

Thanks. What’s the output of rm CMakeCache.txt; cmake -DCMAKE_INSTALL_PREFIX=../root-6.20.04/install-root /root-6.20.04? Can you attach it?

Alternatively you might be able to simply untar and use that!

Seems working!
I download the link that you suggested Axel.
I untar, realize the /bin directory inside the directory /root and just run the programs (i didn’t use cmake at all), Seems working, but is that the correct way?.. I spent almost a week trying to get ROOT working.

if so, i don’t understand what did i do wrong in the previous build process. Sorry if this is a basic question… I don’t see any /bin directory in my previous attempts. However, in your approach there is a /bin right away, Why is that?

Here is the info that you required, the output of -DCMAKE_INSTALL_PREFIX=../root-6.20.04/install-root /root-6.20.04 :
OUTPUT.txt (11.0 KB)

Seems working, but is that the correct way?


However, in your approach there is a /bin right away, Why is that?

Because you downloaded our binaries for CentOS7, and they seem to work for your system, too. It’s like when you download an app - you usually don’t compile your Firefox either :wink:

the output of [cmake]

Thanks! Suuuper weird. CMake seems to simply take the 32bit lib! @oshadura any idea what could be the cause here? Note that the OP said:

Cheers, Axel.

Thanks for all your Help @Axel !!!
The main problem was my lack of experience😅

I’m so excited about having things working

Best!! Yael.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.