Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] compile failed with ubuntu 18.04 + kernel 4.15.0 #9

Closed
ghost opened this issue Mar 21, 2019 · 2 comments
Closed

[Bug] compile failed with ubuntu 18.04 + kernel 4.15.0 #9

ghost opened this issue Mar 21, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 21, 2019

Creating Makefile ...
make[6]: Warning: File '../shared_dirs.lst' has modification time 4.7 s in the future
Creating flags.make ...
Creating flags_vm.make ...
Creating vm.make ...
Creating adlc.make ...
Creating jvmti.make ...
Creating trace.make ...
Creating sa.make ...
make[6]: warning:  Clock skew detected.  Your build may be incomplete.
make[5]: warning:  Clock skew detected.  Your build may be incomplete.
make[5]: Warning: File 'flags.make' has modification time 5 s in the future
make[6]: Warning: File 'flags.make' has modification time 4.9 s in the future
Compiling /vagrant/hotspot/src/share/vm/adlc/adlparse.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/archDesc.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/arena.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/dfa.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/dict2.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/filebuff.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/forms.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/formsopt.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/formssel.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/main.cpp
Compiling /vagrant/hotspot/src/share/vm/opto/opcodes.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/output_c.cpp
Compiling /vagrant/hotspot/src/share/vm/adlc/output_h.cpp
Making adlc
make[6]: warning:  Clock skew detected.  Your build may be incomplete.
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
Generating /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/jvmtiEnv.hpp
Generating /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/jvmtiEnter.cpp
Generating /vagrant/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 /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/jvmtiEnvRecommended.cpp
Generating /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/bytecodeInterpreterWithChecks.cpp
Generating /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/jvmtifiles/jvmti.h
Generating /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/tracefiles/traceEventClasses.hpp
Generating /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/tracefiles/traceEventIds.hpp
Generating /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/tracefiles/traceTypes.hpp
Generating /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/tracefiles/traceEventControl.hpp
Generating /vagrant/build/linux-x86_64-normal-server-release/hotspot/linux_amd64_compiler2/product/../generated/tracefiles/tracePeriodic.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 /vagrant/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
Warning: generation and use of skeletons and static stubs for JRMP
is deprecated. Skeletons are unnecessary, and static stubs have
been superseded by dynamically generated stubs. Users are
encouraged to migrate away from using rmic to generate skeletons and static
stubs. See the documentation for java.rmi.server.UnicastRemoteObject.

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 /vagrant/hotspot/src/share/vm/utilities/histogram.hpp:32:0,
                 from /vagrant/hotspot/src/share/vm/runtime/mutex.hpp:30,
                 from /vagrant/hotspot/src/share/vm/classfile/classLoaderData.hpp:32,
                 from /vagrant/hotspot/src/share/vm/oops/typeArrayKlass.hpp:28,
                 from /vagrant/hotspot/src/share/vm/oops/typeArrayOop.hpp:29,
                 from /vagrant/hotspot/src/share/vm/oops/constantPool.hpp:32,
                 from /vagrant/hotspot/src/share/vm/oops/method.hpp:33,
                 from /vagrant/hotspot/src/share/vm/runtime/frame.hpp:28,
                 from /vagrant/hotspot/src/share/vm/code/codeBlob.hpp:30,
                 from /vagrant/hotspot/src/share/vm/code/codeCache.hpp:28,
                 from /vagrant/hotspot/src/cpu/x86/vm/assembler_x86.inline.hpp:30,
                 from /vagrant/hotspot/src/share/vm/asm/assembler.inline.hpp:31,
                 from /vagrant/hotspot/src/share/vm/precompiled/precompiled.hpp:30:
/vagrant/hotspot/src/os/linux/vm/os_linux.inline.hpp: In static member function ‘static dirent* os::readdir(DIR*, dirent*)’:
/vagrant/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 /vagrant/hotspot/src/os/linux/vm/jvm_linux.h:44:0,
                 from /vagrant/hotspot/src/share/vm/prims/jvm.h:30,
                 from /vagrant/hotspot/src/share/vm/utilities/debug.hpp:29,
                 from /vagrant/hotspot/src/share/vm/runtime/globals.hpp:28,
                 from /vagrant/hotspot/src/share/vm/memory/allocation.hpp:28,
                 from /vagrant/hotspot/src/share/vm/memory/iterator.hpp:28,
                 from /vagrant/hotspot/src/share/vm/memory/genOopClosures.hpp:28,
                 from /vagrant/hotspot/src/share/vm/oops/klass.hpp:28,
                 from /vagrant/hotspot/src/share/vm/runtime/handles.hpp:28,
                 from /vagrant/hotspot/src/share/vm/memory/universe.hpp:28,
                 from /vagrant/hotspot/src/share/vm/code/oopRecorder.hpp:28,
                 from /vagrant/hotspot/src/share/vm/asm/codeBuffer.hpp:28,
                 from /vagrant/hotspot/src/share/vm/asm/assembler.hpp:28,
                 from /vagrant/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 /vagrant/hotspot/src/share/vm/utilities/histogram.hpp:32:0,
                 from /vagrant/hotspot/src/share/vm/runtime/mutex.hpp:30,
                 from /vagrant/hotspot/src/share/vm/classfile/classLoaderData.hpp:32,
                 from /vagrant/hotspot/src/share/vm/oops/typeArrayKlass.hpp:28,
                 from /vagrant/hotspot/src/share/vm/oops/typeArrayOop.hpp:29,
                 from /vagrant/hotspot/src/share/vm/oops/constantPool.hpp:32,
                 from /vagrant/hotspot/src/share/vm/oops/method.hpp:33,
                 from /vagrant/hotspot/src/share/vm/runtime/frame.hpp:28,
                 from /vagrant/hotspot/src/share/vm/code/codeBlob.hpp:30,
                 from /vagrant/hotspot/src/share/vm/code/codeCache.hpp:28,
                 from /vagrant/hotspot/src/cpu/x86/vm/assembler_x86.inline.hpp:30,
                 from /vagrant/hotspot/src/share/vm/asm/assembler.inline.hpp:31,
                 from /vagrant/hotspot/src/share/vm/precompiled/precompiled.hpp:30:
/vagrant/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 /vagrant/hotspot/src/os/linux/vm/jvm_linux.h:44:0,
                 from /vagrant/hotspot/src/share/vm/prims/jvm.h:30,
                 from /vagrant/hotspot/src/share/vm/utilities/debug.hpp:29,
                 from /vagrant/hotspot/src/share/vm/runtime/globals.hpp:28,
                 from /vagrant/hotspot/src/share/vm/memory/allocation.hpp:28,
                 from /vagrant/hotspot/src/share/vm/memory/iterator.hpp:28,
                 from /vagrant/hotspot/src/share/vm/memory/genOopClosures.hpp:28,
                 from /vagrant/hotspot/src/share/vm/oops/klass.hpp:28,
                 from /vagrant/hotspot/src/share/vm/runtime/handles.hpp:28,
                 from /vagrant/hotspot/src/share/vm/memory/universe.hpp:28,
                 from /vagrant/hotspot/src/share/vm/code/oopRecorder.hpp:28,
                 from /vagrant/hotspot/src/share/vm/asm/codeBuffer.hpp:28,
                 from /vagrant/hotspot/src/share/vm/asm/assembler.hpp:28,
                 from /vagrant/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
/vagrant/hotspot/make/linux/makefiles/vm.make:309: recipe for target 'precompiled.hpp.gch' failed
make[6]: *** [precompiled.hpp.gch] Error 1
make[5]: *** [the_vm] Error 2
/vagrant/hotspot/make/linux/makefiles/top.make:119: recipe for target 'the_vm' failed
/vagrant/hotspot/make/linux/Makefile:297: recipe for target 'product' failed
make[4]: *** [product] Error 2
Makefile:230: recipe for target 'generic_build2' failed
make[3]: *** [generic_build2] Error 2
Makefile:177: recipe for target 'product' failed
make[2]: *** [product] Error 2
HotspotWrapper.gmk:44: recipe for target '/vagrant/build/linux-x86_64-normal-server-release/hotspot/_hotspot.timestamp' failed
make[1]: *** [/vagrant/build/linux-x86_64-normal-server-release/hotspot/_hotspot.timestamp] Error 2
/vagrant//make/Main.gmk:109: recipe for target 'hotspot-only' failed
make: *** [hotspot-only] Error 2
root@ubuntu-bionic:/vagrant# 
root@ubuntu-bionic:/vagrant# uname -a
Linux ubuntu-bionic 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

@luchsh
Copy link
Contributor

luchsh commented Mar 21, 2019

Could you please share the version of your compiler?

for historical reasons, patches to support new compilers were not ported to JDK8,
either OpenJDK8 or Dragonwell8.
see https://bugs.openjdk.java.net/browse/JDK-8160310

For this particular issue, it sounds similar to:
https://bugs.openjdk.java.net/browse/JDK-8179887

Please try that patch or other compatible compilers, thanks!

@ghost
Copy link
Author

ghost commented Mar 21, 2019

Looks like it cause by the glibc version

glibc (2.27-3ubuntu1)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant