Closed unelsson closed 1 year ago
I also got the following FindOpenSceneGraph errors when compiling OpenMW. This also has worked in the past.
CMake Warning at /usr/share/cmake/Modules/FindOpenSceneGraph.cmake:171 (message):
[ FindOpenSceneGraph.cmake:171 ] Failed to parse version number, please
report this as a bug
Call Stack (most recent call first):
CMakeLists.txt:410 (find_package)
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSceneGraph: Found unsuitable version "..", but required
is at least "3.6.5"
edit: cmake version 3.25.1. This has worked in the past, so it may be related to some cmake changes. edit 2: This was an user error: Related to old data in CMakeCache.txt, solved by deleting the file and running cmake again.
ffmpeg-related build errors
In file included from /.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp:10,
from /.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:1:
/.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegPacket.hpp: In member function ‘void osgFFmpeg::FFmpegPacket::clear()’:
/.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegPacket.hpp:45:17: error: ‘av_free_packet’ was not declared in this scope; did you mean ‘av_new_packet’?
45 | av_free_packet(&packet);
| ^~~~~~~~~~~~~~
| av_new_packet
/.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp: In function ‘int osgFFmpeg::decode_audio(AVCodecContext*, int16_t*, int*, const uint8_t*, int, SwrContext*, int, int, AVSampleFormat)’:
/.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:48:11: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
48 | ret = avcodec_decode_audio4(avctx, frame, &got_frame, &avpkt);
| ^~~~~~~~~~~~~~~~~~~~~
| avcodec_decode_subtitle2
/.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:53:34: error: ‘av_frame_get_channels’ was not declared in this scope; did you mean ‘av_frame_get_buffer’?
53 | if (ret >= 0 && got_frame && av_frame_get_channels(frame)>0) {
| ^~~~~~~~~~~~~~~~~~~~~
| av_frame_get_buffer
/.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp: In member function ‘void osgFFmpeg::FFmpegDecoderAudio::open(AVStream*, osgFFmpeg::FFmpegParameters*)’:
/.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:154:29: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
154 | m_context = stream->codec;
| ^~~~~
/.../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:217:55: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
217 | AVCodec * const p_codec = avcodec_find_decoder(m_context->codec_id);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
| |
| const AVCodec*
Turns out these are duplicates or non-issues. Closing.
As of 2.1.2023 there are compilation and performance issues on Linux Manjaro (Arch-based distro).
First, I got ffmpeg error about missing
av_free_packet
and some other similar ffmpeg-related errors. I believe there are commands that are not any more supported by new ffmpeg versions. I used cmake options from AUR PKGBUILD for testing, and for some reason didn't get this with later builds even when trying to compile with ffmpeg. edit: DUPLICATE of https://github.com/openscenegraph/OpenSceneGraph/issues/1111There's a warning about policy
[CMP0072](https://cmake.org/cmake/help/latest/policy/CMP0072.html)
, related to OpenGL version settings.cmake_policy(SET CMP0072 OLD)
is the default, so adding that in CMakeLists.txt compiles. However,cmake_policy(SET CMP0072 NEW)
fails to build with variousld
OpenGL linking errors, such as:/usr/bin/ld: ../../lib/libosgUtil.so.3.6.5: undefined reference to
glClearDepth'. Linking errors can be fixed by adding
add_link_options("-lGL")` to CMakeLists.txt.Still, testing with OpenMW 0.48 branch, there are some performance issues that may be related to how OSG compiles on newer Manjaro with settings mentioned above. I've had much better performance in the past. edit: This was caused by wrong build settings, therefore it's not OSG issue.