[Systemtap] errors caused by independent installation of elfutils in C: cannot load LD backend library 'libld _ elf_x86_64.so 'and erro

Source: Internet
Author: User
Tags erro systemtap

Scenario:

A series of errors occurred while running the program, such:

(1) The following error occurs when compiling the kernel and executing the make menuconfig command:

/Usr/local/bin/ld: cannot load LD backend library 'libld _ elf_x86_64.so ':
Libld_elf_x86_64.so: cannot open shared object file: no such file or directory

That is

/Usr/local/bin/ld: cannot load LD backend library 'libld _ elf_x86_64.so ': libld_elf_x86_64.so: Unable to open shared object file: No file or directory

(2) The following error occurs when you execute./configure in systemtap.

Checking for C compiler default output file name...
Configure: Error: in'/local/zkl/systemtap-1.1 ':
Configure: Error: C compiler cannot create executables
See 'config. log' for more details.

{

View the config. Log File and search for "C compiler default output file name". The following lines are found:

Configure: 2913: checking for C compiler default output file name
Configure: 2935: GCC conftest. c> & 5
/Usr/local/bin/ld: cannot load LD backend library 'libld _ elf_x86_64.so ': libld_elf_x86_64.so: cannot open shared object file: no such file or directory

}

Both errors are actually'Libld _ elf_x86_64.so'.

 

Cause analysis:

A series of fatal errors caused by independent elfutils-0.137 installation:

Error description

Recall my operation, probably because I installed the elfutils-0.137, because systemtap needed elfutils support, so I downloaded the elfutils-0.137, unzipped and executed :. /configure, make, make install for installation, and then this series of inexplicable errors occurs. Libld_elf_x86_64.so should be the elfutils library. At first, we do not know the problems caused by elfutils.

 

Online for a long time, finally found in the following a website eye: http://permalink.gmane.org/gmane.linux.systemtap/16482

The reason is:

The error was because I had "make install" the downloaded elfutils, which subsequently installed "LD" and "Ar" into/usr/local/bin, and these latter binaries are not working properly. but as systemtap just need the source of elfutils, It is not need to "make install" for the elfutils.

Download elfutils sources, untar into some directory, then configure systemtap with -- with-elfutils = the_elfutils_source_directory /.

 

It turns out that the library generated by the installation of elfutils by make install cannot work normally,The installation of systemtap only requires the elfutils source code (execute./configure -- With-elfutils = the_elfutils_source_directory), instead of making install to install elfutils first.

 

Therefore, the independent installation of the elfutils-0.137 causes the error:/usr/local/bin/ld: cannot load LD backend library 'libld _ elf_x86_64.so ': libld_elf_x86_64.so: cannot open shared object file: no such file or directory. It should be because of a problem when executing the LD command to check the library dependency,

 

Solution:

Go to the elfutils-0.137 directory and run the command unmount elfutils in the following order,
Make uninstall;
Make distclean;

Note that makefile is required to execute these commands, while elfutils uses. /configure generates the MAKEFILE file. Therefore, if no MAKEFILE file is found, it must be executed on a machine with no problems. /configure command to generate the MAKEFILE file, then copy it, And then uninstall elfutils.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.