scottdraves / electricsheep

infinite evolving crowdsourced artwork
http://electricsheep.org
561 stars 70 forks source link

Compile Time Errors #29

Open beadon opened 9 years ago

beadon commented 9 years ago

I'm having a problem compiling with the latest clone, rather than fix it all up myself, this may be indicative of a larger issue, jump to the end for make errors :


theorem@topgun:~/build/electricsheep/client_generic$ uname -na
Linux topgun 3.11.0-26-generic #45-Ubuntu SMP Tue Jul 15 04:02:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

theorem@topgun:~/build$ git clone https://github.com/scottdraves/electricsheep.git
Cloning into 'electricsheep'...
remote: Counting objects: 5190, done.
remote: Total 5190 (delta 0), reused 0 (delta 0), pack-reused 5190
Receiving objects: 100% (5190/5190), 50.58 MiB | 32.56 MiB/s, done.
Resolving deltas: 100% (2999/2999), done.
Checking connectivity... done
theorem@topgun:~/build$ cd electricsheep/

theorem@topgun:~/build/electricsheep$ cd client_generic/

theorem@topgun:~/build/electricsheep/client_generic$ ./autogen.sh 
Preparing the electricsheep build system...please wait

Found GNU Autoconf version 2.69
Found GNU Automake version 1.13.3
Found GNU Libtool version 2.4.2

Automatically preparing build ... Warning: autoreconf failed
Attempting to run the preparation steps individually

Preparing build ... done

The electricsheep build system is now prepared.  To build here, run:
  ./configure
  make
theorem@topgun:~/build/electricsheep/client_generic$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for ANSI C header files... (cached) yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking dependency style of gcc... gcc3
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for cc_r... gcc
O/S is GNU/Linux
checking for pkg-config... /usr/bin/pkg-config
checking for wx-config-2.9... no
checking for wx-config... /usr/bin/wx-config
WX_CXXFLAGS is -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0-unofficial -I/usr/include/wx-3.0-unofficial -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
WX_LIBS is -static -L/usr/lib/x86_64-linux-gnu -pthread   -lwx_gtk2u_unofficial_xrc-3.0 -lwx_gtk2u_unofficial_webview-3.0 -lwx_gtk2u_unofficial_html-3.0 -lwx_gtk2u_unofficial_qa-3.0 -lwx_gtk2u_unofficial_adv-3.0 -lwx_gtk2u_unofficial_core-3.0 -lwx_baseu_unofficial_xml-3.0 -lwx_baseu_unofficial_net-3.0 -lwx_baseu_unofficial-3.0  -L/usr/lib/x86_64-linux-gnu -pthread   -lwx_gtk2u_unofficial_richtext-3.0 -lwx_baseu_unofficial-3.0 
checking pkg-config is at least version 0.9.0... yes
checking for AVCODEC... yes
checking for avcodec_decode_video2 in -lavcodec... yes
checking for AVFORMAT... yes
checking for av_open_input_file in -lavformat... yes
checking for SWSCALE... yes
checking for AVUTIL... yes
checking for LUA... yes
checking for GLEE... yes
checking for CURL... yes
checking for PNG... yes
checking for XRENDER... yes
checking for flam3-animate... /usr/local/bin/flam3-animate
checking for LIBGTOP... yes
checking for libboost >= 1.39... yes
checking boost/thread.hpp usability... yes
checking boost/thread.hpp presence... yes
checking for boost/thread.hpp... yes
checking for main in -lboost_thread... yes
checking boost/filesystem.hpp usability... yes
checking boost/filesystem.hpp presence... yes
checking for boost/filesystem.hpp... yes
checking for main in -lboost_filesystem... yes
checking boost/system/config.hpp usability... yes
checking boost/system/config.hpp presence... yes
checking for boost/system/config.hpp... yes
checking for main in -lboost_system... yes
checking for main in -ltinyxml... yes
checking for glutMainLoop in -lglut... yes
checking for glXCreateNewContext in -lGL... yes
checking for clock_gettime in -lrt... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Client/Makefile
config.status: creating MSVC/SettingsGUI/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
theorem@topgun:~/build/electricsheep/client_generic$ make
Making all in Client
make[1]: Entering directory `/home/theorem/build/electricsheep/client_generic/Client'
g++ -DPACKAGE_NAME=\"electricsheep\" -DPACKAGE_TARNAME=\"electricsheep\" -DPACKAGE_VERSION=\"2.7b33-svn\" -DPACKAGE_STRING=\"electricsheep\ 2.7b33-svn\" -DPACKAGE_BUGREPORT=\"http://code.google.com/p/electricsheep/issues/list\" -DPACKAGE_URL=\"\" -DPACKAGE=\"electricsheep\" -DVERSION=\"2.7b33-svn\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DUSE_OLD_FFMPEG_API=1 -DHAVE_LIBBOOST_THREAD=1 -DHAVE_LIBBOOST_FILESYSTEM=1 -DHAVE_LIBBOOST_SYSTEM=1 -DHAVE_LIBTINYXML=1 -DHAVE_LIBGLUT=1 -DHAVE_LIBGL=1 -DHAVE_LIBRT=1 -I.  -DPACKAGE_DATA_DIR=\""/usr/local/share"\" -DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\" -I .. -iquote ../DisplayOutput/OpenGL -I ../Common -I ../DisplayOutput -I ../DisplayOutput/Renderer -I ../Common/Math -I ../ContentDecoder -I ../TupleStorage -I ../ContentDownloader -I ../lua5.1/src -I ../Client -I ../Networking -I ../tinyXml  -DLINUX_GNU=1 -DSHAREDIR=\"/usr/local/share/electricsheep/\"     -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libgtop-2.0   -I/usr/include/lua5.1      -I/usr/include/libpng12   -I/usr/include/lua5.1     -lrt -lz -lGL -D__STDC_CONSTANT_MACROS -Wno-write-strings -DHAVE_AVC_VID2=1 -g -O2 -MT Player.o -MD -MP -MF .deps/Player.Tpo -c -o Player.o Player.cpp
In file included from ../ContentDecoder/ContentDecoder.h:46:0,
                 from Player.h:11,
                 from Player.cpp:37:
../ContentDecoder/Frame.h: In destructor ‘virtual ContentDecoder::CVideoFrame::~CVideoFrame()’:
../ContentDecoder/Frame.h:120:36: error: ‘avcodec_free_frame’ was not declared in this scope
      avcodec_free_frame( &m_pFrame );
                                    ^
In file included from Player.h:11:0,
                 from Player.cpp:37:
../ContentDecoder/ContentDecoder.h: In destructor ‘virtual ContentDecoder::sOpenVideoInfo::~sOpenVideoInfo()’:
../ContentDecoder/ContentDecoder.h:110:4: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
    av_close_input_file( m_pFormatContext );
    ^
../ContentDecoder/ContentDecoder.h:110:42: warning: ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
    av_close_input_file( m_pFormatContext );
                                          ^
../ContentDecoder/ContentDecoder.h:120:34: error: ‘avcodec_free_frame’ was not declared in this scope
    avcodec_free_frame( &m_pFrame );
                                  ^
In file included from Player.h:14:0,
                 from Player.cpp:37:
FrameDisplay.h: At global scope:
FrameDisplay.h:32:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
     const fp8 TEX_MOVE_SECS = 60.f * 30.f; //30 minutes
                                      ^
make[1]: *** [Player.o] Error 1
make[1]: Leaving directory `/home/theorem/build/electricsheep/client_generic/Client'
make: *** [all-recursive] Error 1
dasvo commented 9 years ago

Looks like the condition for setting USE_NEW_FFMPEG_ALLOC_API at the top of ContentDecoder/Frame.h doesn't work correctly for you. Can you check why?

beadon commented 9 years ago

Not sure what I'm looking for exactly ...


 31 #if defined(LIBAVCODEC_VERSION_INT) && (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1))
 32 #define USE_NEW_FFMPEG_ALLOC_API
 33 #endif
 34 
 35 #ifdef MAC
 36 #define USE_NEW_FFMPEG_API
 37 #endif
 38 

It looks like the function for AV_VERSION_INT is only present in the OSX section ??


theorem@topgun:~/build/electricsheep/client_generic/ContentDecoder$ grep -r "AV_VERSION_INT" ../*
../ContentDecoder/Frame.h:#if defined(LIBAVCODEC_VERSION_INT) && (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1))
../ffmpeg/osx/include/libavdevice/version.h:#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
../ffmpeg/osx/include/libavutil/version.h:#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
../ffmpeg/osx/include/libavutil/version.h:#define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
../ffmpeg/osx/include/libswscale/version.h:#define LIBSWSCALE_VERSION_INT  AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
../ffmpeg/osx/include/libavformat/version.h:#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
../ffmpeg/osx/include/libavcodec/version.h:#define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \

I am building for Ubuntu 13.10.

scottdraves commented 9 years ago

What versions of libav do you have?

beadon commented 9 years ago

Here


theorem@topgun:~/build/electricsheep/client_generic/ContentDecoder$ apt-show-versions | grep libav
gstreamer1.0-libav:amd64/saucy 1.0.10-1ubuntu1 uptodate
libav-tools:amd64/saucy-security 6:0.8.13-0ubuntu0.13.10.1 uptodate
libavahi-client3:amd64/saucy-updates 0.6.31-2ubuntu4.1 uptodate
libavahi-client3:i386/saucy-updates 0.6.31-2ubuntu4.1 uptodate
libavahi-common-data:amd64/saucy-updates 0.6.31-2ubuntu4.1 uptodate
libavahi-common-data:i386/saucy-updates 0.6.31-2ubuntu4.1 uptodate
libavahi-common3:amd64/saucy-updates 0.6.31-2ubuntu4.1 uptodate
libavahi-common3:i386/saucy-updates 0.6.31-2ubuntu4.1 uptodate
libavahi-core7:amd64/saucy-updates 0.6.31-2ubuntu4.1 uptodate
libavahi-glib1:amd64/saucy-updates 0.6.31-2ubuntu4.1 uptodate
libavahi-gobject0:amd64/saucy-updates 0.6.31-2ubuntu4.1 uptodate
libavc1394-0:amd64/saucy 0.5.4-2 uptodate
libavcodec-dev:amd64/saucy-security 6:0.8.13-0ubuntu0.13.10.1 uptodate
libavcodec-extra-53:amd64/saucy-security 6:0.8.13ubuntu0.13.10.1 uptodate
libavdevice53:amd64/saucy-security 6:0.8.13-0ubuntu0.13.10.1 uptodate
libavfilter2:amd64/saucy-security 6:0.8.13-0ubuntu0.13.10.1 uptodate
libavformat-dev:amd64/saucy-security 6:0.8.13-0ubuntu0.13.10.1 uptodate
libavformat53:amd64/saucy-security 6:0.8.13-0ubuntu0.13.10.1 uptodate
libavutil-dev:amd64/saucy-security 6:0.8.13-0ubuntu0.13.10.1 uptodate
libavutil-extra-51:amd64/saucy-security 6:0.8.13ubuntu0.13.10.1 uptodate
dasvo commented 9 years ago

the /ffmpeg/osx/include/ directory inside the project contains only headers to be used on OS X (there is no ffmpeg in the system). On ubuntu you need to look through headers where they are installed by apt-get. You should not use header from the electric sheep folder. That is the reason why they are in "osx" subfolder. As for the version I think we use ffmpeg at version 2.1. But we should be backward compatible, I am just not sure until which version. You would need to investigate.

beadon commented 9 years ago

I'm a little fuzzy on what you're asking me to do here...

rr- commented 8 years ago

Similar problems, different classes. (undeclared PixelFormat etc.) ffmpeg is at version 2.8.6-1.

tiborh commented 8 years ago

Same problem here. Ubuntu version: Ubuntu 15.10.1 ffmpeg -version (The one that comes with Ubuntu): FFmpeg version 7:2.7.6-0ubuntu0.15.10.1, Copyright (c) 2000-2010 Fabrice Bellard, et al. built on Mar 2 2016 03:06:13 with gcc 5.2.1 20151010 configuration: libavutil 50. 7. 0 / 50. 7. 0 libavcodec 52.45. 0 / 52.45. 0 libavformat 52.46. 0 / 52.46. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 2 / 0. 7. 2 Link to config log

$ make Making all in Client make[1]: Entering directory '/home/tibor/repos/electricsheep/client_generic/Client' g++ -DPACKAGE_NAME=\"electricsheep\" -DPACKAGE_TARNAME=\"electricsheep\" -DPACKAGE_VERSION=\"2.7b33-svn\" -DPACKAGE_STRING=\"electricsheep\ 2.7b33-svn\" -DPACKAGE_BUGREPORT=\"http://code.google.com/p/electricsheep/issues/list\" -DPACKAGE_URL=\"\" -DPACKAGE=\"electricsheep\" -DVERSION=\"2.7b33-svn\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DEXTENSIONS=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DUSE_NEW_FFMPEG_API=1 -DHAVE_LIBBOOST_THREAD=1 -DHAVE_LIBBOOST_FILESYSTEM=1 -DHAVE_LIBBOOST_SYSTEM=1 -DHAVE_LIBTINYXML=1 -DHAVE_LIBGLUT=1 -DHAVE_LIBGL=1 -DHAVE_LIBRT=1 -I. -DPACKAGE_DATA_DIR=\""/usr/local/share"\" -DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\" -I .. -iquote ../DisplayOutput/OpenGL -I ../Common -I ../DisplayOutput -I ../DisplayOutput/Renderer -I ../Common/Math -I ../ContentDecoder -I ../TupleStorage -I ../ContentDownloader -I ../lua5.1/src -I ../Client -I ../Networking -I ../tinyXml -DLINUX_GNU=1 -DSHAREDIR=\"/usr/local/share/electricsheep/\" -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libgtop-2.0 -I/usr/include/lua5.1 -I/usr/include/libpng12 -I/usr/include/lua5.1 -lrt -lz -lGL -D__STDC_CONSTANT_MACROS -Wno-write-strings -DHAVE_AVC_VID2=1 -g -O2 -MT Player.o -MD -MP -MF .deps/Player.Tpo -c -o Player.o Player.cpp In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h: In destructor ‘virtual ContentDecoder::CVideoFrame::~CVideoFrame()’: ../ContentDecoder/Frame.h:120:36: error: ‘avcodec_free_frame’ was not declared in this scope avcodec_free_frame( &m_pFrame ); ^ In file included from Player.h:11:0, from Player.cpp:37: ../ContentDecoder/ContentDecoder.h: In destructor ‘virtual ContentDecoder::sOpenVideoInfo::~sOpenVideoInfo()’: ../ContentDecoder/ContentDecoder.h:108:44: error: ‘avformat_close_input’ was not declared in this scope avformat_close_input( &m_pFormatContext ); ^ ../ContentDecoder/ContentDecoder.h:120:34: error: ‘avcodec_free_frame’ was not declared in this scope avcodec_free_frame( &m_pFrame ); ^ In file included from Player.h:14:0, from Player.cpp:37: FrameDisplay.h: At global scope: FrameDisplay.h:32:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 const fp8 TEX_MOVE_SECS = 60.f * 30.f; //30 minutes ^ Makefile:630: recipe for target 'Player.o' failed make[1]: * [Player.o] Error 1 make[1]: Leaving directory '/home/tibor/repos/electricsheep/client_generic/Client' Makefile:511: recipe for target 'all-recursive' failed make: * [all-recursive] Error 1

tiborh commented 8 years ago

No change in Ubuntu 16.04 LTS either.

ffmpeg -version FFmpeg version UNKNOWN, Copyright (c) 2000-2010 Fabrice Bellard, et al. built on Mar 2 2016 03:06:13 with gcc 5.2.1 20151010 configuration: libavutil 50. 7. 0 / 50. 7. 0 libavcodec 52.45. 0 / 52.45. 0 libavformat 52.46. 0 / 52.46. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 2 / 0. 7. 2 FFmpeg UNKNOWN libavutil 50. 7. 0 / 50. 7. 0 libavcodec 52.45. 0 / 52.45. 0 libavformat 52.46. 0 / 52.46. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 2 / 0. 7. 2

if you add the full path to the ffmpeg headers (inserting the x86_64 part) in Frame.h, then the build goes on a little further but fails the same:

Player.o: In function ContentDecoder::CVideoFrame::~CVideoFrame()': /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/Frame.h:122: undefined reference toav_frame_free' Player.o: In function ContentDecoder::CVideoFrame::~CVideoFrame()': /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/Frame.h:122: undefined reference toav_frame_free' Player.o: In function ContentDecoder::CVideoFrame::~CVideoFrame()': /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/Frame.h:122: undefined reference toav_frame_free' ContentDecoder.o: In function ContentDecoder::CContentDecoder::Open(ContentDecoder::sOpenVideoInfo*)': /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/ContentDecoder.cpp:160: undefined reference toavformat_open_input' /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/ContentDecoder.cpp:170: undefined reference to avformat_find_stream_info' /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/ContentDecoder.cpp:222: undefined reference toavcodec_open2' /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/ContentDecoder.cpp:232: undefined reference to av_frame_alloc' ContentDecoder.o: In functionContentDecoder::CVideoFrame::CVideoFrame(AVCodecContext_, AVPixelFormat, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)': /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/Frame.h:103: undefined reference to av_frame_alloc' ContentDecoder.o: In functionContentDecoder::CContentDecoder::ReadOneFrame(ContentDecoder::sOpenVideoInfo_)': /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/ContentDecoder.cpp:647: undefined reference to av_frame_unref' ContentDecoder.o: In functionContentDecoder::CVideoFrame::~CVideoFrame()': /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/Frame.h:122: undefined reference to av_frame_free' ContentDecoder.o: In functionContentDecoder::sOpenVideoInfo::~sOpenVideoInfo()': /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/ContentDecoder.h:108: undefined reference to avformat_close_input' /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/ContentDecoder.h:118: undefined reference toav_frame_free' ContentDecoder.o: In function ContentDecoder::sOpenVideoInfo::~sOpenVideoInfo()': /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/ContentDecoder.h:108: undefined reference toavformat_close_input' /home/tibor/repos/electricsheep/client_generic/Client/../ContentDecoder/ContentDecoder.h:118: undefined reference to `av_frame_free' collect2: error: ld returned 1 exit status Makefile:537: recipe for target 'electricsheep' failed make[1]: * [electricsheep] Error 1 make[1]: Leaving directory '/home/tibor/repos/electricsheep/client_generic/Client' Makefile:511: recipe for target 'all-recursive' failed make: * [all-recursive] Error 1

tiborh commented 8 years ago

After downloading and compiling latest ffmpeg, the error changes again (previous alterations have been removed):

ffmpeg -version ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2) 20160413 configuration: libavutil 55. 17.103 / 55. 17.103 libavcodec 57. 24.102 / 57. 24.102 libavformat 57. 25.100 / 57. 25.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 31.100 / 6. 31.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101

In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:78:48: error: ‘PixelFormat’ has not been declared CVideoFrame( AVCodecContext pCodecContext, PixelFormat _format, std::string _filename ) : mpFrame(NULL) ^ ../ContentDecoder/Frame.h: In constructor ‘ContentDecoder::CVideoFrame::CVideoFrame(AVCodecContext, int, std::cxx11::string)’: ../ContentDecoder/Frame.h:106:23: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/local/include/libavcodec/avcodec.h:4898:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:106:23: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/local/include/libavcodec/avcodec.h:4898:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:106:98: error: invalid conversion from ‘int’ to ‘AVPixelFormat’ [-fpermissive] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/local/include/libavcodec/avcodec.h:4898:5: note: initializing argument 1 of ‘int avpicture_get_size(AVPixelFormat, int, int)’ int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:106:98: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/local/include/libavcodec/avcodec.h:4898:5: note: declared here int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:108:6: warning: ‘int avpicturefill(AVPicture, const uint8t, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] avpicturefill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/local/include/libavcodec/avcodec.h:4883:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:108:6: warning: ‘int avpicturefill(AVPicture, const uint8t, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] avpicture_fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/local/include/libavcodec/avcodec.h:4883:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:108:128: error: invalid conversion from ‘int’ to ‘AVPixelFormat’ [-fpermissive] avpicture_fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/local/include/libavcodec/avcodec.h:4883:5: note: initializing argument 3 of ‘int avpicturefill(AVPicture, const uint8t, AVPixelFormat, int, int)’ int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from ../ContentDecoder/ContentDecoder.h:46:0, from Player.h:11, from Player.cpp:37: ../ContentDecoder/Frame.h:108:128: warning: ‘int avpicturefill(AVPicture, const uint8t, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations] avpicture_fill( (AVPicture )m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ^ In file included from ../ContentDecoder/ContentDecoder.h:29:0, from Player.h:11, from Player.cpp:37: /usr/local/include/libavcodec/avcodec.h:4883:5: note: declared here int avpicture_fill(AVPicture picture, const uint8_t ptr, ^ In file included from Player.h:11:0, from Player.cpp:37: ../ContentDecoder/ContentDecoder.h: At global scope: ../ContentDecoder/ContentDecoder.h:199:2: error: ‘PixelFormat’ does not name a type PixelFormat m_WantedPixelFormat; ^ ../ContentDecoder/ContentDecoder.h:233:120: error: ‘PixelFormat’ has not been declared CContentDecoder( spCPlaylist _spPlaylist, bool _bStartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, PixelFormat _wantedPixelFormat = PIX_FMT_RGB24 ); ^ In file included from Player.h:11:0, from Player.cpp:37: ../ContentDecoder/ContentDecoder.h:233:153: error: ‘PIX_FMT_RGB24’ was not declared in this scope CContentDecoder( spCPlaylist _spPlaylist, bool _bStartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, PixelFormat _wantedPixelFormat = PIX_FMT_RGB24 ); ^ In file included from Player.h:14:0, from Player.cpp:37: FrameDisplay.h:32:38: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 const fp8 TEX_MOVE_SECS = 60.f \ 30.f; //30 minutes ^ Player.cpp: In member function ‘ContentDecoder::CContentDecoder_ CPlayer::CreateContentDecoder(bool)’: Player.cpp:377:2: error: ‘PixelFormat’ was not declared in this scope PixelFormat pf = PIX_FMT_BGR32; ^ Player.cpp:384:214: error: ‘pf’ was not declared in this scope CContentDecoder( m_spPlaylist, _bStartByRandom, g_Settings()->Get( "settings.player.CalculateTransitions", true ), (uint32)abs(g_Settings()->Get( "settings.player.BufferLength", 25 )), pf ); ^ Makefile:630: recipe for target 'Player.o' failed make[1]: * [Player.o] Error 1 make[1]: Leaving directory '/home/tibor/repos/electricsheep/client_generic/Client' Makefile:511: recipe for target 'all-recursive' failed make: * [all-recursive] Error 1

tiborh commented 8 years ago

"PixelFormat" type needs to be replaced with "AVPixelFormat" "PIX_FMT_RGB24" constant needs to be replaced with "AV_PIX_FMT_RGB24" Build has finished successfully. (with ffmpeg version 3.0.2, built on local machine)

So, the original problem probably was that the code does not handle well the 64-bit version of ffmpeg for which the header files are located in /usr/include/x86_64-linux-gnu/ instead of /usr/include/ as several of the header files (of electricsheep code) and probably also the build script presumes.