Closed Bug 1823989 Opened 2 years ago Closed 2 years ago

Build instructions for jsshell on android no longer work (pkg-config path issue)

Categories

(Core :: JavaScript Engine, defect)

All
Android
defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

Details

Attachments

(1 file)

The instructions for building jsshell on android no longer work correctly and end up with the following error:

 0:07.94 checking for llvm-objdump... /home/tcampbell/.mozbuild/clang/bin/llvm-objdump
 0:07.95 checking for readelf... /home/tcampbell/.mozbuild/clang/bin/llvm-readelf
 0:07.99 checking for objcopy... /home/tcampbell/.mozbuild/clang/bin/llvm-objcopy
 0:08.01 checking for strip... /home/tcampbell/.mozbuild/clang/bin/llvm-strip
 0:08.01 ERROR: *** The pkg-config script could not be found. Make sure it is
 0:08.01 *** in your path, or set the PKG_CONFIG environment variable
 0:08.02 *** to the full path to pkg-config.
*** Fix above errors and then restart with "./mach build"

The issue seems to be that the target-triple is no longer correct and a target of just aarch64 must be used instead.

The expanded triple that also works is aarch64-unknown-linux-gnu

Actually, using the linux-gnu target builds something that doesn't play well with the android dynamic loader so using aarch64-linux-android is what we want. The pkg-config issue is due to trying to use system zlib on android which isn't the right option, so instead I'll just fix build system to use mozglue zlib for android shell builds.

Stop trying to use system zlib when building standalone SpiderMonkey for Android
targets and instead rely on the mozglue version. Additionally, use 'get_adb_path'
used by other geckoview tests to locate adb in a consistent way.

Also do some house-keeping in the documentation and log messages.

Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c1e85a761778 Fix android jsshell builds. r=jandem,firefox-build-system-reviewers,nalexander

Backed out for causing android jittest failures.

[task 2023-03-24T21:10:16.272Z] 21:10:12     INFO - ##### jittest log begins
[task 2023-03-24T21:10:16.272Z] 21:10:12     INFO - Running command: ['/builds/task_167968696880165/workspace/build/venv/bin/python', '-u', '/builds/task_167968696880165/workspace/build/tests/jit-test/jit-test/jit_test.py', '../../bin/js', '--remote', '-j', '1', '--localLib=../../bin', '--no-slow', '--no-progress', '--format=automation', '--jitflags=debug', '--deviceSerial=16171FDD40008E', '--this-chunk', '1', '--total-chunks', '10'] in /builds/task_167968696880165/workspace/build/tests/jit-test/jit-test
[task 2023-03-24T21:10:16.272Z] 21:10:12     INFO - Copy/paste: /builds/task_167968696880165/workspace/build/venv/bin/python -u /builds/task_167968696880165/workspace/build/tests/jit-test/jit-test/jit_test.py ../../bin/js --remote -j 1 --localLib=../../bin --no-slow --no-progress --format=automation --jitflags=debug --deviceSerial=16171FDD40008E --this-chunk 1 --total-chunks 10
[task 2023-03-24T21:10:16.272Z] 21:10:12     INFO - Using env: (same as previous command)
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -  Traceback (most recent call last):
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -    File "/builds/task_167968696880165/workspace/build/tests/jit-test/jit-test/jit_test.py", line 576, in <module>
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -      main(sys.argv[1:])
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -    File "/builds/task_167968696880165/workspace/build/tests/jit-test/jit-test/jit_test.py", line 558, in main
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -      ok = jittests.run_tests(job_list, job_count, prefix, options, remote=True)
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -    File "/builds/task_167968696880165/workspace/build/tests/jit-test/tests/lib/jittests.py", line 750, in run_tests
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -      ok = run_tests_remote(tests, num_tests, prefix, options, slog)
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -    File "/builds/task_167968696880165/workspace/build/tests/jit-test/tests/lib/jittests.py", line 809, in run_tests_remote
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -      ok = process_test_results(gen, num_tests, pb, options, slog)
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -    File "/builds/task_167968696880165/workspace/build/tests/jit-test/tests/lib/jittests.py", line 681, in process_test_results
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -      for i, res in enumerate(results):
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -    File "/builds/task_167968696880165/workspace/build/tests/jit-test/tests/lib/tasks_adb_remote.py", line 263, in get_remote_results
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -      device, tempdir = setup_device(prefix, options)
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -    File "/builds/task_167968696880165/workspace/build/tests/jit-test/tests/lib/tasks_adb_remote.py", line 104, in setup_device
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -      device = init_device(options)
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -    File "/builds/task_167968696880165/workspace/build/tests/jit-test/tests/lib/remote.py", line 59, in init_device
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -      from mozbuild.base import MozbuildObject
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO -  ModuleNotFoundError: No module named 'mozbuild'
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO - Return code: 1
[task 2023-03-24T21:10:16.272Z] 21:10:13    ERROR - No tests run or test summary not found
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO - TinderboxPrint: jittest<br/><em class="testfail">T-FAIL</em>
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO - ##### jittest log ends
[task 2023-03-24T21:10:16.272Z] 21:10:13  WARNING - setting return code to 1
[task 2023-03-24T21:10:16.272Z] 21:10:13     INFO - The jittest suite: jittest ran with return status: WARNING
Flags: needinfo?(tcampbell)

The CI test relies on mozbase_requirements.txt file which doesn't provide the mozbuild package. In the automation case we just leave the adb_path as the default adb string. As a simple fix, I'll just guard the mozbuild import. Long term, the whole structure of jittest should probably be refactored a bit better manage device setup and to better structure the CI vs mach entry points.

Flags: needinfo?(tcampbell)
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/80053e9f68a5 Fix android jsshell builds. r=jandem,firefox-build-system-reviewers,nalexander
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

The Tier-2 Android HW jittests seem to be working this time around.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: