-
Notifications
You must be signed in to change notification settings - Fork 208
Description
Hi,
I'm trying to compile chromium 85.0.4183.102 for I.MX6 machine and it is failing on configuration step. On these machines, there is no support for GBM.
| Returned 1.
| stderr:
|
| Package gbm was not found in the pkg-config search path.
| Perhaps you should add the directory containing `gbm.pc'
| to the PKG_CONFIG_PATH environment variable
| No package 'gbm' found
| Could not run pkg-config.
|
| See //third_party/minigbm/BUILD.gn:122:3: whence it was called.
| pkg_config("libgbm") {
| ^---------------------
| See //ui/gfx/linux/BUILD.gn:41:5: which caused the file to be included.
| "//third_party/minigbm",
| ^----------------------
| WARNING: exit code 1 from a shell command.
This problem is present from version 81.0.4044.122 (commit a48be65).
On previous versions of chrome, we could overcome this problem by using variable "use_system_minigbm=false", but there seems to be a problem now. Chromium compiles minigbm, but fails to compile gpu_memory_buffer_support_x11 target:
| In file included from ../../ui/gfx/linux/gpu_memory_buffer_support_x11.cc:21:
| ../../ui/gfx/linux/gbm_device.h:8:10: fatal error: 'gbm.h' file not found
| #include <gbm.h>
| ^~~~~~~
| 1 error generated.
To make this work, I had to make a small patch to add "//third_party/minigbm/src" to the include path because it couldn't find the gbm.h file provided by minigbm:
diff --git a/ui/gfx/linux/BUILD.gn b/ui/gfx/linux/BUILD.gn
index c54b85f..b8c874d 100644
--- a/ui/gfx/linux/BUILD.gn
+++ b/ui/gfx/linux/BUILD.gn
@@ -61,6 +61,8 @@ if (use_x11) {
"//ui/gfx/x",
]
defines = [ "IS_GBM_SUPPORT_X11_IMPL" ]
+
+ include_dirs = [ "//third_party/minigbm/src" ]
}
}
I think a condition should be added on this file in order to use the built-in minigbm headers if use_system_minigbm variable is set to false.
I tried to do something like this:
if(!use_system_minigbm){
include_dirs = [ "//third_party/minigbm/src" ]
}
but i got an error:
| ERROR at //ui/gfx/linux/BUILD.gn:65:10: Undefined identifier
| if (!use_system_minigbm) {
| ^-----------------
I'm not so experienced on chromium build system, but i think this variable is not visible on this BUILD.gn file. So far I'm using the patch limited on mx6 machines, but I think it would be better if this issue is fixed upstream.