在Nvidia TX2设备上构建问题

时间:2019-05-23 13:26:40

标签: java bazel nvidia-jetson

我有Nvidia TX2设备。设备上的信息:

 NVIDIA Jetson TX2
 L4T 28.2.0 [ JetPack UNKNOWN ]
 Board: t186ref
 Ubuntu 16.04 LTS
 Kernel Version: 4.4.38+
 CUDA 9.0.252

我正在尝试安装Tensorflow,所以我遵循说明https://github.com/jetsonhacks/installTensorFlowTX2

我在设备上安装bazel时遇到问题。

dji@manifold2:~/bazel-0.10.0-dist$ ./compile.sh 
  Building Bazel from scratch
ERROR: JAVA_HOME (/usr/lib/jvm/java-8-openjdk-arm64/jre/) is not a path to a working JDK.
ji@manifold2:~/bazel-0.10.0-dist$ ls /usr/lib/jvm/java-8-openjdk-arm64/jre/
ASSEMBLY_EXCEPTION  bin  lib  man  THIRD_PARTY_README

我通过最后删除jre解决了这个问题。

export JAVA_HOME='/usr/lib/jvm/java-8-openjdk-arm64/'

现在当我运行compile.sh

dji@manifold2:~/bazel-0.10.0-dist$ ./compile.sh 
  Building Bazel from scratch../usr/lib/jvm/java-8-openjdk-arm64//bin/javac -classpath third_party/jgit/org.eclipse.jgit-4.0.1.201506240215-r.jar:third_party/mockito/mockito-all-1.10.19.jar:third_party/jcip_annotations/jcip-annotations-1.0-1.jar:third_party/apache_commons_collections/commons-collections-3.2.2.jar:third_party/tomcat_annotations_api/tomcat-annotations-api-8.0.5.jar:third_party/xz/xz-1.5.jar:third_party/auto/auto-common-0.3.jar:third_party/auto/auto-value-1.4.jar:third_party/auto/auto-service-1.0-rc2.jar:third_party/jsr305/jsr-305.jar:third_party/netty_tcnative/netty-tcnative-boringssl-static-2.0.6.Final.jar:third_party/truth8/truth-java8-extension-0.36.jar:third_party/netty/netty-all-4.1.16.Final.jar:third_party/plexus_interpolation/plexus-interpolation-1.22.jar:third_party/apache_httpcore/httpcore-4.4.6.jar:third_party/apache_velocity/velocity-1.7.jar:third_party/jsr330_inject/javax.inject.jar:third_party/hazelcast/hazelcast-3.6.4.jar:third_party/hazelcast/hazelcast-client-3.6.4.jar:third_party/apache_commons_logging/commons-logging-1.1.1.jar:third_party/hungarian_algorithm/software-and-algorithms-1.0-src.jar:third_party/hungarian_algorithm/software-and-algorithms-1.0.jar:third_party/opencensus/opencensus-api-0.6.0.jar:third_party/asm/asm-util-6.0.jar:third_party/asm/asm-6.0-sources.jar:third_party/asm/asm-util-6.0-sources.jar:third_party/asm/asm-commons-6.0.jar:third_party/asm/asm-commons-6.0-sources.jar:third_party/asm/asm-tree-6.0-sources.jar:third_party/asm/asm-6.0.jar:third_party/asm/asm-tree-6.0.jar:third_party/asm/asm-analysis-6.0-sources.jar:third_party/asm/asm-analysis-6.0.jar:third_party/apache_commons_pool2/commons-pool2-2.3.jar:third_party/auth/google-auth-library-credentials-0.6.0.jar:third_party/auth/google-auth-library-oauth2-http-0.6.0.jar:third_party/allocation_instrumenter/java-allocation-instrumenter-3.0.1.jar:third_party/instrumentation/instrumentation-api-0.4.3.jar:third_party/aether/aether-spi-1.0.0.v20140518.jar:third_party/aether/aether-transport-wagon-1.0.0.v20140518.jar:third_party/aether/aether-transport-http-1.0.0.v20140518.jar:third_party/aether/aether-api-1.0.0.v20140518.jar:third_party/aether/aether-transport-file-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-impl-1.0.0.v20140518.jar:third_party/guava/guava-23.1-jre.jar:third_party/error_prone/error_prone_annotations-2.2.0.jar:third_party/error_prone/error_prone_annotation-2.2.0.jar:third_party/error_prone/error_prone_check_api-2.2.0.jar:third_party/compile_testing/compile-testing-0.13.jar:third_party/java/jcommander/jcommander-1.48.jar:third_party/java/proguard/proguard5.3.3/lib/retrace.jar:third_party/java/proguard/proguard5.3.3/lib/proguardgui.jar:third_party/java/proguard/proguard5.3.3/lib/proguard.jar:third_party/java/proguard/proguard5.3.3/examples/annotations/lib/annotations.jar:third_party/java/javapoet/javapoet-1.8.0.jar:third_party/java/jarjar/gradle/wrapper/gradle-wrapper.jar:third_party/java/jarjar/jarjar-core/src/test/resources/enumtest.jar:third_party/java/jacoco/jacocoagent.jar:third_party/java/jacoco/org.jacoco.agent-0.7.5.201505241946.jar:third_party/java/jacoco/org.jacoco.report-0.7.5.201505241946.jar:third_party/java/jacoco/org.jacoco.core-0.7.5.201505241946.jar:third_party/java/jacoco/org.jacoco.agent-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-src.jar:third_party/java/jdk/langtools/javac-9-dev-r4023-3.jar:third_party/java/jdk/langtools/javac.jar:third_party/java/android_databinding/v2_3_1/exec.jar:third_party/bytebuddy/byte-buddy-dep-0.7-rc6.jar:third_party/maven_model/maven-model-builder-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-repository-metadata-3.2.3.jar:third_party/jimfs/jimfs-1.1.jar:third_party/pcollections/pcollections-2.1.2.jar:third_party/plexus_utils/plexus-utils-3.0.21.jar:third_party/apache_httpclient/httpclient-4.5.3.jar:third_party/truth/truth-0.36.jar:third_party/plexus_component_annotations/plexus-component-annotations-1.6.jar:third_party/protobuf/3.4.0/libprotobuf_java_util.jar:third_party/protobuf/3.4.0/libprotobuf_java.jar:third_party/slf4j/slf4j-jdk14-1.7.7.jar:third_party/slf4j/slf4j-api-1.7.7.jar:third_party/apache_commons_lang/commons-lang-2.6.jar:third_party/bazel_bootstrap/libautocodec-annotation.jar:third_party/bazel_bootstrap/libautocodec-processor.jar:third_party/bazel_bootstrap/libunsafe-provider.jar:third_party/bazel_bootstrap/libserialization.jar:third_party/gson/gson-2.2.4.jar:third_party/api_client/google-http-client-1.22.0-SNAPSHOT.jar:third_party/api_client/google-http-client-jackson2-1.22.0.jar:third_party/api_client/google-api-client-1.22.0.jar:third_party/api_client/google-api-client-jackson2-1.22.0.jar:third_party/turbine/turbine-0.1-20171220.jar:third_party/apache_commons_codec/commons-codec-1.9.jar:third_party/hamcrest/hamcrest-core-1.3.jar:third_party/jackson2/jackson-core-2.8.6.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_25.0.0.jar:third_party/android_common/com.android.tools_dvlib_25.0.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_annotations_25.0.0.jar:third_party/android_common/com.android.tools.external.lombok_lombok-ast_0.2.3.jar:third_party/android_common/com.android.tools_sdk-common_25.0.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_common_25.0.0.jar:third_party/android_common/com.android.tools.lint_lint-api_25.0.0.jar:third_party/android_common/com.android.tools.lint_lint-checks_25.0.0.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/jsch/jsch-0.1.51.jar:third_party/junit/junit-4.11.jar:third_party/maven/maven-settings-3.3.3.jar:third_party/maven/maven-builder-support-3.3.3.jar:third_party/maven/maven-settings-builder-3.3.3.jar:third_party/apache_commons_compress/apache-commons-compress-1.9.jar:third_party/ijar/test/libwrongcentraldir.jar:third_party/grpc/grpc-auth-1.7.0.jar:third_party/grpc/grpc-context-1.7.0.jar:third_party/grpc/grpc-netty-1.7.0.jar:third_party/grpc/grpc-protobuf-lite-1.7.0.jar:third_party/grpc/grpc-protobuf-1.7.0.jar:third_party/grpc/grpc-stub-1.7.0.jar:third_party/grpc/grpc-core-1.7.0.jar:third_party/guava/guava-testlib-23.1-jre.jar:third_party/error_prone/error_prone_core-2.2.0.jar:/tmp/bazel_2KnJFMsm -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_2KnJFMsm/src -d /tmp/bazel_2KnJFMsm/classes -source 1.7 -target 1.7 -encoding UTF-8 @/tmp/bazel_r8HAE3kD/param
warning: [options] bootstrap class path not set in conjunction with -source 1.7
src/main/java/com/google/devtools/build/docgen/SkylarkDocumentationProcessor.java:73: error: lambda expressions are not supported in -source 1.7
      Collections.sort(module, (doc1, doc2) -> us.compare(doc1.getTitle(), doc2.getTitle()));
                                            ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/actions/ActionExecutionStatusReporter.java:142: error: lambda expressions are not supported in -source 1.7
    Collections.sort(actions, comparing(arg -> arg.first));
                                            ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/actions/ActionInputHelper.java:137: error: method references are not supported in -source 1.7
    return Collections2.transform(paths, ActionInputHelper::fromPath);
                                                            ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/actions/ActionInputHelper.java:175: error: lambda expressions are not supported in -source 1.7
        parentRelativePaths, pathFragment -> treeFileArtifact(parent, pathFragment));
                                          ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/actions/ActionLookupValue.java:166: error: method references are not supported in -source 1.7
    return Maps.transformValues(generatingActionIndex, actions::get);
                                                                ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/actions/ActionResult.java:102: error: lambda expressions are not supported in -source 1.7
    return getCumulativeTime(spawnResult -> spawnResult.getWallTime());
                                         ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/actions/Artifact.java:123: error: lambda expressions are not supported in -source 1.7
      (a, b) -> {
             ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/actions/Artifact.java:137: error: method references are not supported in -source 1.7
      comparing(Artifact::getRootRelativePath);
                          ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/actions/cache/Metadata.java:36: error: default methods are not supported in -source 1.7
  default FileStateType getType() {
  ^
  (use -source 8 or higher to enable default methods)
src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java:122: error: lambda expressions are not supported in -source 1.7
          s -> {
            ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/actions/FilesetTraversalParamsFactory.java:206: error: lambda expressions are not supported in -source 1.7
      getNestedTraversal().forEach(nestedTraversal -> nestedTraversal.fingerprint(fp));
                                                   ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java:182: error: default methods are not supported in -source 1.7
  default String getFailureMessage() {
  ^
  (use -source 8 or higher to enable default methods)
src/main/java/com/google/devtools/build/lib/analysis/actions/AbstractFileWriteAction.java:126: error: default methods are not supported in -source 1.7
    default ByteString getBytes() throws IOException {
    ^
  (use -source 8 or higher to enable default methods)
src/main/java/com/google/devtools/build/lib/analysis/actions/LauncherFileWriteAction.java:77: error: lambda expressions are not supported in -source 1.7
    return out -> {
               ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java:553: error: lambda expressions are not supported in -source 1.7
      return Iterators.filter(inputs.iterator(), (e) -> !exclude.contains(e));
                                                     ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/actions/TemplateExpansionAction.java:244: error: lambda expressions are not supported in -source 1.7
          .map(artifact -> artifact.getRootRelativePath().getPathString())
                        ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/AnalysisUtils.java:113: error: lambda expressions are not supported in -source 1.7
    return Iterables.filter(prerequisites, target -> target.getProvider(provider) != null);
                                                  ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java:88: error: lambda expressions are not supported in -source 1.7
          (rule, attributes, configuration) -> configuration.getActionListeners());
                                            ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java:120: error: method references are not supported in -source 1.7
      Comparator.comparing(Class::getName);
                                  ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java:55: error: method references are not supported in -source 1.7
      lexicalFragmentOptionsComparator = Comparator.comparing(Class::getName);
                                                                     ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/analysis/config/transitions/Transition.java:24: error: default methods are not supported in -source 1.7
  default boolean isHostTransition() {
  ^
  (use -source 8 or higher to enable default methods)
src/main/java/com/google/devtools/build/lib/analysis/configuredtargets/AbstractConfiguredTarget.java:171: error: method references are not supported in -source 1.7
    addExtraSkylarkKeys(result::add);
                                ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/analysis/LocationExpander.java:110: error: lambda expressions are not supported in -source 1.7
            () -> LocationExpander.buildLocationMap(ruleContext, labelMap, allowData)),
               ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/LocationExpander.java:314: error: method references are not supported in -source 1.7
      return paths.stream().map(LocationFunction::quotePath).collect(joining(" "));
                                                  ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/analysis/LocationTemplateContext.java:71: error: lambda expressions are not supported in -source 1.7
            () -> LocationExpander.buildLocationMap(ruleContext, labelMap, allowData)),
               ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformInfo.java:251: error: method references are not supported in -source 1.7
                  toImmutableListMultimap(ConstraintValueInfo::constraint, Functions.identity()));
                                                               ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformInfo.java:259: error: lambda expressions are not supported in -source 1.7
              .filter(e -> e.getValue().size() > 1)
                        ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformProviderUtils.java:31: error: method references are not supported in -source 1.7
    return Iterables.transform(targets, PlatformProviderUtils::platform);
                                                               ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java:207: error: lambda expressions are not supported in -source 1.7
            .map(a -> a.getDescriptor())
                   ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/SkylarkProviderCollection.java:50: error: default methods are not supported in -source 1.7
  default <T extends Info> T get(NativeProvider<T> provider) {
  ^
  (use -source 8 or higher to enable default methods)
src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttr.java:290: error: method references are not supported in -source 1.7
      if (providersList.stream().noneMatch(ImmutableSet::isEmpty)) {
                                                         ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/analysis/ToolchainContext.java:134: error: lambda expressions are not supported in -source 1.7
        .filter(label -> resolvedToolchainLabels.isToolchainDependency(label))
                      ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/TransitiveInfoCollection.java:87: error: default methods are not supported in -source 1.7
  default boolean satisfies(RequiredProviders providers) {
  ^
  (use -source 8 or higher to enable default methods)
src/main/java/com/google/devtools/build/lib/analysis/TransitiveInfoCollection.java:89: error: lambda expressions are not supported in -source 1.7
        aClass -> getProvider(aClass.asSubclass(TransitiveInfoProvider.class)) != null,
               ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/TransitiveInfoProviderMap.java:64: error: default methods are not supported in -source 1.7
  default <T> T getProvider(
  ^
  (use -source 8 or higher to enable default methods)
src/main/java/com/google/devtools/build/lib/analysis/Util.java:116: error: lambda expressions are not supported in -source 1.7
        target -> set.add(ConfiguredTargetKey.of(target.getLabel(), target.getConfiguration())));
               ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/analysis/whitelisting/Whitelist.java:71: error: lambda expressions are not supported in -source 1.7
        .anyMatch(p -> p.containsPackage(label.getPackageIdentifier()));
                    ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/BazelWorkspaceStatusModule.java:170: error: lambda expressions are not supported in -source 1.7
              .map(entry -> entry.getKey() + " " + entry.getValue())
                         ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpConnectorMultiplexer.java:324: error: method references are not supported in -source 1.7
        .map(Throwable::getMessage)
                        ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidNdkRepositoryRule.java:41: error: lambda expressions are not supported in -source 1.7
      rule -> {
           ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidSdkRepositoryFunction.java:228: error: method references are not supported in -source 1.7
        Lists.transform(LOCAL_MAVEN_REPOSITORIES, outputDirectory::getRelative);
                                                                   ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidSdkRepositoryFunction.java:401: error: lambda expressions are not supported in -source 1.7
            .filter(dirent -> dirent.getType().equals(Dirent.Type.DIRECTORY))
                           ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/rules/android/AndroidSdkRepositoryRule.java:40: error: lambda expressions are not supported in -source 1.7
      rule -> {
           ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/rules/android/ndkcrosstools/NdkPaths.java:152: error: lambda expressions are not supported in -source 1.7
        includeFolderName ->
                          ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/rules/android/SdkMavenRepository.java:126: error: lambda expressions are not supported in -source 1.7
          FileSystemUtils.traverseTree(mavenRepository, path -> path.toString().endsWith(".pom")));
                                                             ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/rules/CcToolchainType.java:69: error: method references are not supported in -source 1.7
    super(CcToolchainType::createFragmentMap, ImmutableMap.of());
                           ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java:83: error: lambda expressions are not supported in -source 1.7
          (rule, attributes, cppConfig) -> {
                                        ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaSemantics.java:474: error: lambda expressions are not supported in -source 1.7
              artifact -> artifact == null ? null : artifact.getRunfilesPathString());
                       ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/rules/java/proto/BazelJavaLiteProtoLibraryRule.java:53: error: lambda expressions are not supported in -source 1.7
        rule ->
             ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/rules/java/proto/BazelJavaProtoLibraryRule.java:47: error: lambda expressions are not supported in -source 1.7
        rule ->
             ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyRuleClasses.java:51: error: lambda expressions are not supported in -source 1.7
          (rule, attributes, bazelPythonConfig) -> bazelPythonConfig.getPythonTop());
                                                ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceModule.java:257: error: lambda expressions are not supported in -source 1.7
        .map(keyword -> "user_keyword=" + keyword)
                     ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java:217: error: lambda expressions are not supported in -source 1.7
        () -> {
           ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java:449: error: lambda expressions are not supported in -source 1.7
            () -> walkableGraph,
               ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java:372: error: method references are not supported in -source 1.7
            .map(ConfiguredTarget::getConfiguration)
                                   ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java:373: error: lambda expressions are not supported in -source 1.7
            .filter(configuration -> configuration != null)
                                  ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/buildtool/OutputDirectoryLinksUtils.java:101: error: lambda expressions are not supported in -source 1.7
            .map(targetConfig -> targetConfig.getBinDirectory(repositoryName).getPath())
                              ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/buildtool/SymlinkForest.java:125: error: lambda expressions are not supported in -source 1.7
        Set<Path> roots = dirRootsMap.computeIfAbsent(dir, k -> Sets.newHashSet());
                                                             ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java:89: error: method references are not supported in -source 1.7
    return partitionWithComparator(elements, (Comparator<T>) equivalenceRelation::compare);
                                                                                  ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java:177: error: lambda expressions are not supported in -source 1.7
        .filter(element -> (value & (1 << element.ordinal())) != 0)
                        ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/collect/EquivalenceRelation.java:70: error: lambda expressions are not supported in -source 1.7
  EquivalenceRelation<?> IDENTITY = (EquivalenceRelation<Object>) (o1, o2) -> (o1 == o2) ? 0 : -1;
                                                                           ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/collect/ImmutableSortedKeyListMultimap.java:124: error: lambda expressions are not supported in -source 1.7
      multimap.asMap().forEach((key, collectionValue) -> putAll(key, collectionValue));
                                                      ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/collect/ImmutableSortedKeyListMultimap.java:254: error: method references are not supported in -source 1.7
    return Ints.saturatedCast(Arrays.stream(values).mapToLong(List::size).sum());
                                                                    ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/collect/ImmutableSortedKeyMap.java:126: error: lambda expressions are not supported in -source 1.7
      map.forEach((key, value) -> put(key, value));
                               ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/collect/ImmutableSortedKeyMap.java:274: error: method references are not supported in -source 1.7
    return entryStream().mapToInt(Entry::hashCode).sum();
                                         ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetBuilder.java:237: error: method references are not supported in -source 1.7
    sets.forEach(result::addTransitive);
                         ^
              ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/packages/GlobCache.java:113: error: lambda expressions are not supported in -source 1.7
        directory -> {
                  ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/packages/ImplicitOutputsFunction.java:377: error: lambda expressions are not supported in -source 1.7
          .map(label -> FileSystemUtils.removeExtension(label.getName()))
                     ^
  (use -source 8 or higher to enable lambda expressions)
src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java:139: error: method references are not supported in -source 1.7
    this.ruleFactory = new RuleFactory(ruleClassProvider, AttributeContainer::new);
                                                                              ^
  (use -source 8 or higher to enable method references)
src/main/java/com/google/devtools/build/lib/pkgcache/CompileOneDependencyTransformer.java:77: error: lambda expressions are not supported in -source 1.7
    Collections.sort(orderedList, comparingInt(arg -> arg.getLocation().getStartOffset()));
                                                   ^
  (use -source 8 or higher to enable lambda expressions)
100 errors
1 warning

我什至尝试下载bazel的较新版本,即。 0.25.2, 但有同样的问题。

有人可以建议如何解决此问题吗?

0 个答案:

没有答案