zoukankan      html  css  js  c++  java
  • this linker was not configured to use sysroots和C compiler cannot create executables的解决办法

    this linker was not configured to use sysroots

    C compiler cannot create executables

    在ubuntu下想编译linux kernel,键入命令

    make menuconfig时,报出

    this linker was not configured to use sysroots

    查了一下,是因为/usr/local/bin/ld在编译前没有被配置为configure --with-sysroot

    所以下载了binutils-2.22想编译一个带sysroot的

    键入命令 ../binutils-2.22/configure --with-sysroot

    结果报错:

    C compiler cannot create executables,打开目录里的config.log

    里面也有this linker was not configured to use sysroots的错误信息,

    后来查了一下,/usr/bin目录下也有一个ld,用/usr/bin/ld --sysroot=/试了下,没有报错误信息

    this linker was not configured to use sysroots,应该是支持sysroot的

    然后就把/usr/bin/ld改名为/usr/bin/ldxxxx,命令为

    mv /usr/bin/ld /usr/bin/ldxxxx

    然后再执行../binutils-2.22/configure --with-sysroot

    make

    make install

    就成功了,这样就可以编译linux内核了,其实只将/usr/local/bin/ld改名为/usr/local/bin/ldxxxx

    也应该能在linux内核目录里执行make menuconfig了

  • 相关阅读:
    2020.02.22周末作业清单
    2020.2.21作业清单
    2020.2.20作业清单
    数学题目
    2020.2.19作业单
    Request对象
    HTTP协议
    http协议
    tomcate
    servlet-3-相关配置
  • 原文地址:https://www.cnblogs.com/yuanxiaoping_21cn_com/p/2613699.html
Copyright © 2011-2022 走看看