Jump to content
Visual Boy Advance-M
Mystro256

[SOLVED] ffmpeg issue during compilation on Linux

Recommended Posts

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)

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 :) haha

Share this post


Link to post
Share on other sites

No, unfortunately it's the same error :S

 

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

Share this post


Link to post
Share on other sites

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:

  1. Add something ending with "/usr/include/ffmpeg" to the directories search list.
  2. 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.
  3. Alter your compiler installation by moving the "/libavformat" folder up one directory, outside of "/ffmpeg".

Share this post


Link to post
Share on other sites

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:

  1. Add something ending with "/usr/include/ffmpeg" to the directories search list.
  2. 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.
  3. Alter your compiler installation by moving the "/libavformat" folder up one directory, outside of "/ffmpeg".

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.

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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:

  1. Add something ending with "/usr/include/ffmpeg" to the directories search list.
  2. 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.
  3. Alter your compiler installation by moving the "/libavformat" folder up one directory, outside of "/ffmpeg".

 

Thanks for your help!

 

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

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

 

Share this post


Link to post
Share on other sites

Hah. Seriously, squall. /DENABLE_WX=on? For a file not found error? What were you thinking? :P

 

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×