-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#51179Closed
Copy link
Labels
a: desktopRunning on desktopRunning on desktopc: crashStack traces logged to the consoleStack traces logged to the consolee: local-engine-developmentLocal builds of the engine working betterLocal builds of the engine working betterengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-linuxOwned by the Linux platform teamOwned by the Linux platform team
Description
From what I can tell, commit 88baf62f1e66e973e919faef7d80fb1a4c3ef90c which added the following to flutter/testing/BUILD.gn:54
if (is_linux) {
# So that we can call gtk_init in main().
configs += [ "//flutter/shell/platform/linux/config:gtk" ]
}
Now forces embedded devices to have gtk+-3.0 built and installed to configure Flutter 3.19+. This is not ideal, and raises a few questions:
- Why is the testing directory included at all when
--no-enable-unittestsis passed to flutter/tools/gn? - Is there a clean way of disabling the above test?
My testing was done via the Buildroot embedded Linux SDK and updating from Flutter 3.16.8 to 3.19.2.
This is the output of the error described above:
PATH=output/host/share/depot_tools:"output/host/bin:output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" PUB_CACHE=fosdem/dl/br-flutter-pub-cache HOME=output/host/share/flutter/sdk ./flutter/tools/gn --clang --embedder-for-target --linux-cpu x64 --no-build-embedder-examples --no-clang-static-analyzer --no-enable-unittests --no-goma --no-prebuilt-dart-sdk --no-stripped --runtime-mode profile --target-os linux --target-sysroot output/host/x86_64-buildroot-linux-gnu/sysroot --target-toolchain output/build/flutter-engine-3.19.2/buildtools/linux-x64/clang --target-triple x86_64-unknown-linux-gnu --no-lto --enable-fontconfig --enable-impeller-opengles --no-build-glfw-shell --disable-desktop-embeddings
Generating GN files in: out/linux_profile_x64
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
pkgresult = exec_script(pkg_config_script, args, "value")
^----------
Current dir: output/build/flutter-engine-3.19.2/out/linux_profile_x64/
Command: vpython3 output/build/flutter-engine-3.19.2/build/config/linux/pkg-config.py -s output/host/x86_64-buildroot-linux-gnu/sysroot -a x64 --system_libdir lib gtk+-3.0
Returned 1.
stderr:
Traceback (most recent call last):
File "output/build/flutter-engine-3.19.2/build/config/linux/pkg-config.py", line 247, in <module>
sys.exit(main())
File "output/build/flutter-engine-3.19.2/build/config/linux/pkg-config.py", line 144, in main
prefix = GetPkgConfigPrefixToStrip(options, args)
File "output/build/flutter-engine-3.19.2/build/config/linux/pkg-config.py", line 82, in GetPkgConfigPrefixToStrip
prefix = subprocess.check_output([options.pkg_config,
File "output/host/share/flutter/sdk/.vpython-root/store/cpython-n8umfpv0s1ufm2q1s4irhb59jc/contents/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "output/host/share/flutter/sdk/.vpython-root/store/cpython-n8umfpv0s1ufm2q1s4irhb59jc/contents/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pkg-config', '--variable=prefix', 'gtk+-3.0']' returned non-zero exit status 1.
See //flutter/shell/platform/linux/config/BUILD.gn:8:1: whence it was called.
pkg_config("gtk") {
^------------------
See //flutter/testing/BUILD.gn:56:18: which caused the file to be included.
configs += [ "//flutter/shell/platform/linux/config:gtk" ]
Removing
if (is_linux) {
# So that we can call gtk_init in main().
configs += [ "//flutter/shell/platform/linux/config:gtk" ]
}
from flutter/testing/BUILD.gn fixes the issue, but it still begs the question as to why the testing directory is being included at all if --no-enable-unittests is being set?
Metadata
Metadata
Assignees
Labels
a: desktopRunning on desktopRunning on desktopc: crashStack traces logged to the consoleStack traces logged to the consolee: local-engine-developmentLocal builds of the engine working betterLocal builds of the engine working betterengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-linuxOwned by the Linux platform teamOwned by the Linux platform team