[go: nahoru, domu]

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

arm 32bit: configure failure #652

Open
MastaG opened this issue Aug 23, 2022 · 0 comments
Open

arm 32bit: configure failure #652

MastaG opened this issue Aug 23, 2022 · 0 comments

Comments

@MastaG
Copy link
Contributor
MastaG commented Aug 23, 2022

When building with use_v4l2_codec for arm 32bit the configure step seems to fail with:

ERROR Unresolved dependencies.
//media/gpu/v4l2:v4l2_stateless_decoder(//build/toolchain/yocto:yocto_target)
  needs //third_party/libgav1:libgav1(//build/toolchain/yocto:yocto_target)

I think it's because BUILD.gn has the following:

    if (use_v4l2_codec || use_vaapi) {
      data_deps += [
        "//components/chromeos_camera:jpeg_encode_accelerator_unittest",
        "//media/gpu:video_decode_accelerator_perf_tests",
        "//media/gpu:video_decode_accelerator_tests",
        "//media/gpu:video_encode_accelerator_perf_tests",
        "//media/gpu:video_encode_accelerator_tests",
        "//media/gpu/chromeos:image_processor_test",
      ]
      if (use_vaapi) {
        data_deps += [
          "//media/gpu/vaapi:decode_test",
          "//media/gpu/vaapi:vaapi_unittest",
        ]
      }
      if (use_v4l2_codec) {
        data_deps += [ "//media/gpu/v4l2:v4l2_stateless_decoder" ]
      }
    }

Then media/gpu/v4l2/BUILD.gn has this section:

executable("v4l2_stateless_decoder") {
  testonly = true
  sources = [
    "test/av1_decoder.cc",
    "test/av1_decoder.h",
    "test/v4l2_ioctl_shim.cc",
    "test/v4l2_ioctl_shim.h",
    "test/v4l2_stateless_decoder.cc",
    "test/video_decoder.cc",
    "test/video_decoder.h",
    "test/vp9_decoder.cc",
    "test/vp9_decoder.h",
  ]

  deps = [
    "//base",
    "//media",
    "//media:test_support",
    "//media/gpu:common",
    "//third_party/libgav1:libgav1",
  ]
}

I went through various BUILD.gn files and it seems to only include this library when enable_libgav1_decoder or use_libgav1_parser is set.

Now when looking at third_party/libgav1/options.gni it has:

# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chromeos/ui_mode.gni")
import("//build/config/gclient_args.gni")

declare_args() {
  # Enable libgav1 decoder.
  # TODO(b/179825724): enable on LaCrOS.
  enable_libgav1_decoder =
      is_chromeos_ash && (target_cpu == "arm" || target_cpu == "arm64")
  use_libgav1_parser =
      (is_chromeos || is_linux || is_win) &&
      (target_cpu == "x86" || target_cpu == "x64" ||
      target_cpu == "arm64" || target_cpu == "ppc64")
}

The first is only enabled when for arm 32bit when is_chromeos_ash is set.
The second one doesn't apply for arm 32bit.

I worked around it by manually adding use_libgav1_parser to my flags so the library gets included as a build dependency.
But I don't know if that's the correct solution because they may have disabled it for arm 32 for a reason.

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

No branches or pull requests

1 participant