This linker was not configured to use sysroots and C compiler cannot create executables Solution

Source: Internet
Author: User

This linker was not configured to use sysroots

C compiler cannot create executables

To compile Linux kernel in Ubuntu, type the command

Make menuconfig

This linker was not configured to use sysroots

Check it because/usr/local/bin/LD is not configured as configure -- With-sysroot before compilation.

So I downloaded the binutils-2.22 and wanted to compile a program with sysroot.

Type the command ../binutils-2.22/configure -- With-sysroot

Error:

C compiler cannot create executables, open config. log in the directory

This linker was not configured to use sysroots error message also exists,

Later, I checked that there is also a LD in the/usr/bin directory and tried it with/usr/bin/LD -- sysroot =/. No error message is reported.

This linker was not configured to use sysroots should support sysroot

Then, rename/usr/bin/LD to/usr/bin/ldxxxx. The command is

MV/usr/bin/LD/usr/bin/ldxxxx

Then execute ../binutils-2.22/configure -- With-sysroot

Make

Make install

Then, we can compile the Linux kernel. In fact, we only change the name of/usr/local/bin/LD to/usr/local/bin/ldxxxx.

You should be able to execute make menuconfig in the Linux kernel directory.

 

 

 

Related Article

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.