Bug 405805 - kdenlive fails to build with external rttr
Summary: kdenlive fails to build with external rttr
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Setup & Installation (show other bugs)
Version: git-master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Vincent PINON
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-24 10:05 UTC by Antonio Rojas
Modified: 2021-02-14 16:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.04.0
Sentry Crash Report:
fritzibaby: Brainstorm+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2019-03-24 10:05:46 UTC
SUMMARY
Trying to build kdenlive 19.04 beta with external rttr fails. kdenlive is expecting a RTTR::Core_lib cmake target, however upstream rttr only provides a RTTR::Core target.
Comment 1 Vincent PINON 2019-03-24 22:11:10 UTC
From RTTR 0.9.6 CMakeFiles, it appeared that Core_lib target is for static lib, while Core is for dynamic lib. Did you configure rttr to generate static lib too?

It is true that our RTTR integration is for now not yet very packaging-friendly, we are OK to improve the situation...
From your side, would switching to dynamic linking be sufficient?
Comment 2 Antonio Rojas 2019-03-24 22:20:45 UTC
(In reply to Vincent PINON from comment #1)
> From RTTR 0.9.6 CMakeFiles, it appeared that Core_lib target is for static
> lib, while Core is for dynamic lib. Did you configure rttr to generate
> static lib too?

No, it's our distro policy not to ship static libraries

> It is true that our RTTR integration is for now not yet very
> packaging-friendly, we are OK to improve the situation...
> From your side, would switching to dynamic linking be sufficient?

Not sure what you mean here... switching what to dynamic linking?
Comment 3 Christophe Marin 2019-03-29 13:35:25 UTC
> From your side, would switching to dynamic linking be sufficient?

For linux distributions, yes, for Windows you would get the opposite issue, I guess.

something like that should address the problem:
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4d196d18e..b68f31c2c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -139,8 +139,12 @@ target_link_libraries(kdenliveLib
     ${MLTPP_LIBRARIES}
     ${CMAKE_DL_LIBS}
     ${CMAKE_THREAD_LIBS_INIT}
-    kiss_fft
-    RTTR::Core_Lib)
+    kiss_fft)
+if(TARGET RTTR::Core)
+    target_link_libraries(kdenliveLib RTTR::Core)
+else()
+    target_link_libraries(kdenliveLib RTTR::Core_Lib)
+endif()
 
 if(BUILD_COVERAGE)
   target_link_libraries(kdenliveLib gcov)
Comment 4 Christophe Marin 2019-04-07 09:51:30 UTC
Sorry, I didn't notice the typo in Luca's MR. 
https://invent.kde.org/kde/kdenlive/merge_requests/31 fixes the issue.
Comment 5 Julius Künzel 2021-02-14 16:11:40 UTC
Seems to be fixed with https://invent.kde.org/multimedia/kdenlive/-/merge_requests/29 (???)