Hello,
I'm blocked on an issue where I have a prebuilt, static library that I've added by modifying one of the
build.gn files. I'm attaching the modified
build.gn file.
The library has been built for the 4 different architectures and placed in the following folders which are referenced by the
build.gn file.
arm64-v8a
armeabi-v7a
x86
x86_64
The file itself is named: libmy-noisecanceller.a
The build seems to work fine right up until the end where the final build artifact is about to be generated. At that point I get the error below. I have no idea why this is happening and googling the topic didn't lead me to any explanation or idea about what could be wrong.
Can someone please tell me what the issue is here and explain to me what the proper procedure is if you want to include a prebuilt, static library in the webrtc build process?
I am thinking that it has something to do with some files (related to licensing?) that are missing and that the directory containing prebuilt libraries must be organized/structured in a very specific way, but I have not been able to find any documentation on that so I really need some help with this.
Thanks in advance :-)
Traceback (most recent call last):
File "/builds/mycompany-dev/webrtc/webrtc-sdk-builder/libwebrtc_build/src/./tools_webrtc/android/build_aar.py", line 271, in <module>
sys.exit(main())
~~~~^^
File "/builds/mycompany-dev/webrtc/webrtc-sdk-builder/libwebrtc_build/src/./tools_webrtc/android/build_aar.py", line 265, in main
BuildAar(args.arch, args.output, args.use_goma, args.use_remoteexec,
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args.extra_gn_args, args.build_dir, args.extra_gn_switches,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args.extra_ninja_switches, args.use_unstripped_libs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builds/mycompany-dev/webrtc/webrtc-sdk-builder/libwebrtc_build/src/./tools_webrtc/android/build_aar.py", line 255, in BuildAar
GenerateLicenses(license_dir, build_dir, archs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builds/mycompany-dev/webrtc/webrtc-sdk-builder/libwebrtc_build/src/./tools_webrtc/android/build_aar.py", line 227, in GenerateLicenses
builder.generate_license_text(output_dir)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/builds/mycompany-dev/webrtc/webrtc-sdk-builder/libwebrtc_build/src/tools_webrtc/android/../libs/generate_licenses.py", line 207, in generate_license_text
third_party_libs |= self._get_third_party_libraries(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
buildfile, target)
^^^^^^^^^^^^^^^^^^
File "/builds/mycompany-dev/webrtc/webrtc-sdk-builder/libwebrtc_build/src/tools_webrtc/android/../libs/generate_licenses.py", line 193, in _get_third_party_libraries
output = json.loads(LicenseBuilder._run_gn(buildfile_dir, target))
File "/usr/local/lib/python3.13/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
~~~~~~~~~~~~~~~~~~~~~~~^^^
File "/usr/local/lib/python3.13/json/decoder.py", line 345, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/json/decoder.py", line 363, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
section_end:1737344116:step_script
[0Ksection_start:1737344116:cleanup_file_variables
[0K[0K[36;1mCleaning up project directory and file based variables[0;m[0;m
section_end:1737344116:cleanup_file_variables
[0K[31;1mERROR: Job failed: exit code 1
[0;m