Skip to content

libcamera-apps require patch for invalid conversion #5

@shirok1

Description

@shirok1
egl_preview.cpp: In member function ‘void EglPreview::makeWindow(const char*)’:
egl_preview.cpp:325:69: error: invalid conversion from ‘Window’ {aka ‘long unsigned int’} to ‘EGLNativeWindowType’ {aka ‘void*’} [-fpermissive]
  325 |         egl_surface_ = eglCreateWindowSurface(egl_display_, config, window_, NULL);
      |                                                                     ^~~~~~~
      |                                                                     |
      |                                                                     Window {aka long unsigned int}
compilation terminated due to -Wfatal-errors.

Need a patch like this...

diff --text --unified --new-file a/preview/egl_preview.cpp  b/preview/egl_preview.cpp
--- a/preview/egl_preview.cpp
+++ b/preview/egl_preview.cpp
@@ -322,7 +322,7 @@
 	wm_delete_window_ = XInternAtom(display_, "WM_DELETE_WINDOW", False);
 	XSetWMProtocols(display_, window_, &wm_delete_window_, 1);
 
-	egl_surface_ = eglCreateWindowSurface(egl_display_, config, window_, NULL);
+	egl_surface_ = eglCreateWindowSurface(egl_display_, config, reinterpret_cast<EGLNativeWindowType>(window_), NULL);
 	if (!egl_surface_)
 		throw std::runtime_error("eglCreateWindowSurface failed");

...or simply update its version to include raspberrypi/rpicam-apps@2898c98

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions