JAVA安装错误在Yocto构建

JAVA安装错误在Yocto构建

本文介绍了JAVA安装错误在Yocto构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 我在我的Poky Linux系统上安装Java有很多麻烦。我正在使用Yocto构建我的系统,配置如下: local.conf code> MACHINE ?? =intel-corei7-64 DISTRO?=poky PACKAGE_CLASSES?=package_rpm SDKMACHINE?=x86_64 EXTRA_IMAGE_FEATURES?=debug-tweaks USER_CLASSES?=buildstats image-mklibs image-prelink PATCHRESOLVE =noop BB_DISKMON_DIRS =\ STOPTASKS,$ {TMPDIR},1G,100K \ STOPTASKS,$ {DL_DIR},1G,100K \ STOPTASKS,$ {SSTATE_DIR},1G,100K \ STOPTASKS,/ tmp,100M,100K \ ABORT,$ {TMPDIR},100M,1K \ ABORT,$ {DL_DIR},100M,1K \ ABORT,$ {SSTATE_DIR},100M,1K \ ABORT,/ tmp,10M,1K PACKAGECONFIG_append_pn-qemu-native =sdl PACKAGECONFIG_append_pn-nativesdk-qemu =sdl CONF_VERSION =1 BB_NUMBER_THREADS = '12' PARALLEL_MAKE ='-j 12' #Java安装 CORE_IMAGE_EXTRA_INSTALL + =gtkperf libxslt IMAGE_INSTALL_append =openjdk-7-jre LICENSE_FLAGS_WHITELIST + =oracle_java PREFERRED_PROVIDER_virtual / java-initial-native =cacao-initial-native PREFERRED_PROVIDER_virtual / java-native =jamvm-native PREFERRED_PROVIDER_virtual / javac-native =ecj-bootstrap-native PREFERRED_VERSION_xserver-nodm-init =1.0 #OpenCV安装 CORE_IMAGE_EXTRA_INSTALL + =opencv opencv-samples libopencv-core-dev libopencv-highgui-dev libopencv-imgproc -dev libopencv-objdetect-dev libopencv-ml-dev bblayers.conf #每次build / conf / bblayers.conf #更改不兼容的POKY_BBLAYERS_CONF_VERSION POKY_BBLAYERS_CONF_VERSION =2 BBPATH =$ {TOPDIR} BBFILES?= BBLAYERS?=\ $ HOME / poky / meta \ $ HOME / poky / meta-poky \\ $ HOME / poky / meta-yocto-bsp \ $ HOME / poky / meta-intel \ $ HOME / poky / meta-openembedded / meta-oe \ $ HOME / poky / meta-intel-realsense \ $ HOME / poky / meta-java \ $ HOME / poky / meta-oracle-java \ 我需要使用morty分支,因为我使用的是仅与4.8内核兼容的Intel Realsense层/ p> 构建配置: BB_VERSION =1.32.0 BUILD_SYS =x86_64-linux NATIVELSBSTRING =CentOSLinux-7.3.1611 TARGET_SYS =x86_64-poky-linux MACHINE =intel-corei7-64 DISTRO =poky DISTRO_VERSION =2.2.1 TUNE_FEATURES =m64 corei7 TARGET_FPU =元 meta-poky meta-yocto-bsp =morty: 924e576b8930fd2268d85f0b151e5f68a3c2afce meta-intel =morty:6add41510412ca196efb3e4f949d403a8b6f35d7 meta-oe = 莫蒂:fe5c83312de11e80b85680ef237f8acb04b4b26e 元Intel的realsense = 莫蒂:2c0dfe9690d2871214fba9c1c32980a5eb89a421 间的java = 主人:67e48693501bddb80745b9735b7b3d4d28dce9a1 间的Oracle的java = 莫蒂:f44365f02b283c3fb362dc99e2e996d3f11e356e 我收到以下错误: 错误:openjdk-7-jre-99b00-2.6.5-r6.1 do_compile:oe_runmake failed 错误:openjdk-7-jre-99b00-2.6.5-r6.1 do_compile:函数失败:do_compile(日志文件位于/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1 /temp/log.do_compile.3780)错误:存储在/ home / dalben / NewBuild / poky / filec / tmp / work / corei7-64-poky-linux / openjdk-7-jre / 99b00-2.6.5-r6.1 / temp / log.do_compile.3780 日志数据如下: 然后几百行错误日志。 任何帮助不胜感激。 编辑:从log.do_compile文件 错误:oe_runmake failed 在/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6中包含的文件.5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / oops / constantPoolOop.hpp:29:0, from / home / dalben / NewBuild / poky / filec /tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/methodOop .hpp:33,来自/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea -2.6.5 / build / openjdk / hotspot / src / share / vm / runtime / frame.hpp:29, from / home / dalben / NewBuild / poky / filec / tmp / work / corei7-64-poky -linux / openjdk-7-jre / 99b00-2.6.5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / prims / jvmtiExport.hpp:33, from /家庭/ dalben /新造/狭小/ filec的/ tmp /工作/ corei7-64-狭小-linux / openjdk-7-jre / 99b00-2.6.5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / runtime / thread.hpp:32, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot /src/os/linux/vm/thread_linux.inline.hpp30, from / home / dalben / NewBuild / poky / filec / tmp / work / corei7-64-poky-linux / openjdk-7-jre /99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/memory/resourceArea.hpp30, from / home / dalben / NewBuild / poky /filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/classfile /classFileParser.hpp:29,来自/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1 /icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/classfile/classLoader.hpp:28, from / home / dalben / NewBuild / poky / filec / tmp / work / corei7-64 -poky林ux / openjdk-7-jre / 99b00-2.6.5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / classfile / systemDictionary.hpp:29, from /家用/ dalben /新造/狭小/ filec的/ tmp /工作/ corei7-64-狭小Linux的/ OpenJDK的-7的jre / 99b00-2.6.5-R6.1 / IcedTea项目-2.6.5 /编译/ OpenJDK的/热点/来自/ home / dalben / NewBuild / poky / filec / tmp / work / corei7-64-poky-linux / openjdk-7-jre / 99b00-的src / share / vm / ci / ciEnv.hpp:30, 2.6.5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / ci / ciUtilities.hpp:28, from / home / dalben / NewBuild / poky / filec / TMP /工作/ corei7-64-狭小Linux的/ OpenJDK的-7的jre / 99b00-2.6.5-R6.1 / IcedTea项目-2.6.5 /构建/ OpenJDK的/热点/ src目录/股/ VM / CI / ciNullObject。 hpp:30, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-来自/ home / dalben / NewBuild / poky / filec / tmp / work / corei7-64-poky-的2.6.5 / build / openjdk / hotspot / src / share / vm / ci / ciConstant.hpp:29, LINUX /的openjdk -7- JRE / 99b00-2.6.5- r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / precompiled / precompiled.hpp:36: / home / dalben / NewBuild / poky / filec / tmp / work / corei7 -64-poky-linux / openjdk-7-jre / 99b00-2.6.5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / oops / cpCacheOop.hpp:在全局范围: /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/ build / openjdk / hotspot / src / share / vm / oops / cpCacheOop.hpp:189:42:error:shift表达式的左操作数'(-1 option_bits_mask =〜((( - 1)< tos_state_shift)|(field_index_mask | parameter_size_mask)) ~~~~~~~~~~~~ ~~~~~~~~~~~~~~ /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6 .5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / oops / cpCacheOop.hpp:189:104:error:'option_bits_mask'的枚举值不是整型常量 option_bits_mask =〜(( - 1)<< tos_state_shift)|(field_index_mask | parameter_size_mask)) ^ 在/ home / dalben / NewBuild / poky / filec / tmp /工作/ corei7-64-狭小Linux的/ OpenJDK的-7的jre / 99b00-2.6.5-R6.1 / IcedTea项目-2.6.5 /编译/ OpenJDK的/热点/ src目录/股/ VM / CI / ciEnv.hpp: 32:0, from / home / dalben / NewBuild / poky / filec / tmp / work / corei7-64-poky-linux / openjdk-7-jre / 99b00- 2.6.5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / ci / ciUtilities.hpp:28, from / home / dalben / NewBuild / poky / filec / TMP /工作/ corei7-64-狭小Linux的/ OpenJDK的-7的jre / 99b00-2.6.5-R6.1 / IcedTea项目-2.6.5 /编译/ OpenJDK的/热点/ src目录/股/ VM / CI / ciNullObject。 hpp:30, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-来自/ home / dalben / NewBuild / poky / filec / tmp / work / corei7-64-poky-的2.6.5 / build / openjdk / hotspot / src / share / vm / ci / ciConstant.hpp:29, linux / openjdk-7-jre / 99b00-2.6.5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / src / share / vm / precompiled / precompiled.hpp:36: / home /dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src /share/vm/code/dependencies.hpp:169:59:错误:移位表达式的左操作数'(-1 all_types =((1< TYPE_LIMIT)-1)& ((-1)< FIRST_TYPE), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/code/dependencies .hpp:169:72:error:'all_types'的枚举值不是整数常量 all_types =((1< TYPE_LIMIT)-1)& ((-1)< FIRST_TYPE), ^ gmake [7]:*** [precompiled.hpp.gch]错误1 gmake [7]:离开目录` /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk.build / hotspot / outputdir / linux_amd64_zero / product' gmake [6]:*** [the_vm]错误2 gmake [6]:离开目录`/ home / dalben / NewBuild / poky / filec / tmp $ / $ b gmake [5]:*** [productzero]错误2 gmake [5]:离开目录`/ home / dalben / NewBuild / poky / filec / tmp / work / corei7-64-poky-linux / openjdk 7-jre / 99b00-2.6.5-r6.1 / icedtea-2.6.5 / build / openjdk.build / hotspot / outputdir' gmake [4]:*** [generic_buildzero]错误2 gmake [4]:离开目录`/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6。 5-r6.1 / icedtea-2.6.5 / build / openjdk / hotspot / make' gmake [3]:*** [productzero]错误2 gmake [3]:离开目录`/家用/ dalben /新造/狭小/ filec的/ tmp /工作/ corei7-64-狭小Linux的/ OpenJDK的-7的jre / 99b00-2.6.5-R6.1 / IcedTea项目-2.6.5 /编译/ OpenJDK的/热点/ make' gmake [2]:*** [hotspot-build]错误2 gmake [2]:离开目录`/ home / dalben / NewBuild / poky / filec / tmp / work / corei7- 64-poky-linux / openjdk-7-jre / 99b00-2.6.5-r6.1 / icedtea-2.6.5 / build / openjdk' gmake [1]:*** [build_product_image]错误2 gmake [1]:离开目录`/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/ icedtea-2.6.5 / build / openjdk' make:*** [Makefile:2451:stamps / icedtea.stamp]错误2 错误:功能失败:do_compile(日志文件位于/ home $ / $ / / code> 解决方案我手动pa对生成这些错误的文件进行分段并构建图像。它给了一个新的错误,但成功地写了图像。安装的Java: root @ intel-corei7-64:〜#java -version java version1.7。 0_99 OpenJDK运行环境(IcedTea 2.6.5)(99b00-2.6.5) OpenJDK 64位零虚拟机(构建24.95-b01,解释模式) 解决方案是: 在之后手动修补openjdk 此 使用较新版本的openjdk。这可以使用更多最近提交的meta-java存储库或在local.conf中设置一个较新的首选版本。 编辑:添加指南链接。 指南 我在OpenSource项目中使用这个图像,我就如何克服我在构建过程中遇到的问题做了一个小指导。 可以在这里找到指南。 更新:我升级了JRE和JDK版本。新的指南可以在 here 找到。对于您中最勇敢的人员,还有一个安装程序脚本。 I'm having a lot of trouble installing Java on my Poky Linux system. I'm building my system using Yocto with the following configuration:local.confMACHINE ??= "intel-corei7-64"DISTRO ?= "poky"PACKAGE_CLASSES ?= "package_rpm"SDKMACHINE ?= "x86_64"EXTRA_IMAGE_FEATURES ?= "debug-tweaks"USER_CLASSES ?= "buildstats image-mklibs image-prelink"PATCHRESOLVE = "noop"BB_DISKMON_DIRS = "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ STOPTASKS,/tmp,100M,100K \ ABORT,${TMPDIR},100M,1K \ ABORT,${DL_DIR},100M,1K \ ABORT,${SSTATE_DIR},100M,1K \ ABORT,/tmp,10M,1K"PACKAGECONFIG_append_pn-qemu-native = " sdl"PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"CONF_VERSION = "1"BB_NUMBER_THREADS = '12'PARALLEL_MAKE = '-j 12'# Java installationCORE_IMAGE_EXTRA_INSTALL += "gtkperf libxslt"IMAGE_INSTALL_append = " openjdk-7-jre "LICENSE_FLAGS_WHITELIST += "oracle_java"PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"PREFERRED_VERSION_xserver-nodm-init = "1.0"# OpenCV installationCORE_IMAGE_EXTRA_INSTALL += "opencv opencv-samples libopencv-core-dev libopencv-highgui-dev libopencv-imgproc-dev libopencv-objdetect-dev libopencv-ml-dev"bblayers.conf# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf# changes incompatiblyPOKY_BBLAYERS_CONF_VERSION = "2"BBPATH = "${TOPDIR}"BBFILES ?= ""BBLAYERS ?= " \ $HOME/poky/meta \ $HOME/poky/meta-poky \ $HOME/poky/meta-yocto-bsp \ $HOME/poky/meta-intel \ $HOME/poky/meta-openembedded/meta-oe \ $HOME/poky/meta-intel-realsense \ $HOME/poky/meta-java \ $HOME/poky/meta-oracle-java \ "I need to use morty branch since I'm using Intel Realsense layer which is only compatible with 4.8 kernelBuild Configuration:BB_VERSION = "1.32.0"BUILD_SYS = "x86_64-linux"NATIVELSBSTRING = "CentOSLinux-7.3.1611"TARGET_SYS = "x86_64-poky-linux"MACHINE = "intel-corei7-64"DISTRO = "poky"DISTRO_VERSION = "2.2.1"TUNE_FEATURES = "m64 corei7"TARGET_FPU = ""metameta-pokymeta-yocto-bsp = "morty:924e576b8930fd2268d85f0b151e5f68a3c2afce"meta-intel = "morty:6add41510412ca196efb3e4f949d403a8b6f35d7"meta-oe = "morty:fe5c83312de11e80b85680ef237f8acb04b4b26e"meta-intel-realsense = "morty:2c0dfe9690d2871214fba9c1c32980a5eb89a421"meta-java = "master:67e48693501bddb80745b9735b7b3d4d28dce9a1"meta-oracle-java = "morty:f44365f02b283c3fb362dc99e2e996d3f11e356e"I get the following error:ERROR: openjdk-7-jre-99b00-2.6.5-r6.1 do_compile: oe_runmake failedERROR: openjdk-7-jre-99b00-2.6.5-r6.1 do_compile: Function failed: do_compile (log file is located at /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/temp/log.do_compile.3780)ERROR: Logfile of failure stored in: /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/temp/log.do_compile.3780Log data follows:and then several hundreds lines of error log.Any help is appreciated.EDIT: From the log.do_compile fileERROR: oe_runmake failedIn file included from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp:29:0, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/methodOop.hpp:33, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/runtime/frame.hpp:29, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/prims/jvmtiExport.hpp:33, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/runtime/thread.hpp:32, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/os/linux/vm/thread_linux.inline.hpp:30, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/memory/resourceArea.hpp:30, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/classfile/classFileParser.hpp:29, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/classfile/classLoader.hpp:28, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/classfile/systemDictionary.hpp:29, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciEnv.hpp:30, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciUtilities.hpp:28, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciNullObject.hpp:30, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciConstant.hpp:29, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp:36:/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/cpCacheOop.hpp: At global scope:/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/cpCacheOop.hpp:189:42: error: left operand of shift expression '(-1 << 28)' is negative [-fpermissive] option_bits_mask = ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask)) ~~~~~~^~~~~~~~~~~~~~~~~~~/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/oops/cpCacheOop.hpp:189:104: error: enumerator value for 'option_bits_mask' is not an integer constant option_bits_mask = ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask)) ^In file included from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciEnv.hpp:32:0, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciUtilities.hpp:28, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciNullObject.hpp:30, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/ci/ciConstant.hpp:29, from /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp:36:/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/code/dependencies.hpp:169:59: error: left operand of shift expression '(-1 << 1)' is negative [-fpermissive] all_types = ((1 << TYPE_LIMIT) - 1) & ((-1) << FIRST_TYPE), ~~~~~~^~~~~~~~~~~~~~/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/code/dependencies.hpp:169:72: error: enumerator value for 'all_types' is not an integer constant all_types = ((1 << TYPE_LIMIT) - 1) & ((-1) << FIRST_TYPE), ^gmake[7]: *** [precompiled.hpp.gch] Error 1gmake[7]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk.build/hotspot/outputdir/linux_amd64_zero/product'gmake[6]: *** [the_vm] Error 2gmake[6]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk.build/hotspot/outputdir/linux_amd64_zero/product'gmake[5]: *** [productzero] Error 2gmake[5]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk.build/hotspot/outputdir'gmake[4]: *** [generic_buildzero] Error 2gmake[4]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/make'gmake[3]: *** [productzero] Error 2gmake[3]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/make'gmake[2]: *** [hotspot-build] Error 2gmake[2]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk'gmake[1]: *** [build_product_image] Error 2gmake[1]: Leaving directory `/home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk'make: *** [Makefile:2451: stamps/icedtea.stamp] Error 2ERROR: Function failed: do_compile (log file is located at /home/dalben/NewBuild/poky/filec/tmp/work/corei7-64-poky-linux/openjdk-7-jre/99b00-2.6.5-r6.1/temp/log.do_compile.3780) 解决方案 I manually patched the files generating those error and builded the image. It gave a new error but successfully wrote the image. Java in installed:root@intel-corei7-64:~# java -versionjava version "1.7.0_99"OpenJDK Runtime Environment (IcedTea 2.6.5) (99b00-2.6.5)OpenJDK 64-Bit Zero VM (build 24.95-b01, interpreted mode)The solution is either:Manually patch openjdk followingthisUse a newer version of openjdk. This can be achived using a more recent commit for the meta-java repository or setting a newer preferred version in the local.conf.EDIT: Added guide link.GuideSince I'm using this image in an OpenSource project I made a little guide on how to overcome the problems I had during the building process.The guide can be found here.UPDATE: I upgraded the JRE and JDK version. The new guide can be found here. For the bravest among you there's also an installer script. 这篇关于JAVA安装错误在Yocto构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-07 15:35