Emulator Issues #5266
closedCompile Fails on Debian Wheezy due to missing libav mathematics.h header file.
0%
Description
When compiling on Debian Wheezy (Linux AMD64) I encounter the error below during the compile:
error: ‘av_rescale_q’ was not declared in this scope
I found that the issue is a missing mathematics.h header in '/home/kazuma/compile/dolphin-emu/new/dolphin-emu/Source/Core/VideoCommon/Src/AVIDump.cpp'. Adding the line below allows it to compile correctly.
#include <libavutil/mathematics.h>
This is critical to me as many games are very slow to play without frame skipping and I seem to need libav in order for frame skipping to work.
It mentions in the template to not attach patches here. I have made a patch that fixes the issue I will upload to my minus account. Here is the link to the patch:
http://min.us/mboTPJIzZd
I hope this is of use I do not know how to use git/subversion etc to make a proper request for a patch. Thank you for all the hard work!
Samuel Orr - uraharakisuke153@gmail.com
Updated by adcassagne over 12 years ago
I have the same problem on Debian Wheezy (Linux AMD64).
Updated by UraharaKisuke153 over 12 years ago
The only common factor I can think of is that both Debian and Ubuntu have moved to the libav fork of ffmpeg. (At least I think so). Does my patch fix it for either of you?
Updated by JordiComa22 over 12 years ago
For this compiles, but not linkes (linux ubuntu 12.04).
../VideoCommon/libvideocommon.a(AVIDump.cpp.o): In function AVIDump::AddFrame(unsigned char*, int, int)': AVIDump.cpp:(.text+0xef): undefined reference to
av_rescale_q(long, AVRational, AVRational)'
collect2: ld returned 1 exit status
Updated by UraharaKisuke153 over 12 years ago
I wonder if I should report a bug against libav in Debian even though the upstream fix is simple. As this compiles against the ffmpeg in OpenSUSE 12.1 and the older ffmpeg in Debian 6.
Glad the fix works, I am not much of a coder so I had to dig around searching for avutils stuff. :P Thanks for testing it.
Updated by synergism over 12 years ago
Is there any reason not to apply this patch immediately? libavutil/mathematics.h has been present in ffmpeg (and consequently now libav) since time eternal, so I don't see that it would break builds on systems not using libav:
Updated by glennricster over 12 years ago
What version of libav do you have? With the version of libav that I have mathematics.h is included by libavutil.h, and that is included by libavcodec.h. So the inclusion is redundant.
Updated by UraharaKisuke153 over 12 years ago
Ffmpeg/libav in Wheezy is currently: 0.8-2. http://packages.debian.org/wheezy/ffmpeg
Updated by supermariolinux over 12 years ago
where is the patch you guys mentioned? i got the latest source from git and i am experiencing the error:
../VideoCommon/libvideocommon.a(AVIDump.cpp.o): In function AVIDump::AddFrame(unsigned char*, int, int)': AVIDump.cpp:(.text+0xef): undefined reference to
av_rescale_q(long, AVRational, AVRational)'
collect2: ld returned 1 exit status
make[2]: *** [Binaries/dolphin-emu] Error 1
make[1]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/all] Error 2
make: *** [all] Error 2
i would imangine a patch from march would be part of the full source now, right?
seriously guys help me, or tell me how to disable libav support.
Updated by eunbolt over 12 years ago
It's also not working for me I'm on ubuntu 12.04 64bit
Updated by pauldacheez over 12 years ago
eunb, we know it doesn't compile. If you want it to compile, go follow the instructions on Issue 5392.
Updated by skidau over 12 years ago
Issue 5392 has been merged into this issue.
Updated by delroth over 12 years ago
- Status changed from New to Fixed
This issue was closed by revision beb4204bbbd4.