olive-editor / olive

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

[BUILD] Cannot build on Arch #2027

Closed gnolooo closed 2 years ago

gnolooo commented 2 years ago

Commit Hash 8b350bad

Platform Arch Linux

Summary Cannot build in Arch Linux. At first, I was having some problems while creating build files with CMake,related to the OpenTimelineIO package I installed from the community repo (basically it was missing some dependencies so it was throwing errors - Couldn't find OpenTimelineIO). Uninstalling it and building OTIO from source worked and I can create the build files and build the app, but in the last step it fails. This is the output it gives:

/usr/bin/ld: CMakeFiles/libolive-editor.dir/render/framehashcache.cpp.o: in function `olive::FrameHashCache::SaveCacheFrame(QString const&, std::shared_ptr<olive::Frame>)':
/home/gnolooo/olive/app/render/framehashcache.cpp:278: undefined reference to `Imf_3_1::Header::Header(int, int, float, Imath_3_2::Vec2<float> const&, float, Imf_3_1::LineOrder, Imf_3_1::Compression)'
/usr/bin/ld: CMakeFiles/libolive-editor.dir/task/project/saveotio/saveotio.cpp.o: in function `olive::SaveOTIOTask::SerializeTrack(olive::Track*, double, olive::rational)':
/home/gnolooo/olive/app/task/project/saveotio/saveotio.cpp:121: undefined reference to `opentimelineio::v1_0::Track::Track(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::optional<opentime::v1_0::TimeRange> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, opentimelineio::v1_0::AnyDictionary const&)'
/usr/bin/ld: /home/gnolooo/olive/app/task/project/saveotio/saveotio.cpp:141: undefined reference to `opentimelineio::v1_0::Clip::Clip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, opentimelineio::v1_0::MediaReference*, std::optional<opentime::v1_0::TimeRange> const&, opentimelineio::v1_0::AnyDictionary const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /home/gnolooo/olive/app/task/project/saveotio/saveotio.cpp:162: undefined reference to `opentimelineio::v1_0::ExternalReference::ExternalReference(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::optional<opentime::v1_0::TimeRange> const&, opentimelineio::v1_0::AnyDictionary const&, std::optional<Imath_3_2::Box<Imath_3_2::Vec2<double> > > const&)'
/usr/bin/ld: CMakeFiles/libolive-editor.dir/task/project/saveotio/saveotio.cpp.o: in function `olive::SaveOTIOTask::SerializeTimeline(olive::Sequence*)':
/home/gnolooo/olive/app/task/project/saveotio/saveotio.cpp:99: undefined reference to `opentimelineio::v1_0::Timeline::Timeline(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::optional<opentime::v1_0::RationalTime>, opentimelineio::v1_0::AnyDictionary const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [app/CMakeFiles/olive-editor.dir/build.make:875: app/olive-editor] Errore 1
make[1]: *** [CMakeFiles/Makefile2:3497: app/CMakeFiles/olive-editor.dir/all] Errore 2
make: *** [Makefile:136: all] Errore 2
Simran-B commented 2 years ago

The linker can't find some of the symbols, so there is still a problem with the dependencies. Possible causes include wrong / unsupported versions of the external libraries, missing transitive dependencies, and not properly built dependencies (did you only build OpenTimelineIO or also install it to some place? This is required for certain libraries because the file layout of the build folder doesn't necessarily match the expected layout for using them, e.g. because of relative imports).

gnolooo commented 2 years ago

I built and installed them, I followed this procedure found in the official documentation: https://opentimelineio.readthedocs.io/en/latest/tutorials/quickstart.html#linux-mac. Also I don't think my problem is related to other libraries given that OTIO was the only one that gave me problems and error outputs both during preparation and building.

itsmattkc commented 2 years ago

OpenTimelineIO is an optional dependency, if you don't need it and it's causing issues, you can leave it out.

If you do want OTIO support, make sure you're compiling a "stable" tag like v0.14.1 rather than master. We only test with tagged releases.

Simran-B commented 2 years ago

The first error from framehashcache.cpp is unrelated to OTIO. It's caused by OpenEXR. The problem might be its Imath dependency. Did you let OpenEXR compile Imath or did you compile it separately or obtain a pre-built package? Anyway, it could be a version mismatch between Imf and Imath (3.1 vs 3.2). You should try matching versions of the releases (latest is 3.1.5 for both).

One of the errors from saveotio.cpp might also be caused by a problem with Imath, the other possibly by the any (AnyDictionary) dependency. The latter sounds familiar. You need to compile OTIO with C++17 support, (-DCMAKE_CXX_STANDARD=17 in the call to CMake to configure the OTIO build). This might also solve the other issues, not sure.

doojonio commented 1 year ago

If anyone will ever face this problem... I had this problem and solved it few seconds ago by compiling opentimelineio just like there (using these configuration arguments)