[2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code

Started by urichter, January 14, 2012, 05:09:19 PM

Previous topic - Next topic

urichter

Hi,

I'm trying to compile avidemux-2.5.6 on Debian Squeeze + Debian-Multimedia, but it fails to compile. Its running up to this error:
Linking CXX executable avidemux2_cli
ADM_infoExtractor/libADM_infoExtractor_cli.a(ADM_infoextractor_h264.cpp.o): In function `get_se_golomb':
ADM_infoextractor_h264.cpp:(.text+0x3a3): undefined reference to `ff_se_golomb_vlc_code'
collect2: ld returned 1 exit status

From what I can tell, it seems as if libADM_infoExtractor_cli.a needs to be linked against golomb.o from ffmpeg, but it isn't, although the proper file is located in build/avidemux/ADM_libraries/ffmpeg/libavcodec. This is probably some kind of cmake-magic going wrong, but I have no clue where to start searching.

I've tried avidemux-2.5.6 original source code and the svn 2.5 branch.

TIA,

Udo

Jan Gruuthuse

#1
Have you all the dependencies? Compiling Avidemux 2.5.x <- click On ubuntu 11.10 64-bit still compiles (standard) alright. If it is of any use to you: included the terminal output of compiling svn avidemux 2.5.5.

mean

Are you forcing a debug build ?
I have the same problem but only when -g is there and no -O2

urichter

All dependencies seem to be met:
ii  build-essentia 11.5           Informational list of build-essential packag
ii  cmake          2.8.2+dfsg.1-0 a cross-platform, open-source make system
ii  gettext        0.18.1.1-3     GNU Internationalization utilities
ii  liba52-0.7.4   0.7.4-14       library for decoding ATSC A/52 streams
ii  liba52-0.7.4-d 0.7.4-14       library for decoding ATSC A/52 streams (deve
ii  libarts1-dev   1.5.9-3+b2     development files for the aRts sound system
ii  libasound2-dev 1.0.23-2.1     shared library for ALSA applications -- deve
ii  libfaac-dev    1.28-0.3       an AAC audio encoder - devel files
ii  libfaad-dev    2.7-6          freeware Advanced Audio Decoder - developmen
ii  libglib2.0-dev 2.24.2-1       Development files for the GLib library
ii  libgtk2.0-dev  2.20.1-2       Development files for the GTK+ library
ii  libmad0-dev    0.15.1b-5      MPEG audio decoder development library
ii  libqt4-dev     4:4.6.3-4+sque Qt 4 development files
ii  libvorbis-dev  1.3.1-1        The Vorbis General Audio Compression Codec (
ii  libx264-dev    3:0.118.2085+g development files for libx264
ii  libxml2-dev    2.7.8.dfsg-2+s Development files for the GNOME XML library
ii  libxv-dev      2:1.0.5-1      X11 Video extension library (development hea
ii  libxvidcore4-d 2:1.2.2-0.1    High quality ISO MPEG4 codec library -- deve
ii  pkg-config     0.25-1.1       manage compile and link flags for libraries
ii  subversion     1.6.12dfsg-6   Advanced version control system


However, there may be lots of outdated versions, as this is Squeeze. Squeeze is at least a year older than Ubuntu 11.10. It also does compile on Debian Wheezy, obviously, as there are pre-built packages on debian-multimedia. The latest pre-built for Squeeze on debian-multimedia is 2.5.4.

In fact, my first attempt was to do a backport build of the Debian source package, which led exactly to the same error. I then tried the source package using the manual compilation steps (cmake, make - no special options, release build) from the wiki. The full build log is attached, the error appears after 1630 lines.

However, up until that error, all seems to compile fine, its just that linking libADM_infoExtractor_cli.a fails to find ff_se_golomb_vlc_code, which is in
#>nm ./avidemux/ADM_libraries/ffmpeg/libavcodec/golomb.o
00000000 R ff_golomb_vlc_len
00000a00 R ff_interleaved_dirac_golomb_vlc_code
00000700 R ff_interleaved_golomb_vlc_len
00000900 R ff_interleaved_se_golomb_vlc_code
00000800 R ff_interleaved_ue_golomb_vlc_code
00000400 R ff_se_golomb_vlc_code
00000600 R ff_ue_golomb_len
00000200 R ff_ue_golomb_vlc_code


Cheers,

Udo

Jan Gruuthuse

ii  build-essentia 11.5ubuntu1    Informational list of build-essential packag
ii  cmake          2.8.5-1ubuntu1 cross-platform, open-source make system
ii  gettext        0.18.1.1-3ubun GNU Internationalization utilities
ii  liba52-0.7.4   0.7.4-16       library for decoding ATSC A/52 streams
ii  liba52-0.7.4-d 0.7.4-16       library for decoding ATSC A/52 streams (deve
ii  libasound2-dev 1.0.24.1-0ubun shared library for ALSA applications -- deve
ii  libfaac-dev    1.28-0ubuntu1  AAC audio encoder (development)
ii  libfaad-dev    2.7-6ubuntu1   freeware Advanced Audio Decoder - developmen
ii  libglib2.0-dev 2.30.0-0ubuntu Development files for the GLib library
ii  libgtk2.0-dev  2.24.6-0ubuntu Development files for the GTK+ library
ii  libmad0-dev    0.15.1b-5ubunt MPEG audio decoder development library
ii  libqt4-dev     4:4.7.4-0ubunt Qt 4 development files
ii  libvorbis-dev  1.3.2-1ubuntu2 The Vorbis General Audio Compression Codec (
ii  libx264-dev    2:0.116.2042+g development files for libx264
ii  libxml2-dev    2.7.8.dfsg-4   Development files for the GNOME XML library
ii  libxv-dev      2:1.0.6-2      X11 Video extension library (development hea
ii  libxvidcore-de 2:1.3.2-3      Open source MPEG-4 video codec (development)
ii  pkg-config     0.26-1ubuntu1  manage compile and link flags for libraries
ii  subversion     1.6.12dfsg-4ub Advanced version control system


nibbles

A solution to this was posted on the other thread.  As I can't recreate the issue, I can't test the fix, but holler if you need help.

Jan Gruuthuse

Quote from: gruntster on March 01, 2012, 07:45:00 AM
Quote[ 94%] Building CXX object avidemux/ADM_UIs/ADM_QT4/src/CMakeFiles/ADM_UIQT4.dir/FAC_frame.cpp.o
ADM_infoExtractor/libADM_infoExtractor_cli.a(ADM_infoextractor_h264.cpp.o): In function `get_se_golomb':
ADM_infoextractor_h264.cpp:(.text+0x347): undefined reference to `ff_se_golomb_vlc_code'
collect2: ld returned 1 exit status
make[2]: *** [avidemux/avidemux2_cli] Error 1
make[1]: *** [avidemux/CMakeFiles/avidemux2_cli.dir/all] Error 2

We patch ffmpeg during the CMake process to make private APIs available to Avidemux.  "ff_se_golomb_vlc_code" is not one we've needed to expose in the past but you could try adding "ff_se_golomb_vlc_code" to the "libavcodec.v" file (in avidemux/ADM_libraries/ffmpeg/libavcodec) so it is exported.  Not sure why other platforms don't need this though.

nibbles


urichter

Sorry for the late response, missed it. The new libavcodec_libavcodec.v.patch file did the trick, now it compiles on debian/stable again. Thanks.