编译openjdk1.8时Make报错
描述
- 环境:Ubuntu 1.7 和 Fedora 27,最后都在
make
时出现同样的错误 - Boot JDK: 1.7.0_80,64位
- 目标OpenJDK: 1.8u
LOG
Building OpenJDK for target 'all' in configuration 'linux-x86_64-normal-server-release'
## Starting langtools
Compiling 2 files for BUILD_TOOLS
Compiling 32 properties into resource bundles
Compiling 782 files for BUILD_BOOTSTRAP_LANGTOOLS
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Creating langtools/dist/bootstrap/lib/javac.jar
Compiling 785 files for BUILD_FULL_JAVAC
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Creating langtools/dist/lib/classes.jar
Updating langtools/dist/lib/src.zip
## Finished langtools (build time 00:00:36)
## Starting hotspot
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
Creating Makefile ...
Creating directory list ../shared_dirs.lst
Creating flags.make ...
Creating flags_vm.make ...
Creating vm.make ...
Creating adlc.make ...
Creating jvmti.make ...
Creating trace.make ...
Creating sa.make ...
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
Creating Makefile ...
Creating flags.make ...
Creating flags_vm.make ...
Creating vm.make ...
Creating adlc.make ...
Creating jvmti.make ...
Creating trace.make ...
Creating sa.make ...
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
Creating Makefile ...
Creating flags.make ...
Creating flags_vm.make ...
Creating vm.make ...
Creating adlc.make ...
Creating jvmti.make ...
Creating trace.make ...
Creating sa.make ...
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
Creating Makefile ...
Creating flags.make ...
Creating flags_vm.make ...
Creating vm.make ...
Creating adlc.make ...
Creating jvmti.make ...
Creating trace.make ...
Creating sa.make ...
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/adlparse.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/archDesc.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/arena.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/dfa.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/dict2.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/filebuff.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/forms.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/formsopt.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/formssel.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/main.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/opto/opcodes.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/output_c.cpp
Compiling /opt/openjdk/jdk8u/hotspot/src/share/vm/adlc/output_h.cpp
Making adlc
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
Generating /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/jvmtiEnv.hpp
Generating /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/jvmtiEnter.cpp
Generating /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/jvmtiEnterTrace.cpp
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
Generating /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/jvmtiEnvRecommended.cpp
Generating /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/bytecodeInterpreterWithChecks.cpp
Generating /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/jvmti.h
Generating /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/tracefiles/traceEventClasses.hpp
Generating /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/tracefiles/traceEventIds.hpp
Generating /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/tracefiles/traceTypes.hpp
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
Making /opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/sa-jdi.jar
warning: [options] bootstrap class path not set in conjunction with -source 1.6
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: ALT_OBJCOPY=/usr/bin/objcopy
INFO: /usr/bin/objcopy cmd found so will create .debuginfo files.
INFO: STRIP_POLICY=min_strip
INFO: ZIP_DEBUGINFO_FILES=1
Generating precompiled header precompiled.hpp.gch
In file included from /opt/openjdk/jdk8u/hotspot/src/share/vm/utilities/histogram.hpp:32:0,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/runtime/mutex.hpp:30,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/classfile/classLoaderData.hpp:32,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/typeArrayKlass.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/typeArrayOop.hpp:29,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/constantPool.hpp:32,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/method.hpp:33,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/runtime/frame.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/code/codeBlob.hpp:30,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/code/codeCache.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/cpu/x86/vm/assembler_x86.inline.hpp:30,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/asm/assembler.inline.hpp:31,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/precompiled/precompiled.hpp:30:
/opt/openjdk/jdk8u/hotspot/src/os/linux/vm/os_linux.inline.hpp: In static member function 'static dirent* os::readdir(DIR*, dirent*)':
/opt/openjdk/jdk8u/hotspot/src/os/linux/vm/os_linux.inline.hpp:127:18: error: 'int readdir_r(DIR*, dirent*, dirent**)' is deprecated [-Werror=deprecated-declarations]
if((status = ::readdir_r(dirp, dbuf, &p)) != 0) {
^~~~~~~~~
In file included from /opt/openjdk/jdk8u/hotspot/src/os/linux/vm/jvm_linux.h:44:0,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/prims/jvm.h:30,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/utilities/debug.hpp:29,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/runtime/globals.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/memory/allocation.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/memory/iterator.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/memory/genOopClosures.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/klass.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/runtime/handles.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/memory/universe.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/code/oopRecorder.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/asm/codeBuffer.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/asm/assembler.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
In file included from /opt/openjdk/jdk8u/hotspot/src/share/vm/utilities/histogram.hpp:32:0,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/runtime/mutex.hpp:30,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/classfile/classLoaderData.hpp:32,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/typeArrayKlass.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/typeArrayOop.hpp:29,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/constantPool.hpp:32,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/method.hpp:33,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/runtime/frame.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/code/codeBlob.hpp:30,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/code/codeCache.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/cpu/x86/vm/assembler_x86.inline.hpp:30,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/asm/assembler.inline.hpp:31,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/precompiled/precompiled.hpp:30:
/opt/openjdk/jdk8u/hotspot/src/os/linux/vm/os_linux.inline.hpp:127:42: error: 'int readdir_r(DIR*, dirent*, dirent**)' is deprecated [-Werror=deprecated-declarations]
if((status = ::readdir_r(dirp, dbuf, &p)) != 0) {
^
In file included from /opt/openjdk/jdk8u/hotspot/src/os/linux/vm/jvm_linux.h:44:0,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/prims/jvm.h:30,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/utilities/debug.hpp:29,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/runtime/globals.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/memory/allocation.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/memory/iterator.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/memory/genOopClosures.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/oops/klass.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/runtime/handles.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/memory/universe.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/code/oopRecorder.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/asm/codeBuffer.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/asm/assembler.hpp:28,
from /opt/openjdk/jdk8u/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
cc1plus: all warnings being treated as errors
/opt/openjdk/jdk8u/hotspot/make/linux/makefiles/vm.make:309: recipe for target 'precompiled.hpp.gch' failed
make[6]: *** [precompiled.hpp.gch] Error 1
/opt/openjdk/jdk8u/hotspot/make/linux/makefiles/top.make:119: recipe for target 'the_vm' failed
make[5]: *** [the_vm] Error 2
/opt/openjdk/jdk8u/hotspot/make/linux/Makefile:297: recipe for target 'product' failed
make[4]: *** [product] Error 2
make[3]: *** [generic_build2] Error 2
Makefile:230: recipe for target 'generic_build2' failed
make[2]: *** [product] Error 2
Makefile:177: recipe for target 'product' failed
make[1]: *** [/opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/_hotspot.timestamp] Error 2
HotspotWrapper.gmk:44: recipe for target '/opt/openjdk/jdk8u/build/linux-x86_64-normal-server-release/hotspot/_hotspot.timestamp' failed
/opt/openjdk/jdk8u//make/Main.gmk:108: recipe for target 'hotspot-only' failed
make: *** [hotspot-only] Error 2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
感觉编译的过程中,每个人都有每个人的自己特点的错误,国内很少能够找到相同匹配的解决方法,我也错误如下,而且也纠结2天了。没有突破的方向!!!
可能是 gcc 和 g++ 的版本太高了,可以换低版本的试一下