Avidemux Forum

Avidemux => Unix-Like (Linux/Bsd/...) => Topic started by: urichter on January 14, 2012, 05:09:19 PM

Title: [2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code
Post by: urichter on January 14, 2012, 05:09:19 PM
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
Title: Re: [2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code
Post by: Jan Gruuthuse on January 15, 2012, 08:12:58 AM
Have you all the dependencies? Compiling Avidemux 2.5.x (http://www.avidemux.org/admWiki/doku.php?id=build:install_2.5) <- 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.
Title: Re: [2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code
Post by: mean on January 15, 2012, 08:44:57 AM
Are you forcing a debug build ?
I have the same problem but only when -g is there and no -O2
Title: Re: [2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code
Post by: urichter on January 15, 2012, 02:50:18 PM
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
Title: Re: [2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code
Post by: Jan Gruuthuse on January 16, 2012, 08:54:06 AM
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

Title: Re: [2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code
Post by: nibbles on March 02, 2012, 05:48:40 AM
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.
Title: Re: [2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code
Post by: Jan Gruuthuse on March 02, 2012, 07:31:27 AM
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.
Title: Re: [2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code
Post by: nibbles on March 04, 2012, 03:13:28 AM
I posted a patch for this over on this thread. (http://www.avidemux.org/smf/index.php?topic=10284.msg55666#msg55666)  Please give it a test.
Title: Re: [2.5.6][Debian] undefined reference to ff_se_golomb_vlc_code
Post by: urichter on April 09, 2012, 09:34:16 AM
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.