Build Failed !

265 views
Skip to first unread message

rz

unread,
Feb 9, 2021, 12:20:35 AM2/9/21
to gav1-devel

Chromium's build that involves libgav1 is failing. Here's the output from ninja: 

In file included from ../../media/gpu/av1_decoder.h:18:
../../third_party/libgav1/src/src/utils/constants.h:23:10: fatal error: 'src/utils/bit_mask_set.h' file not found
#include "src/utils/bit_mask_set.h"

When checked the third_party/libgav1/src/src folder it looks like all the header files have similar issues even in dsp/ , gav1/ , post_filter/ , tile/ , utils/. Including the respective headers with "src" prefix causing failure.  When tried and hack it manually referencing all the header files with appropriate prefixes "../" or "../../" ; it worked fine but at the end it has failed stating that some object files were not found. 

What's the ideal solution ? 

Thank you in advance.

\rz

Johann Koenig

unread,
Feb 9, 2021, 12:40:11 AM2/9/21
to gav1-devel
On Tue, Feb 9, 2021 at 2:20 PM rz <rzi...@gmail.com> wrote:

Chromium's build that involves libgav1 is failing. Here's the output from ninja: 

What does your args.gn look like? What target are you building? With just this argument:
enable_libgav1_decoder = true

$ autoninja -C out/libgav1/

completes successfully for me (HEAD as of 9 Feb 2021) and I see various libgav1 objects in the output directory.
 
In file included from ../../media/gpu/av1_decoder.h:18:
../../third_party/libgav1/src/src/utils/constants.h:23:10: fatal error: 'src/utils/bit_mask_set.h' file not found
#include "src/utils/bit_mask_set.h"

When checked the third_party/libgav1/src/src folder it looks like all the header files have similar issues even in dsp/ , gav1/ , post_filter/ , tile/ , utils/. Including the respective headers with "src" prefix causing failure.  When tried and hack it manually referencing all the header files with appropriate prefixes "../" or "../../" ; it worked fine but at the end it has failed stating that some object files were not found. 

BUILD.gn includes:
config("public_libgav1_config") {
  include_dirs = [
    "src",
    "src/src",
  ]

which should make the #include paths work correctly.
 
What's the ideal solution ? 

Thank you in advance.

\rz

--
You received this message because you are subscribed to the Google Groups "gav1-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gav1-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gav1-devel/2e44625f-58fd-4417-b98a-b27c4de860b4n%40googlegroups.com.

rz

unread,
Feb 9, 2021, 3:40:31 AM2/9/21
to gav1-devel
Hi Johann,

Thank you for the response. 

I'm trying to write a custom fuzz target for av1_decoder. Target: Linux (Ubuntu 20.04). 

Yes, I've observed BUILD.gn in libgav1 which include dirs - src/ and src/src. However, hitting the mentioned issue when tried to build it with ninja

In file included from ../../media/gpu/av1_fuzztest.cc:13:
In file included from ../../media/gpu/av1_decoder.h:18:
../../third_party/libgav1/src/src/utils/constants.h:23:10: fatal error: 'src/utils/bit_mask_set.h' file not found
#include "src/utils/bit_mask_set.h"

These are the contents of args.gn in out/libfuzzer

enable_mojom_fuzzer = true
enable_nacl = false
ffmpeg_branding = "ChromeOS"
is_asan = true
is_component_build = true
is_debug = false
optimize_for_fuzzing = true
pdf_enable_xfa = true
proprietary_codecs = true
use_goma = false
use_libfuzzer = true
enable_libgav1_decoder = true

Thank you in advance.

\rz 

James Zern

unread,
Feb 9, 2021, 4:30:31 PM2/9/21
to rz, gav1-devel
Hi,

On Tue, Feb 9, 2021 at 12:40 AM rz <rzi...@gmail.com> wrote:
Hi Johann,

Thank you for the response. 

I'm trying to write a custom fuzz target for av1_decoder. Target: Linux (Ubuntu 20.04). 

Yes, I've observed BUILD.gn in libgav1 which include dirs - src/ and src/src. However, hitting the mentioned issue when tried to build it with ninja

In file included from ../../media/gpu/av1_fuzztest.cc:13:
In file included from ../../media/gpu/av1_decoder.h:18:
../../third_party/libgav1/src/src/utils/constants.h:23:10: fatal error: 'src/utils/bit_mask_set.h' file not found
#include "src/utils/bit_mask_set.h"

Without seeing your gn target my guess is you're missing a dependency on libgav1. You would see this with media/gpu:unit_tests if you were to include av1_decoder_unittest.cc unconditionally for a target that didn't include that dependency for instance. Try adding:
deps += [ "//third_party/libgav1:libgav1" ]
 

rz

unread,
Feb 9, 2021, 9:51:11 PM2/9/21
to gav1-devel
Hi,

Yes, I've indeed done that (adding "//third_party/libgav1:libgav1" to deps ) in the very first step. 

In this case, ninja is throwing the ERROR Unresolved dependencies:

ERROR Unresolved dependencies.
//media/gpu:media_av1_fuzztest(//build/toolchain/linux:clang_x64)
  needs //third_party/libgav1:libgav1(//build/toolchain/linux:clang_x64)

ninja: error: rebuilding 'build.ninja': subcommand failed

So, when I removed it from deps, execution continued till the point it hit the fatal error with include files.

Strange.

Thank you in advance.

James Zern

unread,
Feb 9, 2021, 10:28:29 PM2/9/21
to rz, gav1-devel
On Tue, Feb 9, 2021 at 6:51 PM rz <rzi...@gmail.com> wrote:
Hi,

Yes, I've indeed done that (adding "//third_party/libgav1:libgav1" to deps ) in the very first step. 

In this case, ninja is throwing the ERROR Unresolved dependencies:

ERROR Unresolved dependencies.
//media/gpu:media_av1_fuzztest(//build/toolchain/linux:clang_x64)
  needs //third_party/libgav1:libgav1(//build/toolchain/linux:clang_x64)

Compiler dependencies are usually pulled down based on the tree and configuration via gclient sync [1]. If you're trying to build for linux while under a chromeos tree I don't have a suggestion about how to resolve the dependency except that you may need to check which toolchain is being used [2]. This change [3] is trying to enable libgav1 for sanitizer builds on linux, so it might be worth tracking the progress and trying one of the existing targets.

 

rz

unread,
Feb 10, 2021, 9:34:33 AM2/10/21
to gav1-devel
Well, thank you for the information and the words of experience !

Yes, I've checked  the mentioned changes [1] and applied its patch to my source code locally. It looks like dependency issues are resolved magically. 

However, there's an issue regarding owners file. ninja is throwing duplicate definition error.

ERROR at //testing/libfuzzer/fuzzer_test.gni:164:7: Duplicate definition.
      action(owners_file_name) {
      ^-------------------------
The item
  //media/gpu:media_av1_fuzztest.owners
was already defined.
See //testing/libfuzzer/fuzzer_test.gni:164:7: Previous definition:
      action(owners_file_name) {
      ^-------------------------

James Zern

unread,
Feb 10, 2021, 2:54:07 PM2/10/21
to rz, gav1-devel
On Wed, Feb 10, 2021 at 6:34 AM rz <rzi...@gmail.com> wrote:
Well, thank you for the information and the words of experience !

Yes, I've checked  the mentioned changes [1] and applied its patch to my source code locally. It looks like dependency issues are resolved magically. 

However, there's an issue regarding owners file. ninja is throwing duplicate definition error.

ERROR at //testing/libfuzzer/fuzzer_test.gni:164:7: Duplicate definition.
      action(owners_file_name) {
      ^-------------------------
The item
  //media/gpu:media_av1_fuzztest.owners
was already defined.
See //testing/libfuzzer/fuzzer_test.gni:164:7: Previous definition:
      action(owners_file_name) {
      ^-------------------------

That looks to be built from the target name [4], is it unique in the build file? Do the existing targets [5] work for you? You might try deleting your build directory to force the files to be regenerated.

 

rz intct

unread,
Feb 12, 2021, 12:14:27 PM2/12/21
to James Zern, gav1-devel
Yes. There was a mistake from my end. And, yes, the patch worked
pretty well; although encountered a couple of errors - resolved it by
changing the respective source_sets in vaapi. It looks like same
changes were made officially and merged finally. Anyway, thanks a lot
for your quick responses James.

James Zern

unread,
Feb 17, 2021, 10:43:10 PM2/17/21
to rz intct, gav1-devel
No problem, I'm glad you got it to work. 
Reply all
Reply to author
Forward
0 new messages