bazelbuild / bazel

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

Failed to compile from source on Ubuntu 14.04 x86 #2013

Closed yoava333 closed 7 years ago

yoava333 commented 8 years ago

I'm trying to compile from source bazel tag 0.3.2 on Ubuntu 14.04 x86 - 4GB RAM.

$ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) Server VM (build 25.111-b14, mixed mode)
JAVA_TOOL_OPTIONS="-Xmx3072m" VERBOSE=yes ./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.third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/android_deploy_info.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/android_studio_ide_info.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/apk_manifest.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/build.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/bundlemerge.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/command_server.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/crosstool_config.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/dash.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/deps.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/extra_actions_base.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/invocation_policy.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/java_compilation.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/package_manifest.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/plmerge.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/remote_protocol.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/test_status.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/worker_protocol.proto
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel_lfkUjBum/src --plugin=protoc-gen-grpc=third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe --grpc_out=/tmp/bazel_lfkUjBum/src src/main/protobuf/xcodegen.proto
./usr/lib/jvm/java-8-oracle/bin/javac -classpath third_party/asm/asm-5.0.4.jar:third_party/asm/asm-util-5.0.4.jar:third_party/asm/asm-5.0.3.jar:third_party/asm/asm-commons-5.0.4.jar:third_party/java/jarjar/jarjar-1.4.jar:third_party/java/apksig/apksigner_deploy.jar:third_party/java/android_databinding/exec.jar:third_party/jsr305/jsr-305.jar:third_party/jimfs/jimfs-1.1-rc1.jar:third_party/netty/netty-all-4.1.0.CR6.jar:third_party/jsr330_inject/javax.inject.jar:third_party/junit/junit-4.11.jar:third_party/apache_commons_logging/commons-logging-1.1.1.jar:third_party/jgit/org.eclipse.jgit-4.0.1.201506240215-r.jar:third_party/jsch/jsch-0.1.51.jar:third_party/pcollections/pcollections-2.1.2.jar:third_party/tomcat_annotations_api/tomcat-annotations-api-8.0.5.jar:third_party/error_prone/error_prone_core-2.0.11.jar:third_party/error_prone/error_prone_annotations-2.0.11.jar:third_party/error_prone/error_prone_annotation-2.0.11.jar:third_party/apache_commons_pool2/commons-pool2-2.3.jar:third_party/dagger/dagger-producers-2.5.jar:third_party/dagger/dagger-compiler-2.5.jar:third_party/dagger/dagger-2.5.jar:third_party/ijar/test/libwrongcentraldir.jar:third_party/aether/aether-transport-wagon-1.0.0.v20140518.jar:third_party/aether/aether-util-1.0.0.v20140518.jar:third_party/aether/aether-transport-classpath-1.0.0.v20140518.jar:third_party/aether/aether-connector-basic-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-spi-1.0.0.v20140518.jar:third_party/aether/aether-api-1.0.0.v20140518.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/protobuf/protobuf-java-3.0.0-beta-1.jar:third_party/protobuf/3.0.0/protobuf-java-3.0.0.jar:third_party/protobuf/protobuf-java-3.0.0-beta-4.jar:third_party/apache_httpcore/httpcore-4.2.4.jar:third_party/plexus_utils/plexus-utils-3.0.21.jar:third_party/plexus_component_annotations/plexus-component-annotations-1.6.jar:third_party/apache_velocity/velocity-1.7.jar:third_party/hamcrest/hamcrest-core-1.3.jar:third_party/apache_commons_codec/commons-codec-1.9.jar:third_party/checker_framework_dataflow/dataflow-1.8.10.jar:third_party/plexus_interpolation/plexus-interpolation-1.22.jar:third_party/bytebuddy/byte-buddy-dep-0.7-rc6.jar:third_party/mockito/mockito-all-1.10.19.jar:third_party/apache_commons_lang/commons-lang-2.6.jar:third_party/guava/guava-testlib.jar:third_party/guava/guava-19.0.jar:third_party/hazelcast/hazelcast-client-3.6.4.jar:third_party/hazelcast/hazelcast-3.5.4.jar:third_party/hazelcast/hazelcast-client-3.5.4.jar:third_party/hazelcast/hazelcast-3.6.4.jar:third_party/apache_commons_collections/commons-collections-3.2.2.jar:third_party/apache_httpclient/httpclient-4.2.5.jar:third_party/android_common/com.android_annotations_25.0.0.jar:third_party/android_common/com.android.tools.build_builder_2.0.0.jar:third_party/android_common/com.android.tools.build_builder-model_0.13.3.jar:third_party/android_common/com.android.tools.build_manifest-merger_23.1.3.jar:third_party/android_common/com.android.tools_sdklib_25.0.0.jar:third_party/android_common/com.android.tools_sdk-common_23.1.3.jar:third_party/android_common/com.android.tools.layoutlib_layoutlib_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_sdk-common_25.0.0.jar:third_party/android_common/com.android.jill_api_0.9.0.jar:third_party/android_common/com.android.tools.layoutlib_layoutlib_23.1.3.jar:third_party/android_common/com.android.tools_ddmlib_25.0.0.jar:third_party/android_common/com.android.tools_common_23.1.3.jar:third_party/android_common/com.android.tools_dvlib_25.0.0.jar:third_party/android_common/com.android.tools_sdklib_23.1.3.jar:third_party/android_common/com.android.tools.build_builder_0.13.3.jar:third_party/android_common/com.android.tools_common_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_repository_25.0.0.jar:third_party/android_common/com.android.jack_api_0.9.0.jar:third_party/android_common/com.android.tools.build_builder-test-api_2.0.0.jar:third_party/slf4j/slf4j-jdk14-1.7.7.jar:third_party/slf4j/slf4j-api-1.7.7.jar:third_party/jcip_annotations/jcip-annotations-1.0-1.jar:third_party/auto/auto-value-1.2.jar:third_party/auto/auto-common-0.3.jar:third_party/auto/auto-service-1.0-rc2.jar:third_party/xz/xz-1.5.jar:third_party/joda_time/joda-time-2.3.jar:third_party/maven_model/maven-repository-metadata-3.2.3.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-model-builder-3.2.3.jar:third_party/gson/gson-2.2.4.jar:third_party/apache_commons_compress/apache-commons-compress-1.9.jar:third_party/truth/truth-0.28.jar::third_party/grpc/grpc-stub-0.15.0.jar:third_party/grpc/grpc-core-0.15.0.jar:third_party/grpc/grpc-protobuf-lite-0.15.0.jar:third_party/grpc/grpc-protobuf-0.15.0.jar:third_party/grpc/grpc-netty-0.15.0.jar::/tmp/bazel_lfkUjBum -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_lfkUjBum/src -d /tmp/bazel_lfkUjBum/classes -source 1.8 -target 1.8 -encoding UTF-8 @/tmp/bazel_beaBQDJk/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;
               ^
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.jar.Manifest$FastInputStream.<init>(Manifest.java:332)
        at java.util.jar.Manifest$FastInputStream.<init>(Manifest.java:327)
        at java.util.jar.Manifest.read(Manifest.java:195)
        at java.util.jar.Manifest.<init>(Manifest.java:69)
        at java.util.jar.JarFile.getManifestFromReference(JarFile.java:199)
        at java.util.jar.JarFile.getManifest(JarFile.java:180)
        at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:944)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:450)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at com.sun.tools.javac.main.Main.resourceMessage(Main.java:610)
        at com.sun.tools.javac.main.Main.compile(Main.java:543)
        at com.sun.tools.javac.main.Main.compile(Main.java:381)
        at com.sun.tools.javac.main.Main.compile(Main.java:370)
        at com.sun.tools.javac.main.Main.compile(Main.java:361)
        at com.sun.tools.javac.Main.compile(Main.java:56)
        at com.sun.tools.javac.Main.main(Main.java:42)
damienmg commented 8 years ago

Hi,

Unfortunately we do not really 32bit machine. Is that your development machine or do you try to build for it?

Can you tell us a bit more about what you are trying to do?

yoava333 commented 8 years ago

I'm using x86 as a build machine, can I build bazel for a 32bit machine from a 64bit build machine?

damienmg commented 8 years ago

Not easily I guess. We could provide 32 bit binaries. And make it easy to compile for 32bit machine. That require to maintains CI machines for 32bits binaries :(

damienmg commented 8 years ago

What are you trying to build exactly?

damienmg commented 7 years ago

No answer so closing...