eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 722 forks source link

jdk8 --enable-jitserver fails to build at AdoptOpenJDK #8267

Closed andrew-m-leonard closed 4 years ago

andrew-m-leonard commented 4 years ago

https://ci.adoptopenjdk.net/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-linux-x64-openj9/494/

sxa commented 4 years ago

For reference error is as follows, and is likely due to the version of protobuf on the machine having been compiled some time ago without the PIC options. https://ci.adoptopenjdk.net/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-linux-x64-openj9/497 should run on build-digitalocean-centos69-x64-1/ with a modified protobuf installation

SUCCESS - All proto files are recompiled
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(common.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf7ClosureE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(int128.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(once.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(status.o): relocation R_X86_64_32S against symbol `_ZNSs4_Rep20_S_empty_rep_storageE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(arena.o): relocation R_X86_64_TPOFF32 against symbol `_ZN6google8protobuf8internal9ArenaImpl13thread_cache_E' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(generated_message_util.o): relocation R_X86_64_32S against symbol `_ZNSs4_Rep20_S_empty_rep_storageE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(message_lite.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(repeated_field.o): relocation R_X86_64_32 against symbol `_ZTIc' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(wire_format_lite.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(coded_stream.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(zero_copy_stream_impl_lite.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(descriptor.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf14DescriptorPool14ErrorCollectorE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(descriptor_database.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf18DescriptorDatabaseE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(descriptor.pb.o): relocation R_X86_64_32S against symbol `_ZNSs4_Rep20_S_empty_rep_storageE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(dynamic_message.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf8internal16FunctionClosure1IPKNS0_15FieldDescriptorEEE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(extension_set_heavy.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf8internal16FunctionClosure1IPKNS0_15FieldDescriptorEEE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(generated_message_reflection.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf8internal26GeneratedMessageReflectionE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(map_field.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf8internal12MapFieldBaseE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(message.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf10ReflectionE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(reflection_ops.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(substitute.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(text_format.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf10TextFormat6FinderE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(unknown_field_set.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(wire_format.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf8internal16FunctionClosure1IPKNS0_15FieldDescriptorEEE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(strtod.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(tokenizer.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf2io14ErrorCollectorE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(zero_copy_stream_impl.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf2io18CopyingInputStreamE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(atomicops_internals_x86_gcc.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(stringprintf.o): relocation R_X86_64_32S against symbol `_ZNSs4_Rep20_S_empty_rep_storageE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(structurally_valid.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(strutil.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(extension_set.o): relocation R_X86_64_32S against symbol `_ZTVN6google8protobuf8internal15ExtensionFinderE' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(zero_copy_stream.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: //usr/local/lib/libprotobuf.a(any.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-linux-x64-openj9/workspace/build/src/build/linux-x86_64-normal-server-release/vm/compiler/../compiler/build/rules/gnu/common.mk:51: recipe for target '/home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-linux-x64-openj9/workspace/build/src/build/linux-x86_64-normal-server-release/vm/compiler/../libj9jit29.so' failed
gmake[4]: *** [/home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-linux-x64-openj9/workspace/build/src/build/linux-x86_64-normal-server-release/vm/compiler/../libj9jit29.so] Error 1
makefile:56: recipe for target 'default' failed
gmake[3]: *** [default] Error 2
makefile:187: recipe for target 'j9jitlauncher' failed
gmake[2]: *** [j9jitlauncher] Error 2
/home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-linux-x64-openj9/workspace/build/src/closed/OpenJ9.gmk:555: recipe for target 'build-j9' failed
gmake[1]: *** [build-j9] Error 2
/home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-linux-x64-openj9/workspace/build/src/closed/make/Main.gmk:39: recipe for target 'j9vm-build' failed
make: *** [j9vm-build] Error 2
mstoodle commented 4 years ago

@mpirvu can you please help @andrew-m-leonard / @sxa555 with the appropriate set up required?

mpirvu commented 4 years ago

If an older/incompatible version of protobufs exists on the machine, it needs to be uninstalled first.

mpirvu commented 4 years ago

I am sure this is known, but I'll post it anyway; to compile and install protobufs on a machine the following instructions an be used

$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-cpp-3.7.1.tar.gz
$ tar -xvzf protobuf-cpp-3.7.1.tar.gz
$ cd protobuf-3.7.1
$ ./configure --disable-shared --with-pic
$ make
$ make install 
$ ldconfig
mpirvu commented 4 years ago

@jdekonin

sxa commented 4 years ago

Now fixed. If someone can assign this to me and close that would be appreciated :-)

e.g. https://ci.adoptopenjdk.net/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-linux-x64-openj9-linuxXL/455/console

DanHeidinga commented 4 years ago

Thanks @sxa555!