olive-editor / olive

Free open-source non-linear video editor
https://olivevideoeditor.org/
GNU General Public License v3.0
8.16k stars 554 forks source link

[BUILD] Fails to build with opentimelineio-0.15 #2201

Closed yurivict closed 1 year ago

yurivict commented 1 year ago

Commit Hash 8ca1672

Platform FreeBSD 13.1

Summary

ld: error: undefined symbol: opentimelineio::v1_0::Timeline::Timeline(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<opentime::v1_0::RationalTime>, opentimelineio::v1_0::AnyDictionary const&)
>>> referenced by saveotio.cpp
>>>               app/CMakeFiles/libolive-editor.dir/task/project/saveotio/saveotio.cpp.o:(olive::SaveOTIOTask::SerializeTimeline(olive::Sequence*))

ld: error: undefined symbol: opentimelineio::v1_0::Track::Track(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<opentime::v1_0::TimeRange> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, opentimelineio::v1_0::AnyDictionary const&)
>>> referenced by saveotio.cpp
>>>               app/CMakeFiles/libolive-editor.dir/task/project/saveotio/saveotio.cpp.o:(olive::SaveOTIOTask::SerializeTrack(olive::Track*, double, olive::core::rational))

ld: error: undefined symbol: opentimelineio::v1_0::Clip::Clip(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, opentimelineio::v1_0::MediaReference*, std::__1::optional<opentime::v1_0::TimeRange> const&, opentimelineio::v1_0::AnyDictionary const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>> referenced by saveotio.cpp
>>>               app/CMakeFiles/libolive-editor.dir/task/project/saveotio/saveotio.cpp.o:(olive::SaveOTIOTask::SerializeTrack(olive::Track*, double, olive::core::rational))

ld: error: undefined symbol: opentimelineio::v1_0::ExternalReference::ExternalReference(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<opentime::v1_0::TimeRange> const&, opentimelineio::v1_0::AnyDictionary const&, std::__1::optional<Imath_3_1::Box<Imath_3_1::Vec2<double> > > const&)
>>> referenced by saveotio.cpp
>>>               app/CMakeFiles/libolive-editor.dir/task/project/saveotio/saveotio.cpp.o:(olive::SaveOTIOTask::SerializeTrack(olive::Track*, double, olive::core::rational))
c++: error: linker command failed with exit code 1 (use -v to see invocation)
yurivict commented 1 year ago

Why?

parona-source commented 1 year ago

The issue is probably opentimelineio being built as cxx11, basic_string which is used in its interfaces was changed in cxx17 and as olive is built as cxx17 it then needs opentimelineio to also be built as it.

Building opentimelineio as cxx17 might also be problematic if you have something else that requires opentimelineio but is built as cxx11.

itsmattkc commented 1 year ago

This is correct actually. We use OTIO 0.15 without problems on our CI, but since Olive uses C++17, OTIO must also be compiled as C++17 (configured with CMake flag -DCMAKE_CXX_STANDARD=17) to prevent conflicts.