ROOT Version : 6.18/00
Platform : fedora 30
Compiler : gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)
I’ve just installed f30
and root6
using dnf install root
.
Although I am able to run root and open files when I try to compile my macros using
root [0] .L mymacro.C++
I get the following error
root [2] .L ../../../240Pu/FINAL/results/residuals.C++
Info in <TUnixSystem::ACLiC>: creating shared library /home/astamato/Documents/SAMMY/235U/FINAL_NEW_RF/results/./../../../240Pu/FINAL/results/residuals_C.so
/usr/bin/ld: /usr/bin/ld: cannot execute binary file
collect2: error: ld returned 126 exit status
Error in <ACLiC>: Compilation failed!
Any idea on what is that?
Thank you in advance!
Usually that error message means Linux doesn’t recognize the file as an executable file. Typically the cause is running an executable on the wrong architecture…
I searched to find for a solution, but I can’t because in this case I don’t know which is the wrong executable.
The compilers and root came from dnf
so I assume that the correct architecture (x86_64 in my case) is taken care of.
Any idea on how to solve this issue or dig into and understand what causes it?
Not being a Linux expert, I’ll let someone else trying to help here… Maybe @Axel has an idea
Thank you very much for the shout out!
1 Like
Axel
August 12, 2019, 1:18pm
6
What do file /usr/bin/ld
and ls -l /usr/bin/ld
show?
Axel:
/usr/bin/ld
Thank you very much for your reply!
When I trie to execute ld
using /usr/bin/ld
I get
bash: /usr/bin/ld: cannot execute binary file: Exec format error
and the ll
on ld
itself, shows that it has executable rights and is a softlink from /etc/alternatives
. I don’t know if this is normal…
lrwxrwxrwx. 1 root root 20 Apr 26 04:27 /usr/bin/ld -> /etc/alternatives/ld
ls -al /etc/alternatives/ld*
ls -la /etc/alternatives/ld*
gives
lrwxrwxrwx. 1 root root 15 Apr 26 04:27 /etc/alternatives/ld -> /usr/bin/ld.bfd
And actually I am pasting all the ls
s
[astamato@pcen35240 ~]$ ls -al /usr/bin/ld*
lrwxrwxrwx. 1 root root 20 Apr 26 04:27 /usr/bin/ld -> /etc/alternatives/ld
-rwxr-xr-x. 1 root root 13536 Aug 11 11:27 /usr/bin/ld.bfd
-rwxr-xr-x. 1 root root 5441 Jun 6 13:55 /usr/bin/ldd
-rwxr-xr-x. 1 root root 3853632 Mar 6 11:00 /usr/bin/ld.gold
[astamato@pcen35240 ~]$ ls -la /etc/alternatives/ld*
lrwxrwxrwx. 1 root root 15 Apr 26 04:27 /etc/alternatives/ld -> /usr/bin/ld.bfd
[astamato@pcen35240 ~]$ ls -la /usr/bin/ld.bfd
-rwxr-xr-x. 1 root root 13536 Aug 11 11:27 /usr/bin/ld.bfd
/usr/bin/ld.bfd --version
This is strange…
[astamato@pcen35240 ~]$ /usr/bin/ld.bfd --version
bash: /usr/bin/ld.bfd: cannot execute binary file: Exec format error
so it’s like I have a wrong architecture?
Any idea on what might be the issue?
system
Closed
August 29, 2019, 7:11am
13
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.