[FFmpeg-devel] [PATCH] --enable-libx264 and --enable-libxvid depend on --enable-pthread

Aurelien Jacobs aurel
Sat Feb 28 02:36:32 CET 2009


M?ns Rullg?rd wrote:

> Aurelien Jacobs <aurel at gnuage.org> writes:
> 
> > M?ns Rullg?rd wrote:
> >
> >> Brad <brad at comstyle.com> writes:
> >> 
> >> > On Friday 27 February 2009 18:43:58 M?ns Rullg?rd wrote:
> >> >> pkg-config fails miserably if you are cross-compiling, something
> >> >> FFmpeg must support.
> >
> > I've already cross-compiled numbers of packages, some of them using
> > pkg-config, so it doesn't seem to be as broken as you pretend.
> 
> How did you make it not suggest -L/usr/lib for the linker flags?

man pkg-config suggest that pkg-config never output -L/usr/lib as
part of the linker flags, except if you set PKG_CONFIG_ALLOW_SYSTEM_LIBS.

Anyway, the .pc files generated by a lib built in a correctly setup
cross-compile environment should point to the appropriate lib directory.

And if the .pc files are broken and still point to /usr/lib or
something like this, you could also override the prefix using
--define-variable such as:
  $ pkg-config --define-variable=prefix=/foo --libs x264
  -L/foo/lib -lx264 -lpthread

If all this don't work, then the .pc file is probably broken beyond belief,
and you should report it to the one who wrote it.

> >> > Everything else just fails miserably all the time.
> >
> > True. --enable-libx264 don't work, weather you're cross-compiling
> > or not. So using pkg-config won't make cross-compiling more broken...
> 
> Using pkg-config throughout, which is what I assumed was suggested,
> would break much more than x264.

What was suggested is to use pkg-config to get the linking dependencies
of all the static libraries we try to link to.
And if something break, that's most probably due to a buggy .pc file and
should be reported.

> >> Is the FFmpeg configure script not working for you?  If not, why have
> >> you not reported it?  We fix any bugs we find out about.
> >
> > Huh... IIRC it was already reported numerous times...
> > Anyway, here it is:
> >
> > $ ./configure --enable-gpl --enable-libx264
> > ERROR: libx264 not found
> > If you think configure made a mistake, make sure you are using the latest
> > version from SVN.  If the latest version fails, report the problem to the
> > ffmpeg-user at mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
> > Include the log file "config.err" produced by configure as this will help
> > solving the problem.
> >
> > $ ./configure --enable-gpl --enable-libx264 --enable-pthreads 
> > ERROR: libx264 not found
> > If you think configure made a mistake, make sure you are using the latest
> > version from SVN.  If the latest version fails, report the problem to the
> > ffmpeg-user at mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
> > Include the log file "config.err" produced by configure as this will help
> > solving the problem.
> 
> One or the other of the above two options has always worked whenever I
> have built FFmpeg with x264 support.
> 
> > The following is working:
> > $ ./configure --enable-gpl --enable-libx264 --extra-ldflags="-lpthread -lX11"
> >
> > But the needed libraries would be different depending on the way
> > x264 was built.
> 
> It is the responsibility of x264 to document its dependencies.

It does... Throught it's x264.pc file. (disregarding the bugs it contains ;-)

Aurel




More information about the ffmpeg-devel mailing list