This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kdenlive compilation fails without USE_OPEN_GL

Tags: None
(comma "," separated)
p1ngu1n
Registered Member
Posts
8
Karma
0
I'm using latest script to build kdenlive from src, and it fails when compiling kdenlive monitor.cpp, line 184.
It seems that latest SVN change on monitor.cpp is the reason (use of m_glWidget that is not initialized in that scope).

Index: monitor.cpp
===================================================================
--- monitor.cpp (révision 5078)
+++ monitor.cpp (révision 5182)
@@ -181,6 +181,9 @@
m_videoBox->setLayout(lay);
render = new Render(m_name, (int) m_monitorRefresh->winId(), profile, this);
m_monitorRefresh->setRenderer(render);
+ }else if (m_glWidget) {
+ lay->addWidget(m_glWidget);
+ m_videoBox->setLayout(lay);
}

I suggest to add some #if defined(USE_OPEN_GL)

However, after adding it, it compils, but I still having troubles during linking:
CMakeFiles/kdenlive.dir/blackmagic/capture.o: In function `CDeckLinkGLWidget':
/home/vbarbere/usr/local/kdenlive/src/kdenlive/src/blackmagic/capture.cpp:109: undefined reference to `QGLWidget::QGLWidget(QWidget*, QGLWidget const*, QFlags<:windowtype>)'

I'm not very familiar with cmake... Could you help me ?
p1ngu1n
Registered Member
Posts
8
Karma
0
Hello again.

well, I'm still stuck with this linking failure:
Linking CXX executable kdenlive
CMakeFiles/kdenlive.dir/blackmagic/capture.o: In function `CDeckLinkGLWidget':
capture.cpp:109: undefined reference to `QGLWidget::QGLWidget(QWidget*, QGLWidget const*, QFlags<:windowtype>)'
capture.cpp:109: undefined reference to `QGLWidget::QGLWidget(QWidget*, QGLWidget const*, QFlags<:windowtype>)'
CMakeFiles/kdenlive.dir/blackmagic/capture.o: In function `CDeckLinkGLWidget::showOverlay(QImage, bool)':
[....... lot of other similar issues]

I'm using a ubuntu system with all developments packages installed, including libqt4-opengl-dev.
g.marco
Registered Member
Posts
87
Karma
0
capture.cpp uses QGLWidget, which cannot be simply disabled.
you should setup your kdenlive with opengl, or capture.cpp must use a non opengl way.


p1ngu1n
Registered Member
Posts
8
Karma
0
Hello,

How can I setup kdenlive with opengl enabled ?

g.marco
Registered Member
Posts
87
Karma
0
cmake -DUSE_OPEN_GL=1 should set this.

or take a look in src/CMakeLists.txt

if(APPLE)
find_package(OpenGL)
set(QT_USE_QTOPENGL TRUE)
else(APPLE)
macro_optional_find_package(OpenGL)
endif(APPLE)

maybe the else should also set the find_package(OpenGL) (since this is not every time needed under linux, this should be configurable)


p1ngu1n
Registered Member
Posts
8
Karma
0
This does not solve the linking issue (I tried both methods)

To solve it, I had to edit the ./src/cmake_bindir/CMakeFiles/kdenlive.dir/link.txt and I appended the "-lQtOpenGL" flag.

I've look deeper into details into src/CMakeLists.txt and found a workaround by commenting mentioned lines below to force library linking
if(APPLE)
find_package(SDL REQUIRED)
target_link_libraries(kdenlive ${SDL_LIBRARY})
target_link_libraries(kdenlive ${QT_QTOPENGL_LIBRARY})
target_link_libraries(kdenlive ${OPENGL_LIBRARIES})
else(APPLE)
add_definitions(-DHAVE_V4L2)
# if(OPENGL_FOUND) <---- COMMENTED LINE
target_link_libraries(kdenlive ${QT_QTOPENGL_LIBRARY})
target_link_libraries(kdenlive ${OPENGL_LIBRARIES})
# endif(OPENGL_FOUND) <---- COMMENTED LINE
endif(APPLE)

So, it seems that "OPENGL_FOUND" is false. What sets this variable ?


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], Yahoo [Bot]