bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23k stars 4.03k forks source link

Compile failed on RHEL 6 #2356

Closed Vishruit closed 7 years ago

Vishruit commented 7 years ago

Following is the error I get when trying to compile bazel from source on RHEL 6. I also tried to install from the installer but it didn't work. PS- On this cluster account I don't have sudo access. Can you please suggest me a way to solve this?

Build informations

Vishruit commented 7 years ago

Hi, I am using Red Hat Enterprises Linux 6.2. I tried the following based on your suggestion Via Installing from the installer I tried conda install linux-64-libgcc-5.2.0-0.tar.bz2 version 5.2 (as there is no internet access in the cluster). And then execute ./bazel-0.4.3-installer-linux-x86_64.sh --user. Still the same error as mentioned above.

I am also trying to compile from source, where I get

(tfEnv) [~bazel]$ bash ./compile.sh INFO: You can skip this first step by providing a path to the bazel binary as second argument: INFO: ./compile.sh compile /path/to/bazel 🍃 Building Bazel from scratch..scripts/bootstrap/buildenv.sh: line 144: 11334 Killed "${@}" >> "${errfile}" 2>&1 /gpuusers/btech/me12b/opt/sunjdk/1.8/jdk1.8.0_111/bin/javac -classpath third_party/gson/gson-2.2.4.jar:third_party/pcollections/pcollections-2.1.2.jar:third_party/joda_time/joda-time-2.3.jar:third_party/aether/aether-api-1.0.0.v20140518.jar:third_party/aether/aether-connector-basic-1.0.0.v20140518.jar:third_party/aether/aether-transport-classpath-1.0.0.v20140518.jar:third_party/aether/aether-util-1.0.0.v20140518.jar:third_party/aether/aether-spi-1.0.0.v20140518.jar:third_party/aether/aether-transport-http-1.0.0.v20140518.jar:third_party/aether/aether-transport-file-1.0.0.v20140518.jar:third_party/aether/aether-impl-1.0.0.v20140518.jar:third_party/aether/aether-transport-wagon-1.0.0.v20140518.jar:third_party/checker_framework_dataflow/dataflow-1.8.10.jar:third_party/apache_commons_logging/commons-logging-1.1.1.jar:third_party/android_common/com.android.tools.build_builder_0.13.3.jar:third_party/android_common/com.android.tools.build_builder-test-api_2.0.0.jar:third_party/android_common/com.android.tools.layoutlib_layoutlib_23.1.3.jar:third_party/android_common/com.android.tools.build_manifest-merger_23.1.3.jar:third_party/android_common/com.android.jack_api_0.9.0.jar:third_party/android_common/com.android.tools_repository_25.0.0.jar:third_party/android_common/com.android.tools.build_manifest-merger_25.0.0.jar:third_party/android_common/com.android.tools_dvlib_25.0.0.jar:third_party/android_common/com.android.tools_common_25.0.0.jar:third_party/android_common/com.android.tools.build_builder-model_0.13.3.jar:third_party/android_common/com.android.tools_sdk-common_25.0.0.jar:third_party/android_common/com.android.tools_common_23.1.3.jar:third_party/android_common/com.android_annotations_25.0.0.jar:third_party/android_common/com.android.tools.layoutlib_layoutlib_25.0.0.jar:third_party/android_common/com.android.jill_api_0.9.0.jar:third_party/android_common/com.android.tools_sdklib_25.0.0.jar:third_party/android_common/com.android.tools.build_builder-model_2.0.0.jar:third_party/android_common/com.android.tools_sdklib_23.1.3.jar:third_party/android_common/com.android.tools_sdk-common_23.1.3.jar:third_party/android_common/com.android.tools.build_builder_2.0.0.jar:third_party/android_common/com.android.tools_ddmlib_25.0.0.jar:third_party/error_prone/error_prone_annotations-2.0.13.jar:third_party/guava/guava-21.0-20161101.jar:third_party/error_prone/error_prone_annotation-2.0.13.jar:third_party/apache_httpclient/httpclient-4.2.5.jar:third_party/apache_httpcore/httpcore-4.2.4.jar:third_party/auto/auto-value-1.2.jar:third_party/auto/auto-common-0.3.jar:third_party/auto/auto-value-1.4-rc1.jar:third_party/auto/auto-service-1.0-rc2.jar:third_party/slf4j/slf4j-api-1.7.7.jar:third_party/slf4j/slf4j-jdk14-1.7.7.jar:third_party/asm/asm-5.0.4.jar:third_party/asm/asm-5.0.3.jar:third_party/asm/asm-commons-5.0.4.jar:third_party/asm/asm-util-5.0.4.jar:third_party/asm/asm-tree-5.0.4.jar:third_party/jgit/org.eclipse.jgit-4.0.1.201506240215-r.jar:third_party/xz/xz-1.5.jar:third_party/jimfs/jimfs-1.1-rc1.jar:third_party/ijar/test/libwrongcentraldir.jar:third_party/truth/truth-0.28.jar:third_party/bytebuddy/byte-buddy-dep-0.7-rc6.jar:third_party/hamcrest/hamcrest-core-1.3.jar:third_party/netty/netty-all-4.1.0.CR6.jar:third_party/maven_model/maven-aether-provider-3.2.3.jar:third_party/maven_model/maven-model-3.2.3.jar:third_party/maven_model/maven-repository-metadata-3.2.3.jar:third_party/maven_model/maven-model-builder-3.2.3.jar:third_party/plexus_interpolation/plexus-interpolation-1.22.jar:third_party/hazelcast/hazelcast-client-3.5.4.jar:third_party/hazelcast/hazelcast-client-3.6.4.jar:third_party/hazelcast/hazelcast-3.6.4.jar:third_party/hazelcast/hazelcast-3.5.4.jar:third_party/apache_commons_pool2/commons-pool2-2.3.jar:third_party/java/apksig/apksigner_deploy.jar:third_party/java/jacoco/jacocoagent.jar:third_party/java/jacoco/org.jacoco.agent-0.7.5.201505241946-src.jar:third_party/java/jacoco/org.jacoco.report-0.7.5.201505241946-src.jar:third_party/java/jacoco/org.jacoco.core-0.7.5.201505241946-src.jar:third_party/java/jacoco/org.jacoco.report-0.7.5.201505241946.jar:third_party/java/jacoco/org.jacoco.agent-0.7.5.201505241946.jar:third_party/java/jacoco/org.jacoco.core-0.7.5.201505241946.jar:third_party/java/android_databinding/exec.jar:third_party/java/jarjar/jarjar-1.4.jar:third_party/dagger/dagger-2.5.jar:third_party/dagger/dagger-compiler-2.5.jar:third_party/dagger/dagger-producers-2.5.jar:third_party/tomcat_annotations_api/tomcat-annotations-api-8.0.5.jar:third_party/apache_commons_collections/commons-collections-3.2.2.jar:third_party/mockito/mockito-all-1.10.19.jar:third_party/apache_commons_codec/commons-codec-1.9.jar:third_party/jsr330_inject/javax.inject.jar:third_party/junit/junit-4.11.jar:third_party/plexus_utils/plexus-utils-3.0.21.jar:third_party/jsch/jsch-0.1.51.jar:third_party/error_prone/error_prone_core-2.0.13.jar:third_party/guava/guava-testlib-21.0-20161101.jar:third_party/jcip_annotations/jcip-annotations-1.0-1.jar:third_party/apache_commons_compress/apache-commons-compress-1.9.jar:third_party/apache_commons_lang/commons-lang-2.6.jar:third_party/protobuf/3.0.0/protobuf-java-3.0.0.jar:third_party/plexus_component_annotations/plexus-component-annotations-1.6.jar:third_party/maven/maven-settings-3.3.3.jar:third_party/maven/maven-settings-builder-3.3.3.jar:third_party/maven/maven-builder-support-3.3.3.jar:third_party/apache_velocity/velocity-1.7.jar:third_party/jsr305/jsr-305.jar:third_party/grpc/grpc-protobuf-0.15.0.jar:third_party/grpc/grpc-protobuf-lite-0.15.0.jar:third_party/grpc/grpc-stub-0.15.0.jar:third_party/grpc/grpc-netty-0.15.0.jar:third_party/grpc/grpc-core-0.15.0.jar:/tmp/bazel_WYXpcHBB -sourcepath src/java_tools/singlejar/java/com/google/devtools/build/zip:src/main/java:src/tools/xcode-common/java/com/google/devtools/build/xcode/common:src/tools/xcode-common/java/com/google/devtools/build/xcode/util:third_party/java/dd_plist/java:/tmp/bazel_WYXpcHBB/src -d /tmp/bazel_WYXpcHBB/classes -source 1.8 -target 1.8 -encoding UTF-8 @/tmp/bazel_p6bczBYf/param src/main/java/com/google/devtools/build/lib/runtime/OomSignalHandler.java:21: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/server/signal/AbstractSignalHandler.java:19: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/server/signal/AbstractSignalHandler.java:20: warning: SignalHandler is internal proprietary API and may be removed in a future release import sun.misc.SignalHandler; ^ src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:16: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/runtime/OomSignalHandler.java:21: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/server/signal/AbstractSignalHandler.java:19: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/server/signal/AbstractSignalHandler.java:20: warning: SignalHandler is internal proprietary API and may be removed in a future release import sun.misc.SignalHandler; ^ src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:16: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/runtime/OomSignalHandler.java:21: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/server/signal/AbstractSignalHandler.java:19: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/server/signal/AbstractSignalHandler.java:20: warning: SignalHandler is internal proprietary API and may be removed in a future release import sun.misc.SignalHandler; ^ src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:16: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/runtime/OomSignalHandler.java:21: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/server/signal/AbstractSignalHandler.java:19: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal; ^ src/main/java/com/google/devtools/build/lib/server/signal/AbstractSignalHandler.java:20: warning: SignalHandler is internal proprietary API and may be removed in a future release import sun.misc.SignalHandler; ^ src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:16: warning: Signal is internal proprietary API and may be removed in a future release import sun.misc.Signal;

hlopko commented 7 years ago

I think we are going to provide a binary for Fedora and RedHat, John should know more.

katre commented 7 years ago

@Vishruit , thanks for the report. I am unclear from your logs where the error is, exactly.

In your original post it looks like you're installing the pre-built binary, and it's complaining about the version of GLIBC and GLIBCXX. What versions do you have installed? I realize you don't have network access, is there another way to update the glibc packages to the latest available?

In comment https://github.com/bazelbuild/bazel/issues/2356#issuecomment-272373676, the log has several warnings but no errors. Were parts of it cut off? Can you post it to a Gist and put the link here to make it easier to read?

katre commented 7 years ago

I set up a VM running RHEL6 and tried to install from the installer, and I got the same error you did.

The installed versions are: GLIBC_2.12 GLIBCXX_3.4.13

There is no way to update these in RHEL6.

katre commented 7 years ago

Attempting further to compile from the distribution archive, it looks like the version of gcc (and g++) in RHEL6 is too old to build Bazel. I got past the errors with the lack of "-Wno-free-nonheap-object" flag, but then ran into actual code issues with vmax and vmin assertions. After that, there are further problems.

Would it be possible for you to build a local gcc from the latest version on your cluster and use that to build Bazel? I don't know enough about RHEL6 to know if there's a way to upgrade your gcc to a recent version.

katre commented 7 years ago

I also tried building on RHEL7, and both the binary installer and compiling from source worked there.

Vishruit commented 7 years ago

@katre Just saw your replies now. Thanks for looking into it. I am using anaconda environment in the cluster account. As required, please access the gist from this link

I realize you don't have network access, is there another way to update the glibc packages to the latest available?

Yes, that's accurate. Probably, I can try to ask the admin to update these.

There is no way to update these in RHEL6.

Can the admin also not do it? Also, can these be updated within an environment, like Anaconda's?

katre commented 7 years ago

I am not a RHEL user, I just managed to create a VM and run some tests. You'll need to discuss this with your administrators and determine if there's a way to get the latest gcc compiler and glibc for Bazel.

We are planning to start releasing RPM packages for Bazel in the next few releases, but even then it will depend on a version of glibc that does not appear to be present on RHEL6.

I am sorry I can't give you further assistance.

Vishruit commented 7 years ago

I think I should get hold of a better system. Thanks a lot.

katre commented 7 years ago

Okay, I am closing this issue and I am sorry we couldn't get further with your OS.

Vishruit commented 7 years ago

Sure. Thanks!