当前位置:   article > 正文

深入理解java虚拟机(第三版):1.6 自己编译jdk_编译jdk源码 排除警告

编译jdk源码 排除警告

1、make images报错

现象:cpp文件编译报错

  1. === Output from failing command(s) repeated here ===
  2. * For target hotspot_variant-server_libjvm_objs_arguments.o:
  3. /Users/yanmingyang/jdk12/jdk12-06222165c35f/src/hotspot/share/runtime/arguments.cpp:1452:35: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare]
  4. if (old_java_vendor_url_bug != DEFAULT_VENDOR_URL_BUG) {
  5. ^ ~~~~~~~~~~~~~~~~~~~~~~
  6. 1 error generated.
  7. * All command lines available in /Users/yanmingyang/jdk12/jdk12-06222165c35f/build/macosx-x86_64-server-release/make-support/failure-logs.
  8. === End of repeated output ===

解决方案:

   参照jdk源码目录下build.html Problems with the Build Environment 章节的描述,在执行 bash configure时添加参数 --disable-warnings-as-errors,去除由于警告而造成错误终止编译。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/212494
推荐阅读
相关标签
  

闽ICP备14008679号