Page 1 of 1

VLC compile problem with x264, ... and avahi-client ?

Posted: 22 Oct 2007 04:50
by erbrmn
Hi all

Currently I compiled VLC for streaming , ... compile and VLC streaming is OK.
Kernel : Linux 2.6.9-34.EL
Distribution : Redhat EL 4
Compile folder: /usr/local/src
VLC and x264 : current version which I downloaded from SVN server.
-----------

But I have 2 problems during the compile. Please advise/help me my problems.

1. I could not compile with x264 encoder. Without to include x264 tree, I can compile.
I did configure with "enable-x264" and "--with-x264-tree" option.
I compiled current version of x264 in the "extras" of vlc main folder.
But I had following error messega:

==========
./configure --enable-snapshot --enable-debug --enable-dbus-control --enable-shared --enable-lirc --with-x509-ca-bundle=/etc/ssl/certs/ca-certificates.crt --with-live555-tree=/usr/lib/live --with-ffmpeg-tree=../extras/ffmpeg --enable-taglib --enable-v4l --enable-cddax --enable-dvb --enable-vcdx --enable-realrtsp --enable-svg --enable-dvdread --enable-dv --enable-theora --enable-faad --enable-twolame --enable-real --enable-flac --enable-tremor --with-ffmpeg-mp3lame --with-faac --enable-ncurses --enable-aa --enable-caca --enable-esd --enable-portaudio --enable-jack --enable-xosd --enable-galaktos --enable-goom --enable-ggi --disable-cddax --disable-vcdx --disable-dirac --disable-xvmc --enable-pvr --enable-loader --enable-python-bindings --enable-audioscrobbler --enable-libcddb --enable-libcdio --enable-opencv --enable-nls --disable-notify --with-libmpeg2-tree=../extras/mpeg2dec-0.4.1 --disable-speex --disable-lua --disable-fluidsynth --disable-gnutls --disable-avahi-client --enable-old-dbus --with-included-gettext --enable-skins2 --enable-wxwidgets --enable-x264 --with-x264-tree=../extras/x264/

......
......

checking png.h presence... yes
checking for png.h... yes
checking for png_set_rows in -lpng... yes
checking for x264.h in /usr/local/src/vlc-trunk/extras/x264... yes
checking for x264_encoder_open in -lx264... no
configure: error: the specified tree hasn't been compiled


I found follwoing error message from config.log :

configure:58065: checking for x264.h in /usr/local/src/vlc-trunk/extras/x264
configure:58069: result: yes
configure:58084: checking for x264_encoder_open in -lx264
configure:58114: gcc -std=gnu99 -o conftest -Wall -Wextra -Wno-unused-parameter -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -DSYS_LINUX -lpthread conftest.c -lx264 >&5
conftest.c:40:1: warning: "_GNU_SOURCE" redefined
conftest.c:10:1: warning: this is the location of the previous definition
/usr/local/lib/libx264.a(encoder.o)(.text+0xd95): In function `x264_encoder_open':
: undefined reference to `pow'
/usr/local/lib/libx264.a(encoder.o)(.text+0xeda): In function `x264_encoder_open':
: undefined reference to `pow'
/usr/local/lib/libx264.a(encoder.o)(.text+0xfb8): In function `x264_encoder_open':
: undefined reference to `pow'
/usr/local/lib/libx264.a(encoder.o)(.text+0x1026): In function `x264_encoder_open':
: undefined reference to `pow'
/usr/local/lib/libx264.a(ratecontrol.o)(.text+0x5e): In function `qscale2bits':
: undefined reference to `pow'
/usr/local/lib/libx264.a(ratecontrol.o)(.text+0x14d): more undefined references to `pow' follow
collect2: ld returned 1 exit status

==========

2. I got warning message on "avahi-client". I did "--disable-avahi-client", but I got still warning message.
What is the avahi-client ? how can I disable it in my confugure.

=========
checking for avahi-client >= 0.3... Package avahi-client was not found in the pkg-config search path.
Perhaps you should add the directory containing `avahi-client.pc'
to the PKG_CONFIG_PATH environment variable
No package 'avahi-client' found
configure: WARNING: avahi-client library not found
==========

Re: VLC compile problem with x264, ... and avahi-client ?

Posted: 22 Oct 2007 14:04
by funman
there is something wrong since the config test tries to link with the system libx264, not the one in the tree you specified

--disable-avahi-client doesn't exist, you should use --disable-bonjour (avahi client is used only by bonjour module)

Re: VLC compile problem with x264, ... and avahi-client ?

Posted: 23 Oct 2007 09:17
by erbrmn
there is something wrong since the config test tries to link with the system libx264, not the one in the tree you specified

--disable-avahi-client doesn't exist, you should use --disable-bonjour (avahi client is used only by bonjour module)
funman: Thank you very much for message

1. When I installed x264 from RPM package and then I deleted "--with-x264-tree" (only --enable-x264) from configure, ... I had not error message again.
2. I did "--disable-bonjour " in configure, ... I had not warning message again.

Re: VLC compile problem with x264, ... and avahi-client ?

Posted: 24 Oct 2007 00:48
by xtophe
Hi,

Some other people have reported the same problem i.e. configure not passing the good location of libx264 when trying to compile it. but i've just try with the current svn and it works ok here.

could you try the following patch, re-bootstrap and report the content of foo.bar

Code: Select all

Index: configure.ac =================================================================== --- configure.ac (revision 22813) +++ configure.ac (working copy) @@ -3763,6 +3763,7 @@ AC_MSG_RESULT(yes) VLC_ADD_CPPFLAGS([x264],[-I${real_x264_tree}]) VLC_ADD_LIBS([x264],[-L${real_x264_tree}]) + echo ${LIBS_x264} >> foo.bar LDFLAGS="${LDFLAGS_save} ${LIBS_x264} ${THREAD_LIB}" AC_CHECK_LIB(x264, x264_encoder_open, [ VLC_ADD_BUILTINS([x264])

Re: VLC compile problem with x264, ... and avahi-client ?

Posted: 24 Oct 2007 13:08
by erbrmn
Hi,

Some other people have reported the same problem i.e. configure not passing the good location of libx264 when trying to compile it. but i've just try with the current svn and it works ok here.

could you try the following patch, re-bootstrap and report the content of foo.bar

Code: Select all

Index: configure.ac =================================================================== --- configure.ac (revision 22813) +++ configure.ac (working copy) @@ -3763,6 +3763,7 @@ AC_MSG_RESULT(yes) VLC_ADD_CPPFLAGS([x264],[-I${real_x264_tree}]) VLC_ADD_LIBS([x264],[-L${real_x264_tree}]) + echo ${LIBS_x264} >> foo.bar LDFLAGS="${LDFLAGS_save} ${LIBS_x264} ${THREAD_LIB}" AC_CHECK_LIB(x264, x264_encoder_open, [ VLC_ADD_BUILTINS([x264])
Thank u, xtophe

I am going to try it tomorrow, ...

Re: VLC compile problem with x264, ... and avahi-client ?

Posted: 14 Feb 2008 13:55
by jamoo1980
I have had the same problem, which can be summarised as follows:
  • - when trying to ./configure I get the error "The specified tree has not been compiled" (referring to x264) even though I have definitely compiled the source
  • - if I remove the --with-x264-tree=../extras/x264 from the ./configure options, vlc will configure, compile and run.
However! There are still further problems... Although VLC will build using this work-around, it fails to install - although it can be run from inside the build directory... This is really inconvenient and tends to cause knock-on problems.
I got around the problem by using known-good svn revisions of vlc, x264 and ffmpeg (i.e. versions that I had compiled previously with no problems). These were as follows:
  • vlc revision 24091
  • x264 revision 715
  • ffmpeg revision 11410
This configures, builds and installs without issues. Not a proper solution, I admit - haven't worked out what the issue was with the latest svn revision - but at least I have a version that works!
James

Re: VLC compile problem with x264, ... and avahi-client ?

Posted: 17 Dec 2008 19:53
by rideallday
After debugging the makefile, I found that the PKG_CONFIG_PATH does not get set for x264 in the config.

so, set it before the ./configure- eg:

export PKG_CONFIG_PATH=`pwd`/extras/x264


This will just fall back to whatever version of x264 that's installed on your system. Very annoying. Hopefully this fixes my buffer underflow problem with h264.