[Buildroot] [PATCH v1 2/2] package/libcamera-apps: add '-fpermissive' (fixes X11 preview compile)
Arnout Vandecappelle
arnout at mind.be
Sun Mar 27 15:40:07 UTC 2022
On 18/03/2022 14:10, Peter Seiderer wrote:
> - 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 <ps.report at gmx.net>
> ---
> ...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
>
> diff --git a/package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch b/package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch
> new file mode 100644
> index 0000000000..0bfc7e1ad4
> --- /dev/null
> +++ b/package/libcamera-apps/0002-cmake-add-fpermissive-compiler-command-line-option.patch
> @@ -0,0 +1,37 @@
> +From b04777e6b386ed0c6b1036d4c1178b4b8a1c88d5 Mon Sep 17 00:00:00 2001
> +From: Peter Seiderer <ps.report at gmx.net>
> +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 <ps.report at gmx.net>
> +---
> + 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)
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
> + add_definitions(-D_FILE_OFFSET_BITS=64)
> +
> + if (CMAKE_COMPILER_IS_GNUCXX)
> +--
> +2.35.1
> +
More information about the buildroot
mailing list