Project

General

Profile

Actions

Emulator Issues #5266

closed

Compile Fails on Debian Wheezy due to missing libav mathematics.h header file.

Added by UraharaKisuke153 over 12 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

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 -


Related issues 2 (0 open2 closed)

Has duplicate Emulator - Emulator Issues #5273: AVIDump not compile in Linux Ubuntu 12.04Duplicate

Actions
Has duplicate Emulator - Emulator Issues #5392: undefined refrence, ubuntu 12.04Duplicate

Actions
Actions #1

Updated by adcassagne over 12 years ago

I have the same problem on Debian Wheezy (Linux AMD64).

Actions #2

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?

Actions #3

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

Actions #4

Updated by JordiComa22 over 12 years ago

Solved with the patch.

Actions #5

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.

Actions #6

Updated by skidau over 12 years ago

Issue 5273 has been merged into this issue.

Actions #7

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:

http://git.videolan.org/?p=ffmpeg.git;a=history;f=libavutil/mathematics.h;h=93314bae16a08a8d7ea492481be9bd4869f7a99d;hb=HEAD

Actions #8

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.

Actions #9

Updated by UraharaKisuke153 over 12 years ago

Ffmpeg/libav in Wheezy is currently: 0.8-2. http://packages.debian.org/wheezy/ffmpeg

Actions #10

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.

Actions #11

Updated by eunbolt over 12 years ago

It's also not working for me I'm on ubuntu 12.04 64bit

Actions #12

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.

Actions #13

Updated by skidau over 12 years ago

Issue 5392 has been merged into this issue.

Actions #14

Updated by delroth over 12 years ago

  • Status changed from New to Fixed

This issue was closed by revision beb4204bbbd4.

Actions

Also available in: Atom PDF