axiangyushanhaijing / powerpoint

https://wiki.openjdk.java.net/display/jdk8u
GNU General Public License v2.0
6 stars 3 forks source link

find ’/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/src/cpu/riscv/vm/.’: No such file or directory 分析 #16

Open axiangyushanhaijing opened 2 years ago

axiangyushanhaijing commented 2 years ago

提示

Note: Recompile with -Xlint:unchecked for details.
find: ‘/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/src/cpu/riscv/vm/.’: No such file or directory
find: ‘/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/src/os_cpu/linux_riscv/vm/.’: No such file or directory
axiangyushanhaijing commented 2 years ago

通过调试发现 image

SOURCE_PATHS=\
  $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
      \( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) $(EXCLUDE_JFR_PATHS) \))
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm

此处的 Platform_arch以及Platform_os_arch对应了log中的riscv\linux_riscv,通过注释掉此两行代码可验证。接下来需要修改对应的出错定义。

axiangyushanhaijing commented 2 years ago

修改一下代码即可

diff --git a/hotspot/make/linux/platform_riscv64 b/hotspot/make/linux/platform_riscv64
index bc4aa9eb57..eb4340d1a0 100644
--- a/hotspot/make/linux/platform_riscv64
+++ b/hotspot/make/linux/platform_riscv64
@@ -1,10 +1,10 @@
 os_family = linux

-arch = riscv
+arch = riscv64

 arch_model = riscv64

-os_arch = linux_riscv
+os_arch = linux_riscv64

 os_arch_model = linux_riscv64
axiangyushanhaijing commented 2 years ago

提交 #pr17,当前note已消失。 当前报错:

/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/src/share/vm/prims/jni_md.h:34:11: fatal error: jni_riscv64.h: No such file or directory
   34 | # include "jni_riscv64.h"
      |           ^~~~~~~~~~~~~~~
compilation terminated.
make[6]: *** [/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/make/linux/makefiles/vm.make:310: precompiled.hpp.gch] Error 1
make[5]: *** [/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/make/linux/makefiles/top.make:119: the_vm] Error 2
make[4]: *** [/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/make/linux/Makefile:302: productcore] Error 2
make[3]: *** [Makefile:257: generic_buildcore] Error 2
make[2]: *** [Makefile:181: productcore] Error 2
make[1]: *** [HotspotWrapper.gmk:45: /home/zhangxiang/rv-jdk8u/jdk8u/build/linux-riscv64-normal-core-release/hotspot/_hotspot.timestamp] Error 2
make: *** [/home/zhangxiang/rv-jdk8u/jdk8u//make/Main.gmk:110: hotspot-only] Error 2
axiangyushanhaijing commented 2 years ago

针对报错

/home/zhangxiang/rv-jdk8u/jdk8u/hotspot/src/share/vm/prims/jni_md.h:34:11: fatal error: jni_riscv64.h: No such file or directory
   34 | # include "jni_riscv64.h"
      |           ^~~~~~~~~~~~~~~

仿照aarch64进行补充添加 #15