java - meta-java 构建失败,“目标 'hotspot-only' 的配方失败”
问题描述
我正在尝试使用 yocto 项目将 meta-java 层添加到基础映像中。我按照以下步骤进行配置。
克隆 Meta-Java 存储库git clone git://git.yoctoproject.org/meta-java
添加图层
source meta-agl/scripts/aglsetup.sh
bitbake-layers add-layer ../meta-java
通过将以下内容添加到build/conf/local.conf文件来配置项目。
PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"
PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"
PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
使用以下内容更新 local.conf 文件
IMAGE_INSTALL_append = " openjre-8"
构建图像。
cd build
bitbake agl-image-minimal
当我在“bitbake”命令上方运行此命令时,出现以下错误。
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "x86_64-agl-linux"
MACHINE = "qemux86-64"
DISTRO = "poky-agl"
DISTRO_VERSION = "9.99.3"
TUNE_FEATURES = "m64 corei7"
TARGET_FPU = ""
meta-oe
meta-multimedia
meta-networking
meta-python
meta-filesystems = "HEAD:cc6fc6b1641ab23089c1e3bba11e0c6394f0867c"
meta-agl-profile-core
meta-agl-distro
meta-agl-bsp = "HEAD:cb90a88d382971a146c4b7413bb6df6563cef7d1"
meta-security = "HEAD:982a29bbb7ef32475aea7c4bb56c620065a50927"
meta-perl = "HEAD:cc6fc6b1641ab23089c1e3bba11e0c6394f0867c"
meta-security
meta-app-framework = "HEAD:cb90a88d382971a146c4b7413bb6df6563cef7d1"
meta
meta-poky = "HEAD:4e931b1d05018923dc145cd97f6f965f5cb6e1a5"
meta-java = "master:3b65eea96eddde97169ca5e00be01a9dbd257786"
Initialising tasks: 100% |##############################################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 7 Found 0 Missed 7 Current 2107 (0% match, 99% complete)
NOTE: Executing Tasks
ERROR: openjre-8-265-r0 do_compile: oe_runmake failed
ERROR: openjre-8-265-r0 do_compile: Execution of '/home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/temp/run.do_compile.9058' failed with exit code 1:
/home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga//make/Main.gmk:43: Running shell command
+ /home/agl-yocto/build/tmp/hosttools/rm -f /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/build/build.log.old
/home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga//make/Main.gmk:44: Running shell command
+ /home/agl-yocto/build/tmp/hosttools/mv /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/build/build.log /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/build/build.log.old
<<Other output>>
<<Other output>>
<<Other output>>
:::
:::
<<Other output>>
<<Other output>>
<<Other output>>
| g++: error: unrecognized command line option ‘-fmacro-prefix-map=/home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0=/usr/src/debug/openjre-8/265-r0’
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/adlparse.o' failed
| make[6]: *** [../generated/adfiles/adlparse.o] Error 1
| make[6]: *** Waiting for unfinished jobs....
| make[6]: *** [../generated/adfiles/formsopt.o] Error 1
| make[6]: *** [../generated/adfiles/dict2.o] Error 1
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/formsopt.o' failed
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/dict2.o' failed
| make[6]: *** [../generated/adfiles/archDesc.o] Error 1
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/archDesc.o' failed
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/arena.o' failed
| make[6]: *** [../generated/adfiles/arena.o] Error 1
| make[6]: *** [../generated/adfiles/dfa.o] Error 1
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/dfa.o' failed
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/forms.o' failed
| make[6]: *** [../generated/adfiles/forms.o] Error 1
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/filebuff.o' failed
| make[6]: *** [../generated/adfiles/filebuff.o] Error 1
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/makefiles/top.make:91: recipe for target 'ad_stuff' failed
| make[5]: *** [ad_stuff] Error 2
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga/hotspot/make/linux/Makefile:284: recipe for target 'product' failed
| make[4]: *** [product] Error 2
| Makefile:230: recipe for target 'generic_build2' failed
| make[3]: *** [generic_build2] Error 2
| Makefile:177: recipe for target 'product' failed
| make[2]: *** [product] Error 2
| HotspotWrapper.gmk:44: recipe for target '/home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/build/hotspot/_hotspot.timestamp' failed
| make[1]: *** [/home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/build/hotspot/_hotspot.timestamp] Error 2
| /home/agl-yocto/build/tmp/work/corei7-64-agl-linux/openjre-8/265-r0/jdk8u-jdk8u265-ga//make/Main.gmk:109: recipe for target 'hotspot-only' failed
| make: *** [hotspot-only] Error 2
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/agl-yocto/meta-java/recipes-core/openjdk/openjre-8_265.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5486 tasks of which 5485 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/agl-yocto/meta-java/recipes-core/openjdk/openjre-8_265.bb:do_compile
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
有人可以帮忙解决这个错误吗?提前致谢。
解决方案
该错误是由于较旧的 GCC 版本。只是发布对我有用的东西。
检查您的 GCC 版本
gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See this note from the below link for more details:
https://www.yoctoproject.org/pipermail/meta-virtualization/2019-February/004028.html
将您的 GCC 版本升级到 8。
遵循此处描述的步骤:https ://askubuntu.com/questions/1028601/install-gcc-8-only-on-ubuntu-18-04sudo apt install gcc-8 g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
gcc --version
gcc (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
编译openjdk-8
bitbake openjdk-8 -c compile
=> It should work with out any errors.
推荐阅读
- mysql - 很难根据允许的最大连接数正确设置 RAILS_MAX_THREADS
- shopware - 如何在 Shopware 5 的 Enlight_Event_EventArgs 对象订阅者中执行重定向?
- javascript - 限制 Loopback 4 查询中属性的长度数组类型?
- python - 以数字方式查找正根
- c++ - 如何使用移动构造函数释放内存
- postgresql - Postgresql 9.3 忽略 pgpass.conf 文件
- python - 有错误的 Holoviews 条返回 TypeError:不支持的操作数类型 -:'str' 和 'float'
- amazon-web-services - ELB 后面的单个 EC2 会产生巨大的延迟
- python - 如何使用 Python 将音频文件(.mp3 或 .wav 或任何其他文件)转换为唯一的音频 ID?
- spring - 如何获取 Spring REST URL 的请求参数的名称?