• linux4.15.1编译init/mounts报错


      AR      init/mounts.o
    arm-linux-ar: illegal option -- T
    Usage: arm-linux-ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...
           arm-linux-ar -M [<mri-script]
     commands:
      d            - delete file(s) from the archive
      m[ab]        - move file(s) in the archive
      p            - print file(s) found in the archive
      q[f]         - quick append file(s) to the archive
      r[ab][f][u]  - replace existing or insert new file(s) into the archive
      t            - display contents of archive
      x[o]         - extract file(s) from the archive
     command specific modifiers:
      [a]          - put file(s) after [member-name]
      [b]          - put file(s) before [member-name] (same as [i])
      [N]          - use instance [count] of name
      [f]          - truncate inserted file names
      [P]          - use full path names when matching
      [o]          - preserve original dates
      [u]          - only replace files that are newer than current archive contents
     generic modifiers:
      [c]          - do not warn if the library had to be created
      [s]          - create an archive index (cf. ranlib)
      [S]          - do not build a symbol table
      [v]          - be verbose
      [V]          - display the version number
      @<file>      - read options from <file>
     emulation options: 
      No emulation specific options
    arm-linux-ar: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big srec symbolsrec tekhex binary ihex
    scripts/Makefile.build:558: recipe for target 'init/mounts.o' failed
    make[1]: *** [init/mounts.o] Error 1
    Makefile:1018: recipe for target 'init' failed
    make: *** [init] Error 2

     这个问题一时不知道怎么查,于是各种百度,但几乎没人遇到这种问题,于是第一反应想到的是工具链的问题,于是换了arm-linux-gcc4.4.3的版本,可以直接去友善之臂的官网下载:http://www.arm9.net/download.asp

    换成了4.4.3的工具链却报下面的问题:

    error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

    于是安装库:

    sudo apt-get install lib32stdc++6
    sudo apt-get install lib32z1

    终于编过了,看到希望了,但最后还是报了一个错误:

    "mkimage" command not found - U-Boot images will not be built
    arch/arm/boot/Makefile:90: recipe for target 'arch/arm/boot/uImage' failed
    make[1]: *** [arch/arm/boot/uImage] Error 1
    arch/arm/Makefile:337: recipe for target 'uImage' failed
    make: *** [uImage] Error 2

    其实这个问题很好解决,mkimage这个工具在编译uboot的时候就会产生,在uboot/tools/目录下,所以只需要将这个目录加到环境变量里面去即可。

  • 相关阅读:
    SP6779 GSS7
    P2218 [HAOI2007]覆盖问题
    day10-包的定义和内部类
    day09-final、多态、抽象类、接口
    day08-代码块和继承
    day07-变量,封装
    day05-方法、数组
    day04-switch、循环语句
    day03-运算符、键盘录入
    day02-基本概念
  • 原文地址:https://www.cnblogs.com/kent-hu/p/8424693.html
Copyright © 2020-2023  润新知