在Mac OS上构建OpenJDK 9

时间:2018-06-04 10:27:53

标签: java macos

我在构建openjdk9时遇到了这些问题

在配置'macosx-中构建目标'default(explosion-image)'  x86_64的正常服务器,slowdebug”  警告:没有mercurial配置,也没有.src-rev

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x000000010394aca8, pid=13189, tid=8451
#
# JRE version: OpenJDK Runtime Environment (9.0.4) (slowdebug build 

9.0.4-internal+0-adhoc.apple.jdk9u)
# Java VM: OpenJDK 64-Bit Server VM (slowdebug 9.0.4-internal+0-adhoc.apple.jdk9u, mixed mode, tiered, compressed oops, serial gc, bsd-amd64)
# Problematic frame:
# V  [libjvm.dylib+0xd4aca8]  PerfData::~PerfData()+0x8
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/apple/SourceCode/jdk9u/make/hs_err_pid13189.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

[error occurred during error reporting (), id 0x4]

make[3]: *** [/Users/apple/SourceCode/jdk9u/build/macosx-x86_64-normal-server-slowdebug/jdk/_packages_attribute.done] Abort trap: 6
make[2]: *** [exploded-image-optimize] Error 2

ERROR: Build failed for target 'default (exploded-image)' in configuration 'macosx-x86_64-normal-server-slowdebug' (exit code 2) 

No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See common/doc/building.html#troubleshooting for assistance.

make[1]: *** [main] Error 2
make: *** [default] Error

1 个答案:

答案 0 :(得分:0)

我解决了这个问题。

您只需要对此注释:

hotspot/src/share/vm/runtime/perfMemory.cpp

// if (SafepointSynchronize::is_at_safepoint() && !StatSampler::is_active()) {
//  PerfDataManager::destroy();
// }

没关系。但是使用jstat监视jvm时可能发生内存泄漏。