package/libcamera-apps: X11 support needs libdrm
PATCH 1/2 package/libcamera-apps: X11 support needs libdrm
- X11 support needs libdrm (optional libdrm dependency already present in libcamera-apps.mk)
Fixes:
http://autobuild.buildroot.net/results/5df48038df5deb4f1e85287cde9a403c5681c28e
.../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/preview/egl_preview.cpp:18:10: fatal error: libdrm/drm_fourcc.h: No such file or directory
18 | #include <libdrm/drm_fourcc.h>
| ^~~~~~~~~~~~~~~~~~~~~--- package/libcamera-apps/Config.in | 1 + 1 file changed, 1 insertion(+)
package/libcamera-apps/Config.in +1 -0
@@ -14,6 +14,7 @@ config BR2_PACKAGE_LIBCAMERA_APPS select BR2_PACKAGE_LIBPNG select BR2_PACKAGE_TIFF select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL) + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL) select BR2_PACKAGE_LIBEPOXY if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL) select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5 select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5
Signature · 6 lines
2.35.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/libcamera-apps: add '-fpermissive' (fixes X11 preview compile)
- add patch to add '-fpermissive' compiler command line option to fix egl_preview.cpp compile
Fixes:
.../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/preview/egl_preview.cpp:329:69: error: invalid conversion from ‘Window’ {aka ‘long unsigned int’} to ‘EGLNativeWindowType’ {aka ‘fbdev_window*’} [-fpermissive]
329 | egl_surface_ = eglCreateWindowSurface(egl_display_, config, window_, NULL);
| ^~~~~~~
| |
| Window {aka long unsigned int}--- ...missive-compiler-command-line-option.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch
package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch new file +37 -0
@@ -0,0 +1,37 @@ +From b04777e6b386ed0c6b1036d4c1178b4b8a1c88d5 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Fri, 18 Mar 2022 12:39:27 +0100 +Subject: [PATCH] cmake: add -fpermissive compiler command line option +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes (with bootlin arm toolchain): + + .../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/preview/egl_preview.cpp:329:69: error: invalid conversion from ‘Window’ {aka ‘long unsigned int’} to ‘EGLNativeWindowType’ {aka ‘fbdev_window*’} [-fpermissive] + 329 | egl_surface_ = eglCreateWindowSurface(egl_display_, config, window_, NULL); + | ^~~~~~~ + | | + | Window {aka long unsigned int} + +Signed-off-by: Peter Seiderer <[email protected]> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1ca1e39..eddda1f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,7 +11,7 @@ endif() + + set (CMAKE_EXPORT_COMPILE_COMMANDS ON) + set (CMAKE_CXX_STANDARD 17) +-add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new) ++add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new -fpermissive) + add_definitions(-D_FILE_OFFSET_BITS=64) + + if (CMAKE_COMPILER_IS_GNUCXX) +-- +2.35.1 +
Signature · 6 lines
2.35.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v1 2/2] package/libcamera-apps: add '-fpermissive' (fixes X11 preview compile)
Quoted 44 lines · Peter Seiderer
- add patch to add '-fpermissive' compiler command line option to fix egl_preview.cpp compile
Fixes:
.../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/preview/egl_preview.cpp:329:69: error: invalid conversion from ‘Window’ {aka ‘long unsigned int’} to ‘EGLNativeWindowType’ {aka ‘fbdev_window*’} [-fpermissive] 329 | egl_surface_ = eglCreateWindowSurface(egl_display_, config, window_, NULL); | ^~~~~~~ | | | Window {aka long unsigned int}Signed-off-by Peter Seiderer <[email protected]>--- ...missive-compiler-command-line-option.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+)create mode 100644
package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patchpackage/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch new file +21
-0@@ -0,0 +1,37 @@ +From b04777e6b386ed0c6b1036d4c1178b4b8a1c88d5 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Fri, 18 Mar 2022 12:39:27 +0100 +Subject: [PATCH] cmake: add -fpermissive compiler command line option +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes (with bootlin arm toolchain): + + .../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/preview/egl_preview.cpp:329:69: error: invalid conversion from ‘Window’ {aka ‘long unsigned int’} to ‘EGLNativeWindowType’ {aka ‘fbdev_window*’} [-fpermissive] + 329 | egl_surface_ = eglCreateWindowSurface(egl_display_, config, window_, NULL); + | ^~~~~~~ + | | + | Window {aka long unsigned int} + +Signed-off-by: Peter Seiderer <[email protected]> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +
package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch line 31
Quoted 10 lines
package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch new file +10
-0+diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1ca1e39..eddda1f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,7 +11,7 @@ endif() + + set (CMAKE_EXPORT_COMPILE_COMMANDS ON) + set (CMAKE_CXX_STANDARD 17) +-add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new) ++add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new -fpermissive)
This patch is most likely not upstreamable (and I indeed can't find your
upstream PR). It would be much better to simply fix the underlying issue and upstream that. Should be simple enough, just add a cast.
Regards,
Arnout
package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch line 37
Quoted 6 lines
package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch new file +6
-0+ add_definitions(-D_FILE_OFFSET_BITS=64) + + if (CMAKE_COMPILER_IS_GNUCXX) +-- +2.35.1 +
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedQuoted 5 lines · Peter Seiderer
- X11 support needs libdrm (optional libdrm dependency already present in libcamera-apps.mk)
Fixes:
Quoted 7 lines
http://autobuild.buildroot.net/results/5df48038df5deb4f1e85287cde9a403c5681c28e .../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/preview/egl_preview.cpp:18:10: fatal error: libdrm/drm_fourcc.h: No such file or directory 18 | #include <libdrm/drm_fourcc.h> | ^~~~~~~~~~~~~~~~~~~~~Signed-off-by Peter Seiderer <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 9 lines
--- package/libcamera-apps/Config.in | 1 + 1 file changed, 1 insertion(+)package/libcamera-apps/Config.in +0
-0
package/libcamera-apps/Config.in config BR2_PACKAGE_LIBCAMERA_APPS · line 20
Quoted 7 lines
package/libcamera-apps/Config.in +1
-0@@ -14,6 +14,7 @@ config BR2_PACKAGE_LIBCAMERA_APPS select BR2_PACKAGE_LIBPNG select BR2_PACKAGE_TIFF select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL) + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL) select BR2_PACKAGE_LIBEPOXY if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL) select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5 select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Seiderer <[email protected]> writes:
- X11 support needs libdrm (optional libdrm dependency already present in libcamera-apps.mk)
Fixes:
Quoted 7 lines
http://autobuild.buildroot.net/results/5df48038df5deb4f1e85287cde9a403c5681c28e
.../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/preview/egl_preview.cpp:18:10: fatal error:
libdrm/drm_fourcc.h: No such file or directory18 | #include <libdrm/drm_fourcc.h> | ^~~~~~~~~~~~~~~~~~~~~Signed-off-by Peter Seiderer <[email protected]>
Committed to 2022.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot