Local build chromium for ChromeOS: use of undeclared identifier 'V4L2_PIX_FMT_INVZ |
||||
Issue descriptionReport split from Issue 624436: Comment 40 by tonikitoo@chromium.org, Today (65 minutes ago) ⚐ commit in comment #39 ( https://codereview.chromium.org/2428263004 ) seems to have broken the build locally for me. here is my set up: GN args: is_debug = false target_os = "chromeos" use_ozone = true ozone_platform_x11 = true ozone_platform_gbm = true ozone_platform_wayland = true enable_package_mash_services = true use_sysroot = false enable_nacl = false remove_webcore_debug_symbols = true Build command: $ time ninja -C <out> chrome mash:all services/ui/demo mash/browser/ Error: ../../../media/capture/video/linux/v4l2_capture_delegate.cc:63:6: error: use of undeclared identifier 'V4L2_PIX_FMT_INVZ' {V4L2_PIX_FMT_INVZ, PIXEL_FORMAT_Y16, 1}, ^ ../../../media/capture/video/linux/v4l2_capture_delegate.cc:162:46: error: cannot use incomplete type 'const struct (anonymous struct at ../../../media/capture/video/linux/v4l2_capture_delegate.cc:55:8) []' as a range for (const auto& fourcc_and_pixel_format : kSupportedFormatsAndPlanarity) { ^ ../../../media/capture/video/linux/v4l2_capture_delegate.cc:173:46: error: cannot use incomplete type 'const struct (anonymous struct at ../../../media/capture/video/linux/v4l2_capture_delegate.cc:55:8) []' as a range for (const auto& fourcc_and_pixel_format : kSupportedFormatsAndPlanarity) { ^ ../../../media/capture/video/linux/v4l2_capture_delegate.cc:188:29: error: cannot use incomplete type 'const struct (anonymous struct at ../../../media/capture/video/linux/v4l2_capture_delegate.cc:55:8) []' as a range for (const auto& format : kSupportedFormatsAndPlanarity) ^ 4 errors generated. [14084/28179] CXX obj/media/capture/capture/video_capture_device_client.o ninja: build stopped: subcommand failed. Detail: * /usr/include/linux/videodev2.h does not have V4L2_PIX_FMT_INVZ defined for me * $ uname -a Linux localhost.localdomain 4.7.4-200.fc24.x86_64 #1 SMP Thu Sep 15 18:42:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux So kernel > 4.6, and lines below from media/capture/video/linux/v4l2_capture_delegate.cc do not build #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) // 16 bit depth, Realsense F200. #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') // 16 bit depth, Realsense SR300. #define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z') #endif
,
Nov 3 2016
Temporary, you could use this - https://codereview.chromium.org/2428263004/diff/20001/media/capture/video/linux/v4l2_capture_delegate.cc I will make a patch now to fix this and let's see if there are other people affected. 1. What is the chromeos board you are building for? 2. Are you building only chromium for chromeos (https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/building-chromium-browser) or full image? 3. What's the version of libv4l-dev?
,
Nov 3 2016
#1 tonikitoo@, 4.7.4-200.fc24.x86_64 seems like a Fedora. Is libv4l-dev up to date?
,
Nov 3 2016
tonikitoo@,
Could you please verify if this patch is a workaround for the issue? Thanks.
diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc
index 8706854..7015a48 100644
--- a/media/capture/video/linux/v4l2_capture_delegate.cc
+++ b/media/capture/video/linux/v4l2_capture_delegate.cc
@@ -27,6 +27,13 @@
#define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z')
#endif
+// TODO(aleksandar.stojiljkovic): This is temporary workaround for random local
+// build issues using chrome-sdk. Remove it when the cause is clarified.
+// See https://crbug.com/661877
+#ifndef V4L2_PIX_FMT_INVZ
+#define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z')
+#endif
+
namespace media {
// Desired number of video buffers to allocate. The actual number of allocated
,
Nov 3 2016
tonikitoo@, will wait for your confirmation if your machine is up to date to see if we need the workaround patch from #4. Thanks.
,
Nov 3 2016
I am on Fedora 24, indeed. I am building chromeos for linux desktop, using 'use_ozone', aleksandar. Here are the library data: $ dnf info libv4l-devel.x86_64 Name : libv4l-devel Arch : x86_64 Epoch : 0 Version : 1.10.0 Release : 2.fc24 Size : 38 k Repo : @System From repo : fedora Summary : Development files for libv4l URL : http://hansdegoede.livejournal.com/3636.html License : LGPLv2+ Description : The libv4l-devel package contains libraries and header files for : developing applications that use libv4l. $ sudo dnf upgrade libv4l-devel.x86_64 Last metadata expiration check: 2:38:39 ago on Thu Nov 3 06:07:34 2016. Dependencies resolved. Nothing to do. Complete! Yesterday, I worked around the build by doing: diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc index 8706854..5c98b8a 100644 --- a/media/capture/video/linux/v4l2_capture_delegate.cc +++ b/media/capture/video/linux/v4l2_capture_delegate.cc @@ -20,7 +20,7 @@ #include "media/capture/video/blob_utils.h" #include "media/capture/video/linux/video_capture_device_linux.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) || 1 // 16 bit depth, Realsense F200. #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') // 16 bit depth, Realsense SR300.
,
Nov 3 2016
My apologies, wrong dev file. dpkg -S /usr/include/linux/videodev2.h linux-libc-dev:i386, linux-libc-dev:amd64: /usr/include/linux/videodev2.h From your build error, I understand that only V4L2_PIX_FMT_INVZ is missing from /usr/include/linux/videodev2.h - V4L2_PIX_FMT_Z16 is in the file? Thanks.
,
Nov 3 2016
Please ignore - understand the problem now (INVZ is the problem as not yet 4.8 even). Should be fixed soon.
,
Nov 3 2016
(re: From your build error, I understand that only V4L2_PIX_FMT_INVZ is missing from /usr/include/linux/videodev2.h - V4L2_PIX_FMT_Z16 is in the file?) Correct
,
Nov 3 2016
Sorry for the problems caused here and thanks for help. Submitted the workaround for review. https://codereview.chromium.org/2475633002/
,
Nov 4 2016
The workaround landed: https://crrev.com/957ba284b09867e3d6c7054a5e2fcc29c37d3722 Workaround for undeclared identifier V4L2_PIX_FMT_INVZ. Realsense SR300 driver installation patches the kernel currently. Until the format is officially introduced to kernel, enable using it and resolve build error on kernel > 4.6. BUG= 661877 Review-Url: https://codereview.chromium.org/2475633002
,
Nov 7 2016
Marking this as fixed as the build issue is resolved. The other part of the issue, is that workaround would stay until we get official kernel version the patch is integrated to. The info from librealsense authors (dorodnic@) - https://github.com/IntelRealSense/librealsense: The process of upstreaming SR300 pixel formats is ongoing. So far, the patch has been successfully integrated into Canonical Ubuntu 16 version for Intel Joule and OSTRO OS.
,
Dec 30 2016
Issue 662024 has been merged into this issue. |
||||
►
Sign in to add a comment |
||||
Comment 1 by aleksand...@intel.com
, Nov 3 2016