[SOLVED] ffmpeg issue during compilation on Linux

Post Reply
Mystro256
Junior Member
Posts: 4
Joined: Wed Jan 25, 2012 2:33 pm

[SOLVED] ffmpeg issue during compilation on Linux

Post by Mystro256 »

I was hoping I could get some guidance or direction for compiling vbam 1.8.0.1054 on Linux. It seems to compile to about 26% and fail due to ffmpeg issues.

 

I'm running Fedora 16 and I have a feeling my issue is with the ffmpeg package I have installed from RPMFusion. I just wanted to check here first with someone who would know what the issue is before I make a bug report with RPMFusion.

 

Here's the terminal commands and output from my attempt at compiling:

(note that I have ffmpeg installed an /usr/include/ffmpeg/libavformat/avformat.h exists)

Code: Select all

jeremy@Jeremy-PC vbam-1.8.0.1054$ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DVERSION=1.8.0.1054 -DENABLE_WX=OFF
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/lib64/ccache/gcc
-- Check for working C compiler: /usr/lib64/ccache/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.5")
-- Found PNG: /usr/lib64/libpng.so (found version "1.8.0.1054")
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found OpenGL: /usr/lib64/libGL.so (found version "1.8.0.1054")
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE (found version "1.8.0.1054")
-- checking for module 'gtkmm-2.4'
--   found gtkmm-2.4, version 2.24.2
-- checking for module 'gdkmm-2.4'
--   found gdkmm-2.4, version 2.24.2
-- checking for module 'glibmm-2.4'
--   found glibmm-2.4, version 2.30.0
-- checking for module 'giomm-2.4'
--   found giomm-2.4, version 2.30.0
-- checking for module 'gtkglextmm-x11-1.2'
--   found gtkglextmm-x11-1.2, version 1.2.0
-- checking for modules 'libavcodec;libavformat;libswscale;libavutil'
--   found libavcodec, version 53.8.0
--   found libavformat, version 53.5.0
--   found libswscale, version 2.0.0
--   found libavutil, version 51.9.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jeremy/vbam-1.8.0.1054
jeremy@Jeremy-PC vbam-1.8.0.1054$ make
Scanning dependencies of target fex
[  0%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zAlloc.c.o
[  1%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zBuf.c.o
[  2%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zCrc.c.o
[  3%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zCrcOpt.c.o
[  3%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zDecode.c.o
[  4%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zExtract.c.o
[  5%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zHeader.c.o
[  6%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zIn.c.o
[  7%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zItem.c.o
[  7%] Building C object CMakeFiles/fex.dir/fex/7z_C/7zStream.c.o
[  8%] Building C object CMakeFiles/fex.dir/fex/7z_C/Bcj2.c.o
[  9%] Building C object CMakeFiles/fex.dir/fex/7z_C/Bra.c.o
[ 10%] Building C object CMakeFiles/fex.dir/fex/7z_C/Bra86.c.o
[ 11%] Building C object CMakeFiles/fex.dir/fex/7z_C/CpuArch.c.o
[ 11%] Building C object CMakeFiles/fex.dir/fex/7z_C/LzmaDec.c.o
[ 12%] Building C object CMakeFiles/fex.dir/fex/7z_C/Lzma2Dec.c.o
[ 13%] Building CXX object CMakeFiles/fex.dir/fex/fex/Binary_Extractor.cpp.o
[ 14%] Building CXX object CMakeFiles/fex.dir/fex/fex/blargg_common.cpp.o
[ 15%] Building CXX object CMakeFiles/fex.dir/fex/fex/blargg_errors.cpp.o
[ 15%] Building CXX object CMakeFiles/fex.dir/fex/fex/Data_Reader.cpp.o
[ 16%] Building CXX object CMakeFiles/fex.dir/fex/fex/fex.cpp.o
[ 17%] Building CXX object CMakeFiles/fex.dir/fex/fex/File_Extractor.cpp.o
[ 18%] Building CXX object CMakeFiles/fex.dir/fex/fex/Gzip_Extractor.cpp.o
[ 19%] Building CXX object CMakeFiles/fex.dir/fex/fex/Gzip_Reader.cpp.o
[ 19%] Building CXX object CMakeFiles/fex.dir/fex/fex/Rar_Extractor.cpp.o
[ 20%] Building CXX object CMakeFiles/fex.dir/fex/fex/Zip7_Extractor.cpp.o
[ 21%] Building CXX object CMakeFiles/fex.dir/fex/fex/Zip_Extractor.cpp.o
[ 22%] Building CXX object CMakeFiles/fex.dir/fex/fex/Zlib_Inflater.cpp.o
Linking CXX static library libfex.a
[ 22%] Built target fex
Scanning dependencies of target vbamcore
[ 23%] Building CXX object CMakeFiles/vbamcore.dir/src/Util.cpp.o
[ 23%] Building CXX object CMakeFiles/vbamcore.dir/src/common/Patch.cpp.o
[ 24%] Building C object CMakeFiles/vbamcore.dir/src/common/memgzio.c.o
[ 25%] Building CXX object CMakeFiles/vbamcore.dir/src/common/SoundSDL.cpp.o
[ 26%] Building CXX object CMakeFiles/vbamcore.dir/src/common/ffmpeg.cpp.o
/home/jeremy/vbam-1.8.0.1054/src/common/ffmpeg.cpp:12:34: fatal error: libavformat/avformat.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/vbamcore.dir/src/common/ffmpeg.cpp.o] Error 1
make[1]: *** [CMakeFiles/vbamcore.dir/all] Error 2
make: *** [all] Error 2

 

Thanks in advance!

 

and keep up the good work to the devs for this godly software [img]<fileStore.core_Emoticons>/emoticons/smile.png[/img]/emoticons/smile@2x.png 2x" width="20" height="20" /> haha

Last edited by Mystro256 on Thu Jan 26, 2012 7:04 pm, edited 1 time in total.
Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

[SOLVED] ffmpeg issue during compilation on Linux

Post by Squall Leonhart »

if you set /DENABLE_WX=on

 

does it complete?

Mystro256
Junior Member
Posts: 4
Joined: Wed Jan 25, 2012 2:33 pm

[SOLVED] ffmpeg issue during compilation on Linux

Post by Mystro256 »

No, unfortunately it's the same error [img]<fileStore.core_Emoticons>/emoticons/wacko.png[/img]/emoticons/wacko@2x.png 2x" width="20" height="20" />

 

I should note that it builds fine with 1001, but i remember having the same error with svn1030 when I tried to build it so many months ago

Iconoclast
Member
Posts: 79
Joined: Sun Mar 23, 2008 6:57 pm

[SOLVED] ffmpeg issue during compilation on Linux

Post by Iconoclast »

Well from what I can tell by the MinGW port of GCC, default search paths for header resource includes don't extend beyond the directory you have specified to find /include.

 

So from what I can tell you have three solutions:

<ol style="list-style-type:decimal;">[*]Add something ending with "/usr/include/ffmpeg" to the directories search list.

[*]Remove the compiler directive from FFMPEG.CPP to include , and replace it with either a directive to include or the entirety of that header's contents.

[*]Alter your compiler installation by moving the "/libavformat" folder up one directory, outside of "/ffmpeg".

</ol>

Universal
Junior Member
Posts: 42
Joined: Sun Oct 24, 2010 1:01 pm

[SOLVED] ffmpeg issue during compilation on Linux

Post by Universal »

Well from what I can tell by the MinGW port of GCC, default search paths for header resource includes don't extend beyond the directory you have specified to find /include.

 

So from what I can tell you have three solutions:

<ol style="list-style-type:decimal;">[*]Add something ending with "/usr/include/ffmpeg" to the directories search list.

[*]Remove the compiler directive from FFMPEG.CPP to include , and replace it with either a directive to include or the entirety of that header's contents.

[*]Alter your compiler installation by moving the "/libavformat" folder up one directory, outside of "/ffmpeg".

</ol>

You do the same thing with everything from inside the /usr/include/ffmpeg folder. That's what I did from back on SVN 1055 to compile this on fedora.

 

Iconoclast
Member
Posts: 79
Joined: Sun Mar 23, 2008 6:57 pm

[SOLVED] ffmpeg issue during compilation on Linux

Post by Iconoclast »

That's if you really want to avoid the first option or simply don't find the time to find out how.

 

The need has never arisen for me to try it, but the natural solution is to specify search directories in the compiler commands script. This way, you don't need to interfere with your installation or the original VBA-M source files. If you find differences between the compiler resource setups for Microsoft Visual Studio and the GCC, they could both be correct for various reasons and not need modifications to their structure or your source code.

Mystro256
Junior Member
Posts: 4
Joined: Wed Jan 25, 2012 2:33 pm

[SOLVED] ffmpeg issue during compilation on Linux

Post by Mystro256 »

Well from what I can tell by the MinGW port of GCC, default search paths for header resource includes don't extend beyond the directory you have specified to find /include.

 

So from what I can tell you have three solutions:

<ol style="list-style-type:decimal;">[*]Add something ending with "/usr/include/ffmpeg" to the directories search list.

[*]Remove the compiler directive from FFMPEG.CPP to include , and replace it with either a directive to include or the entirety of that header's contents.

[*]Alter your compiler installation by moving the "/libavformat" folder up one directory, outside of "/ffmpeg".

</ol>

 

Thanks for your help!

 

Seems adding the path in CPATH before compiling worked just fine:

Code: Select all

export CPATH='/usr/include/ffmpeg'
cmake ....

 

Iconoclast
Member
Posts: 79
Joined: Sun Mar 23, 2008 6:57 pm

[SOLVED] ffmpeg issue during compilation on Linux

Post by Iconoclast »

Hah. Seriously, squall. /DENABLE_WX=on? For a file not found error? What were you thinking? [img]<fileStore.core_Emoticons>/emoticons/tongue.png[/img]/emoticons/tongue@2x.png 2x" width="20" height="20" />

 

But my various emulation algorithms research using MinGW is the only reason I've become familiarized with GCC to happen to know about this, so it's good to know Universal would have stepped in if I hadn't.

Post Reply