为什么 arm-poky-linux-gnueabi-ar 说“无效选项 -- 'g'”而这个选项没有出现在命令行的 args 列表中?

问题描述

我正在使用 bitbake 构建命令“bitbake -v update-engine-titan-c”,这里是日志:

[le944v7:latest] /LE944V7/meta-titan bitbake -v update-engine-titan-c
.../...
Build Configuration:
BB_VERSION           = "1.40.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "le944v7"
DISTRO               = "poky-ivt-systemd"
DISTRO_VERSION       = "12.0.0"
TUNE_FEATURES        = "arm armv7ve vfp neon vfpv4 callconvention-hard cortexa7"
TARGET_FPU           = "hard"
.../...
    
make[2]: Entering directory '/LE944V7/meta-titan/build/artefacts/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/update-engine-titan-c/1.0-r0/build/src/wrapper'
rm -f libupdate_engine_titan_c_wrapper.a

arm-poky-linux-gnueabi-ar cru libupdate_engine_titan_c_wrapper.a update_attempter_wrapper.o -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcrypto -lcurl -llog -lssl -lprotobuf-lite -lpthread -lbz2 -lgflags -lbase -lchrome -lbrillo -lbrillo_stream -levent -lbspatch -lfstab -lbootctrl -lxz -lpuffpatch -lbrotli 

arm-poky-linux-gnueabi-ar: invalid option -- 'g'
Usage: arm-poky-linux-gnueabi-ar [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
       arm-poky-linux-gnueabi-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
  s            - act as ranlib
  t[O][v]      - display contents of the 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])
  [D]          - use zero for timestamps and uids/gids (default)
  [U]          - use actual timestamps and uids/gids
  [N]          - use instance [count] of name
  [f]          - truncate inserted file names
  [P]          - use full path names when matching
  [o]          - preserve original dates
  [O]          - display offsets of files in the archive
  [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
  [T]          - make a thin archive
  [v]          - be verbose
  [V]          - display the version number
  @<file>      - read options from <file>
  --target=BFDNAME - specify the target object format as BFDNAME
 optional:
  --plugin <p> - load the specified plugin
 emulation options: 
  No emulation specific options
arm-poky-linux-gnueabi-ar: supported targets: elf32-littlearm elf32-littlearm-fdpic elf32-bigarm elf32-bigarm-fdpic elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex

我不明白为什么 arm-poky-linux-gnueabi-ar 说 "invalid option -- 'g'" 而这个选项没有出现在命令的 arm-poky-linux-gnueabi-ar args 列表中行(见日志)?

解决方法

似乎 ar 不接受 -lgio-2.0 参数。我认为您应该将 libgio-2.0.so 文件的路径直接放在命令行上,而不是通过 -l 参数。

(在 ar 联机帮助页中,它说 -l 参数被接受但被忽略,所以我怀疑 GM 在评论中说 -lgio-2.0 是 {{1} } 来自)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...