Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error building scanner-ffmpeg #19

Closed
audionuma opened this issue Mar 24, 2013 · 6 comments
Closed

error building scanner-ffmpeg #19

audionuma opened this issue Mar 24, 2013 · 6 comments

Comments

@audionuma
Copy link
Contributor

Hello,
I have an issue building the ffmpeg scanner (Linux Mint 14 64 bits) :
ffmpeg installed following the guide : https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

manu@manu-mint14 ~ $ ffmpeg -version
ffmpeg version git-2013-03-24-01a334e
built on Mar 24 2013 06:08:15 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
configuration: --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3 --enable-libopus
libavutil      52. 22.101 / 52. 22.101
libavcodec     55.  1.100 / 55.  1.100
libavformat    55.  0.100 / 55.  0.100
libavdevice    55.  0.100 / 55.  0.100
libavfilter     3. 48.100 /  3. 48.100
libswscale      2.  2.100 /  2.  2.100
libswresample   0. 17.102 /  0. 17.102
libpostproc    52.  2.100 / 52.  2.100
manu@manu-mint14 ~ $ 

Here's the full libebur128 installation output :

manu@manu-mint14 ~ $ uname -a
Linux manu-mint14 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
manu@manu-mint14 ~ $ cd sources/
manu@manu-mint14 ~/sources $ git clone https://github.com/jiixyj/libebur128
Cloning into 'libebur128'...
remote: Counting objects: 3155, done.
remote: Compressing objects: 100% (1056/1056), done.
remote: Total 3155 (delta 2216), reused 2990 (delta 2053)
Receiving objects: 100% (3155/3155), 530.81 KiB | 426 KiB/s, done.
Resolving deltas: 100% (2216/2216), done.
manu@manu-mint14 ~/sources $ cd libebur128/
manu@manu-mint14 ~/sources/libebur128 $ git submodule init
Submodule 'scanner/filetree' (git://github.com/jiixyj/filewalk.git) registered for path 'scanner/filetree'
manu@manu-mint14 ~/sources/libebur128 $ git submodule update
Cloning into 'scanner/filetree'...
remote: Counting objects: 117, done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 117 (delta 62), reused 115 (delta 60)
Receiving objects: 100% (117/117), 19.82 KiB, done.
Resolving deltas: 100% (62/62), done.
Submodule path 'scanner/filetree': checked out 'c9ae91558baa7da144ee98d692b88d69cab15123'
manu@manu-mint14 ~/sources/libebur128 $ mkdir build
manu@manu-mint14 ~/sources/libebur128 $ cd build
manu@manu-mint14 ~/sources/libebur128/build $ cmake ..
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- Found GLIB: /usr/lib/x86_64-linux-gnu/libglib-2.0.so  
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.4.10") 
-- Found GTK2_GTK: /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so  
-- Found RSVG2: /usr/lib/x86_64-linux-gnu/librsvg-2.so  
-- Found SNDFILE: /usr/lib/x86_64-linux-gnu/libsndfile.so  
-- Could NOT find MPG123 (missing:  MPG123_LIBRARY MPG123_INCLUDE_DIR) 
-- Could NOT find MPCDEC (missing:  MPCDEC_LIBRARY MPCDEC_INCLUDE_DIR) 
-- Found SPEEXDSP: /usr/lib/x86_64-linux-gnu/libspeexdsp.so  
-- Found AVFORMAT: /usr/local/lib/libavformat.a  
-- Found TAGLIB: /usr/lib/x86_64-linux-gnu/libtag.so  
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.8.0") 
-- Found GSTREAMER: /usr/include/gstreamer-0.10  
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: /usr/bin/qmake (found version "4.8.3") 
-- status          found / use --
-- glib-2.0:       yes     yes
-- gtk-2.0:        yes     yes
-- rsvg2:          yes     yes
-- libsndfile:     yes     yes
-- libmpg123:      no     no
-- libmpcdec:      no     no
-- speexdsp:       yes     yes
-- ffmpeg:         yes     yes
-- taglib:         yes     yes
-- gstreamer:      yes     yes
-- qt4:            yes     yes
-- Configuring done
-- Generating done
-- Build files have been written to: /home/manu/sources/libebur128/build
manu@manu-mint14 ~/sources/libebur128/build $ make
Scanning dependencies of target ebur128
[  4%] Building C object ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
Linking C shared library ../libebur128.so
[  4%] Built target ebur128
Scanning dependencies of target ebur128_static
[  8%] Building C object ebur128/CMakeFiles/ebur128_static.dir/ebur128.c.o
Linking C static library ../libebur128.a
[  8%] Built target ebur128_static
Scanning dependencies of target input
[ 13%] Building C object scanner/inputaudio/CMakeFiles/input.dir/input.c.o
Linking C static library ../../libinput.a
[ 13%] Built target input
Scanning dependencies of target filetree
[ 17%] Building C object scanner/filetree/CMakeFiles/filetree.dir/filetree.c.o
Linking C static library libfiletree.a
[ 17%] Built target filetree
Scanning dependencies of target scanner-common
[ 21%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/parse_args.c.o
[ 26%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/nproc.c.o
[ 30%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/scanner-common.c.o
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c: In function ‘scanner_init_common’:
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c:33:9: attention : ‘g_mutex_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:271) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c:36:9: attention : ‘g_cond_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:275) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c: In function ‘process_files’:
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c:335:5: attention : ‘g_thread_create’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Wdeprecated-declarations]
Linking C static library ../../libscanner-common.a
[ 30%] Built target scanner-common
Scanning dependencies of target scanner-tag
[ 34%] Building C object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/scanner-tag.c.o
[ 39%] Building CXX object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/rgtag.cpp.o
Linking CXX static library ../../libscanner-tag.a
[ 39%] Built target scanner-tag
Scanning dependencies of target scanner-lib
[ 43%] Building C object scanner/CMakeFiles/scanner-lib.dir/scanner-scan.c.o
[ 47%] Building C object scanner/CMakeFiles/scanner-lib.dir/scanner-dump.c.o
Linking C static library ../libscanner-lib.a
[ 47%] Built target scanner-lib
Scanning dependencies of target loudness
[ 52%] Building C object scanner/CMakeFiles/loudness.dir/scanner.c.o
/home/manu/sources/libebur128/scanner/scanner.c: In function ‘main’:
/home/manu/sources/libebur128/scanner/scanner.c:158:5: attention : ‘g_thread_init’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:259) [-Wdeprecated-declarations]
Linking CXX executable ../loudness
[ 52%] Built target loudness
Scanning dependencies of target input_sndfile
[ 56%] Building C object scanner/inputaudio/sndfile/CMakeFiles/input_sndfile.dir/input_sndfile.c.o
[ 60%] Building C object scanner/inputaudio/sndfile/CMakeFiles/input_sndfile.dir/__/input_helper.c.o
Linking C shared module ../../../libinput_sndfile.so
[ 60%] Built target input_sndfile
Scanning dependencies of target input_ffmpeg
[ 65%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/input_ffmpeg.c.o
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:16:21: erreur: ‘AVCODEC_MAX_AUDIO_FRAME_SIZE’ undeclared here (not in a function)
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_open_file’:
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:93:3: attention : ‘av_find_stream_info’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1514) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:174:3: attention : ‘av_close_input_file’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1690) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_read_one_packet’:
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:259:9: attention : ‘avcodec_decode_audio3’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3608) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_close_file’:
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:396:3: attention : ‘av_close_input_file’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1690) [-Wdeprecated-declarations]
make[2]: *** [scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/input_ffmpeg.c.o] Erreur 1
make[1]: *** [scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/all] Erreur 2
make: *** [all] Erreur 2
manu@manu-mint14 ~/sources/libebur128/build $ 

Wondering if my ffmpeg build is too recent for libebur128 ?
Any ideas ?
Thanks

@audionuma
Copy link
Contributor Author

Trying a quick and dirty workaround.
In input_ffmpeg.c, replace

#define BUFFER_SIZE (AVCODEC_MAX_AUDIO_FRAME_SIZE + FF_INPUT_BUFFER_PADDING_SIZE)

by

#define BUFFER_SIZE (192000 + FF_INPUT_BUFFER_PADDING_SIZE)

leads to a new error

/usr/bin/ld: /usr/local/lib/libavformat.a(allformats.o): réadressage de R_X86_64_32 en vertu de « ff_a64_muxer » ne peut être utilisé lors de la création d'un objet partagé; recompilez avec -fPIC
/usr/local/lib/libavformat.a: ne peut lire les symboles: Mauvaise valeur
collect2: erreur: ld a retourné 1 code d'état d'exécution
make[2]: *** [libinput_ffmpeg.so] Erreur 1
make[1]: *** [scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/all] Erreur 2
make: *** [all] Erreur 2

(which can be roughly translated into
readressing R_X86_64_32 because of ff_a64_muxer cannot be used when creating a shared object. Rebuild with -fPIC
:-(

@jiixyj
Copy link
Owner

jiixyj commented Mar 24, 2013

If you don't need the FFmpeg plugin, you can disable it by setting the CMake variable USE_AVFORMAT to false (with "ccmake" or the CMake GUI). FFmpeg moves very fast at the moment, I'll try to fix the build as soon as possible. Thanks for the report!

@audionuma
Copy link
Contributor Author

Thanks. I can confirm that even with the FFmpeg scanner error, the libsndfile scanner does work.
Let me know if I can be of any assistance.

@audionuma
Copy link
Contributor Author

Hi,
concerning the deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE, a look here :
http://git.videolan.org/?p=ffmpeg.git;a=blobdiff;f=libavformat/dvenc.c;h=577ba7c4da93f24ff13018860929c9a40250b080;hp=a7d281a799727e14c21206c8df5fc997a31d45fa;hb=e0aa5e772bbe4c52182a5db321b0da6b98205ef1;hpb=8337b5db967ecadab4bb65c272cb47d350ecb83b
shows that the issue has been solved in dvenc.c simply by replacing AVCODEC_MAX_AUDIO_FRAME_SIZE by it's hardcoded value 192000.

@audionuma
Copy link
Contributor Author

Hi,
concerning the second issue I mentioned (linking to libavformat), I think it is not related to libebur128 but to the configure options I used to build FFmpeg.

@andrewrk
Copy link
Collaborator

This can be closed or moved to https://github.com/jiixyj/loudness-scanner/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants